#include <AlgFitTrack3List.h>
Inheritance diagram for AlgFitTrack3List:

Public Member Functions | |
| AlgFitTrack3List () | |
| virtual | ~AlgFitTrack3List () |
| virtual void | RunAlg (AlgConfig &ac, CandHandle &ch, CandContext &cx) |
| virtual void | Trace (const char *c) const |
|
|
Definition at line 60 of file AlgFitTrack3List.cxx. 00061 {
00062 }
|
|
|
Definition at line 65 of file AlgFitTrack3List.cxx. 00066 {
00067 }
|
|
||||||||||||||||
|
Implements AlgBase. Definition at line 70 of file AlgFitTrack3List.cxx. References CandHandle::AddDaughterLink(), AlgFactory::GetAlgHandle(), CandContext::GetDataIn(), CandHandle::GetDaughterIterator(), AlgFactory::GetInstance(), CandContext::GetMom(), CandFitTrack3::MakeCandidate(), and MSG. 00071 {
00072 MSG("Alg", Msg::kDebug)
00073 << "Starting AlgFitTrack3List::RunAlg()" << endl;
00074
00075 assert(cx.GetDataIn());
00076
00077 if (!(cx.GetDataIn()->InheritsFrom("TObjArray"))) {
00078 return;
00079 }
00080
00081 const CandSliceListHandle *slicelist = 0;
00082 const CandTrackListHandle *tracklist = 0;
00083 const CandTrackSRListHandle *tracksrlist = 0;
00084 const TObjArray *cxin = dynamic_cast<const TObjArray *>(cx.GetDataIn());
00085 for (Int_t i=0; i<=cxin->GetLast(); i++) {
00086 TObject *tobj = cxin->At(i);
00087 if (tobj->InheritsFrom("CandSliceListHandle")) {
00088 slicelist = dynamic_cast<CandSliceListHandle*>(tobj);
00089 }
00090 if (tobj->InheritsFrom("CandTrackListHandle")) {
00091 tracklist = dynamic_cast<CandTrackListHandle*>(tobj);
00092 if (tobj->InheritsFrom("CandTrackSRListHandle")) {
00093 tracksrlist = dynamic_cast<CandTrackSRListHandle*>(tobj);
00094 }
00095 }
00096 }
00097 if (!slicelist || !tracklist) {
00098 MSG("error",Msg::kError) <<
00099 "CandSliceListHandle or CandTrackListHandle missing\n";
00100 }
00101
00102 // Create Candcontext
00103 CandContext cxx(this,cx.GetMom());
00104
00105 // Get singleton instance of AlgFactory
00106 AlgFactory &af = AlgFactory::GetInstance();
00107
00108 // Get an AlgHandle to AlgSliceSR with default AlgConfig
00109 AlgHandle ah = af.GetAlgHandle("AlgFitTrack3","default");
00110
00111 TIter trackItr(tracklist->GetDaughterIterator());
00112
00113 clock_t dummyt;
00114 struct tms t1;
00115 struct tms t2;
00116 // static double ticksPerSecond = sysconf(_SC_CLK_TCK);
00117
00118 while (CandTrackHandle *track = dynamic_cast<CandTrackHandle*>(trackItr())) {
00119 TObjArray cxin;
00120 cxin.Add(track);
00121 // if (tracksrlist) {
00122 // TObjArray *tclist = tracksrlist->GetTrackClusterList();
00123 // assert(tclist);
00124 // for (int i=0; i<=tclist->GetLast(); i++) {
00125 // TrackClusterSR *tc = dynamic_cast<TrackClusterSR*>(tclist->At(i));
00126 // assert(tc);
00127 // MSG("FitTrack3",Msg::kDebug) << "Input TC " << tc->GetPlane() << " " << tc->GetMinStrip() << "/" << tc->GetMaxStrip() << endl;
00128 // }
00129 // cxin.Add(tclist);
00130 // }
00131 cxx.SetDataIn(&cxin);
00132 dummyt = times(&t1);
00133 CandFitTrack3Handle fittrack = CandFitTrack3::MakeCandidate(ah,cxx);
00134 dummyt = times(&t2);
00135 // fittrack.SetCPUTime((Double_t)(t2.tms_utime+t2.tms_stime-t1.tms_utime-t1.tms_stime)/ticksPerSecond);
00136 ch.AddDaughterLink(fittrack);
00137 }
00138
00139 }
|
|
|
Reimplemented from AlgBase. Definition at line 143 of file AlgFitTrack3List.cxx. 00144 {
00145 }
|
1.3.9.1