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)

Detailed Description

AlgFitTrackSA receives CandTrackListHandle* from the job module and passes CandTrackHandle's one by one to AlgFitTrackSA that does the actual fitting.

Author:
Sergei avva@fnal.gov

Definition at line 18 of file AlgFitTrackSAList.h.


Constructor & Destructor Documentation

AlgFitTrackSAList::AlgFitTrackSAList (  ) 

ctor

Definition at line 38 of file AlgFitTrackSAList.cxx.

00039 {
00040     TracerSA trace("AlgFitTrackSAList::AlgFitTrackSAList()");
00041 }

AlgFitTrackSAList::~AlgFitTrackSAList (  )  [virtual]

dtor

Definition at line 46 of file AlgFitTrackSAList.cxx.

00047 {
00048     TracerSA trace("AlgFitTrackSAList::~AlgFitTrackSAList()");
00049 }


Member Function Documentation

void AlgFitTrackSAList::RunAlg ( AlgConfig ac,
CandHandle cftlh,
CandContext trackListContext 
) [virtual]

RunAlg - get CandTrackHandle's and pass them to AlgFitTrackSA one by one.

Implements AlgBase.

Definition at line 55 of file AlgFitTrackSAList.cxx.

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

00057 {
00058     TracerSA trace("AlgFitTrackSAList::RunAlg(AlgConfig&,CandHandle&,CandContext&)");
00059 
00060     const CandRecord* candrec = trackListContext.GetCandRecord();
00061     assert(candrec && "CandRecord* is NULL!!!");
00062     const CandTrackListHandle* ctlh = 
00063         static_cast<const CandTrackListHandle*> (trackListContext.GetDataIn());
00064     assert(ctlh && "CandTrackListHandle* is NULL!!!");
00065 
00066     // Get singleton instance of AlgFactory
00067     AlgFactory &af = AlgFactory::GetInstance();
00068 
00069     // Get an AlgHandle of FitTrackSAAlgorithm
00070     AlgHandle afth = af.GetAlgHandle(ac.GetCharString("FitTrackSAAlgorithm"), 
00071                                      ac.GetCharString("FitTrackSAAlgConfig"));
00072     
00073     TIter trackItr(ctlh->GetDaughterIterator());
00074     while (CandTrackHandle *track = 
00075                             dynamic_cast<CandTrackHandle*>(trackItr())) {
00076         // Create Candcontext for AlgFitTrackSA
00077         CandContext trackContext(this,trackListContext.GetMom());
00078         // set CandTrackHandle* as the "context data"
00079         trackContext.SetDataIn(track);
00080         // fit track (=== create handle)
00081         CandFitTrackSAHandle fittrack =
00082                             CandFitTrackSA::MakeCandidate(afth,trackContext);
00083         // add fit track to CandFitTrackListHandle daughter list
00084         cftlh.AddDaughterLink(fittrack);
00085     }
00086 
00087 }


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

Generated on 2 Nov 2017 for loon by  doxygen 1.6.1