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

Public Member Functions | |
| AlgStripSR () | |
| virtual | ~AlgStripSR () |
| virtual void | RunAlg (AlgConfig &ac, CandHandle &ch, CandContext &cx) |
| virtual void | Trace (const char *c) const |
|
|
Definition at line 41 of file AlgStripSR.cxx. 00042 {
00043 }
|
|
|
Definition at line 46 of file AlgStripSR.cxx. 00047 {
00048 }
|
|
||||||||||||||||
|
Set functions are called to load the CandStrip member variables based on the CandDigit members, and the daughter list is filled. Implements AlgBase. Definition at line 54 of file AlgStripSR.cxx. References CandHandle::AddDaughterLink(), PlexSEIdAltL::GetBestSEId(), CandContext::GetDataIn(), Registry::GetInt(), CandDigitHandle::GetPlexSEIdAltL(), CandStripHandle::GetStripEndId(), UgliStripHandle::GetTPos(), CandHandle::GetVldContext(), CandStripHandle::SetBestStripEndId(), CandStripHandle::SetCalTimeType(), CandStripHandle::SetTPos(), and CandStripHandle::SetZPos(). 00055 {
00056 // M. Kordosky: Jan 19, 2005
00057 // without exception handling this is needed
00058 // contrast with pointer case...
00059 assert(ch.InheritsFrom("CandStripHandle"));
00060 CandStripHandle &csh = dynamic_cast<CandStripHandle &>(ch);
00061
00062 // M. Kordosky: Jan 19, 2005
00063 // see comments in loop below regarding InheritsFrom & dynamic_cast<>
00064 // assert(cx.GetDataIn());
00065 // assert(cx.GetDataIn()->InheritsFrom("TObjArray"));
00066
00067 const TObjArray *tary =
00068 dynamic_cast<const TObjArray*>(cx.GetDataIn());
00069 assert(tary);// test for cx.GetDataIn() returning null and also a bad cast
00070
00071 CalTimeType::CalTimeType_t caltimetype = (CalTimeType::CalTimeType_t)(ac.GetInt("CalTimeType"));
00072
00073
00074 for (Int_t i=0; i<=tary->GetLast(); i++) {
00075 TObject *tobj = tary->At(i);
00076
00077 // M. Kordosky: Jan 19, 2005... noticed while browsing
00078 // don't do this, it does RTTI twice
00079 // assert(tobj->InheritsFrom("CandDigitHandle"));
00080 // CandDigitHandle *cdh = dynamic_cast<CandDigitHandle*>(tobj);
00081 // instead do this
00082 CandDigitHandle *cdh = dynamic_cast<CandDigitHandle*>(tobj);
00083 assert(cdh); // test for both null tobj pointer and bad cast
00084 // or perhaps this
00085 // assert(tobj->InheritsFrom("CandDigitHandle"));
00086 // CandDigitHandle *cdh = static_cast<CandDigitHandle*>(tobj);
00087 // not sure which option is faster... first doesn't use ROOT's RTTI
00088
00089 csh.AddDaughterLink(*cdh);
00090 if (!i) {
00091 UgliGeomHandle ugh(*cdh->GetVldContext());
00092 UgliStripHandle ush =
00093 ugh.GetStripHandle(cdh->GetPlexSEIdAltL().GetBestSEId());
00094 csh.SetBestStripEndId(cdh->GetPlexSEIdAltL().GetBestSEId());
00095 csh.SetZPos(ugh.GetScintPlnHandle(csh.GetStripEndId(StripEnd::kWhole)).GetZ0());
00096 csh.SetTPos(ush.GetTPos());
00097 csh.SetCalTimeType(caltimetype);
00098 }
00099 }
00100 }
|
|
|
Reimplemented from AlgBase. Definition at line 103 of file AlgStripSR.cxx. 00104 {
00105 }
|
1.3.9.1