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

AlgFitTrackSAList Class Reference

#include <AlgFitTrackSAList.h>

Inheritance diagram for AlgFitTrackSAList:

AlgBase List of all members.

Public Member Functions

 AlgFitTrackSAList ()
virtual ~AlgFitTrackSAList ()
virtual void RunAlg (AlgConfig &ac, CandHandle &ch, CandContext &cx)

Private Member Functions

 ClassDef (AlgFitTrackSAList, 0)

Constructor & Destructor Documentation

AlgFitTrackSAList::AlgFitTrackSAList  ) 
 

Definition at line 44 of file AlgFitTrackSAList.cxx.

00044 {}

AlgFitTrackSAList::~AlgFitTrackSAList  )  [virtual]
 

Definition at line 47 of file AlgFitTrackSAList.cxx.

00047 {}


Member Function Documentation

AlgFitTrackSAList::ClassDef AlgFitTrackSAList  ,
[private]
 

void AlgFitTrackSAList::RunAlg AlgConfig ac,
CandHandle ch,
CandContext cx
[virtual]
 

Implements AlgBase.

Definition at line 50 of file AlgFitTrackSAList.cxx.

References CandHandle::AddDaughterLink(), AlgFactory::GetAlgHandle(), CandContext::GetCandRecord(), Registry::GetCharString(), CandContext::GetDataIn(), CandHandle::GetDaughterIterator(), AlgFactory::GetInstance(), CandContext::GetMom(), RecMinos::GetVldContext(), CandFitTrackSA::MakeCandidate(), and MSG.

00050                                                                             {
00051 
00052     MSG("Alg", Msg::kDebug)
00053     << "Starting AlgFitTrackSAList::RunAlg()" << endl;
00054 
00055     assert(cx.GetDataIn());
00056 
00057     if (!(cx.GetDataIn()->InheritsFrom("TObjArray"))) {
00058         return;
00059     }
00060 
00061     const CandRecord *candrec = cx.GetCandRecord();
00062     assert(candrec);
00063     const VldContext *vldcptr = candrec->GetVldContext();
00064     assert(vldcptr);
00065     VldContext vldc = *vldcptr;
00066 
00067     // PUT CODE IN HERE
00068     const CandTrackListHandle* tracklist = NULL;
00069 
00070     const TObjArray *cxin = dynamic_cast<const TObjArray *>(cx.GetDataIn());
00071     for (Int_t i=0; i<=cxin->GetLast(); i++) {
00072         TObject *tobj = cxin->At(i);
00073         if (tobj->InheritsFrom("CandTrackListHandle")) {
00074             tracklist = dynamic_cast<CandTrackListHandle*>(tobj);
00075         }
00076     }
00077     if (!tracklist) {
00078         MSG("error",Msg::kError) <<
00079         "CandTrackListHandle missing\n";
00080     }
00081 
00082     // Create Candcontext
00083     CandContext cxx(this,cx.GetMom());
00084 
00085     // Get singleton instance of AlgFactory
00086     AlgFactory &af = AlgFactory::GetInstance();
00087 
00088     // Get an AlgHandle to AlgSliceSR with default AlgConfig
00089     AlgHandle afth = af.GetAlgHandle(ac.GetCharString("FitTrackSAAlgorithm"), 
00090                                      ac.GetCharString("FitTrackSAAlgConfig"));
00091     
00092     TIter trackItr(tracklist->GetDaughterIterator());
00093 
00094     while (CandTrackHandle *track = dynamic_cast<CandTrackHandle*>(trackItr())) {
00095         TObjArray cxin;
00096         cxin.Add(track);
00097         cxx.SetDataIn(&cxin);
00098 
00099         CandFitTrackSAHandle fittrack = CandFitTrackSA::MakeCandidate(afth,cxx);
00100         ch.AddDaughterLink(fittrack);
00101     }
00102 
00103 }


The documentation for this class was generated from the following files:
Generated on Thu Nov 1 15:55:25 2007 for loon by  doxygen 1.3.9.1