AlgFitTrackMSList Class Reference

#include <AlgFitTrackMSList.h>

Inheritance diagram for AlgFitTrackMSList:
AlgBase

List of all members.

Public Member Functions

 AlgFitTrackMSList ()
virtual ~AlgFitTrackMSList ()
virtual void RunAlg (AlgConfig &ac, CandHandle &ch, CandContext &cx)
virtual void Trace (const char *c) const

Detailed Description

Definition at line 16 of file AlgFitTrackMSList.h.


Constructor & Destructor Documentation

AlgFitTrackMSList::AlgFitTrackMSList (  ) 

Definition at line 47 of file AlgFitTrackMSList.cxx.

00048 {
00049 }

AlgFitTrackMSList::~AlgFitTrackMSList (  )  [virtual]

Definition at line 52 of file AlgFitTrackMSList.cxx.

00053 {
00054 }


Member Function Documentation

void AlgFitTrackMSList::RunAlg ( AlgConfig ac,
CandHandle ch,
CandContext cx 
) [virtual]

Implements AlgBase.

Definition at line 57 of file AlgFitTrackMSList.cxx.

References CandHandle::AddDaughterLink(), CandContext::GetDataIn(), CandHandle::GetDaughterIterator(), AlgFactory::GetInstance(), CandContext::GetMom(), Msg::kDebug, Msg::kError, CandFitTrackMS::MakeCandidate(), and MSG.

00059 {
00060   MSG("Alg", Msg::kDebug)
00061                            << "Starting AlgFitTrackMSList::RunAlg()" << endl;
00062 
00063   assert(cx.GetDataIn());
00064 
00065   if (!(cx.GetDataIn()->InheritsFrom("TObjArray"))) {
00066     return;
00067   }
00068 
00069   const CandSliceListHandle *slicelist = 0;
00070   const CandTrackListHandle *tracklist = 0;
00071   const TObjArray *cxin = dynamic_cast<const TObjArray *>(cx.GetDataIn());
00072   for (Int_t i=0; i<=cxin->GetLast(); i++) {
00073     TObject *tobj = cxin->At(i);
00074     if (tobj->InheritsFrom("CandSliceListHandle")) {
00075       slicelist = dynamic_cast<CandSliceListHandle*>(tobj);
00076     }
00077     if (tobj->InheritsFrom("CandTrackListHandle")) {
00078       tracklist = dynamic_cast<CandTrackListHandle*>(tobj);
00079     }
00080   }
00081   if (!slicelist || !tracklist) {
00082     MSG("FitTrackMS",Msg::kError) <<
00083       "CandSliceListHandle or CandTrackListHandle missing\n";
00084   }
00085 
00086 // Create Candcontext
00087   CandContext cxx(this,cx.GetMom());
00088 
00089 // Get singleton instance of AlgFactory
00090   AlgFactory &af = AlgFactory::GetInstance();
00091 
00092 // Get an AlgHandle to AlgSliceMS with default AlgConfig
00093   AlgHandle ah = af.GetAlgHandle("AlgFitTrackMS","default");
00094 
00095   TIter trackItr(tracklist->GetDaughterIterator());
00096 
00097   Int_t t=0;
00098 
00099   while (CandTrackHandle *track =
00100     dynamic_cast<CandTrackHandle*>(trackItr.Next())) {
00101 
00102     t++;
00103     MSG("FitTrackMS",Msg::kDebug) << "track number " << t << endl;
00104     
00105     cxx.SetDataIn(track);
00106     CandFitTrackMSHandle fittrack = CandFitTrackMS::MakeCandidate(ah,cxx);
00107     ch.AddDaughterLink(fittrack);
00108   }
00109 
00110 }

void AlgFitTrackMSList::Trace ( const char *  c  )  const [virtual]

Reimplemented from AlgBase.

Definition at line 114 of file AlgFitTrackMSList.cxx.

00115 {
00116 }


The documentation for this class was generated from the following files:

Generated on 22 Nov 2017 for loon by  doxygen 1.6.1