Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

AlgFitTrackAtNuList.cxx

Go to the documentation of this file.
00001 
00002 #include "AlgFitTrackAtNuList.h"
00003 
00004 #include "Algorithm/AlgFactory.h"
00005 #include "Algorithm/AlgHandle.h"
00006 #include "Algorithm/AlgConfig.h"
00007 #include "MessageService/MsgService.h" 
00008 #include "Candidate/CandContext.h"
00009 
00010 #include "RecoBase/CandTrackHandle.h"
00011 #include "RecoBase/CandTrackListHandle.h"
00012 
00013 #include "CandFitTrackAtNuHandle.h"
00014 #include "CandFitTrackAtNuListHandle.h"
00015 
00016 ClassImp(AlgFitTrackAtNuList)
00017 
00018 //CVSID("$Id: AlgFitTrackAtNuList.cxx,v 1.5 2005/02/04 21:07:53 blake Exp $");
00019 
00020 AlgFitTrackAtNuList::AlgFitTrackAtNuList()
00021 {
00022 
00023 }
00024   
00025 AlgFitTrackAtNuList::~AlgFitTrackAtNuList()
00026 {
00027 
00028 }
00029 void AlgFitTrackAtNuList::RunAlg(AlgConfig& /*ac*/, CandHandle &ch, CandContext &cx)
00030 {
00031 
00032   // Get CandFitTrackListHandle
00033   CandFitTrackAtNuListHandle& fittrk_list = dynamic_cast<CandFitTrackAtNuListHandle&>(ch);
00034 
00035   // Get singleton instance of AlgFactory
00036   AlgFactory &af = AlgFactory::GetInstance();
00037   AlgHandle ah_fittrk = af.GetAlgHandle("AlgFitTrackAtNu", "default");
00038   CandRecord* candrec = (CandRecord*)(cx.GetCandRecord());
00039   CandContext cx_fittrk(this, cx.GetMom());
00040   cx_fittrk.SetCandRecord(candrec);
00041 
00042   // Make CandFitTrackHandle
00043   const CandTrackListHandle* trk_list = dynamic_cast<const CandTrackListHandle*>(cx.GetDataIn());
00044   TIter trk_itr(trk_list->GetDaughterIterator());
00045   while(CandTrackHandle* trk = dynamic_cast<CandTrackHandle*>(trk_itr())){ 
00046     cx_fittrk.SetDataIn(trk);
00047     CandFitTrackAtNuHandle fittrk = CandFitTrackAtNu::MakeCandidate(ah_fittrk,cx_fittrk);
00048     fittrk.SetName(TString("CandFitTrackAtNuHandle"));
00049     fittrk.SetTitle(TString("Created by AlgFitTrackAtNu from ").Append(trk->GetName()));
00050     fittrk_list.AddDaughterLink(fittrk);
00051   }  
00052 
00053   return;
00054 }
00055 
00056 void AlgFitTrackAtNuList::Trace(const char * /*c*/) const
00057 {
00058 
00059 }

Generated on Mon Feb 15 11:06:18 2010 for loon by  doxygen 1.3.9.1