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

Public Member Functions | |
| AlgFarDetSliceList () | |
| virtual | ~AlgFarDetSliceList () |
| virtual void | RunAlg (AlgConfig &ac, CandHandle &ch, CandContext &cx) |
| virtual void | Trace (const char *c) const |
Private Attributes | |
| TObjArray * | fSliceList |
|
|
Definition at line 23 of file AlgFarDetSliceList.cxx. 00023 : 00024 fSliceList(0) 00025 { 00026 fSliceList = new TObjArray(); 00027 }
|
|
|
Definition at line 29 of file AlgFarDetSliceList.cxx. 00030 {
00031 if(fSliceList) delete fSliceList;
00032 }
|
|
||||||||||||||||
|
Implements AlgBase. Definition at line 34 of file AlgFarDetSliceList.cxx. References CandHandle::AddDaughterLink(), fSliceList, AlgFactory::GetAlgHandle(), CandContext::GetCandRecord(), CandContext::GetDataIn(), CandHandle::GetDaughterIterator(), AlgFactory::GetInstance(), Registry::GetInt(), FabPlnInstallLookup::GetLastNormalPlane(), CandContext::GetMom(), CandStripHandle::GetPlane(), PlexPlaneId::GetPlane(), RecMinos::GetVldContext(), PlexPlaneId::IsValid(), FarDetSlice::MakeCandidate(), MSG, CandHandle::SetName(), and CandHandle::SetTitle(). 00035 {
00036 MSG("FarDetSlice",Msg::kDebug) << " AlgFarDetSliceList::RunAlg(...) " << endl;
00037
00038 FarDetSliceListHandle& myslicelist = dynamic_cast<FarDetSliceListHandle&>(ch);
00039
00040 // Unpack AlgConfig
00041 Int_t pln;
00042 Int_t fMinPlane,fMaxPlane;
00043 fMinPlane = ac.GetInt("MinPlane");
00044 fMaxPlane = ac.GetInt("MaxPlane");
00045
00046 MSG("FarDetSlice",Msg::kDebug) << " AlgFarDetSliceList Config: " << endl
00047 << " MinPlane=" << fMinPlane
00048 << " MaxPlane=" << fMaxPlane << endl;
00049
00050
00051 // Find Max Installed Plane
00052 Int_t fTmpInstallPlane=485,fMaxInstallPlane=485;
00053 CandRecord* candrec = (CandRecord*)(cx.GetCandRecord());
00054 VldContext *vldc = (VldContext*)(candrec->GetVldContext());
00055 FabPlnInstallLookup fMaxPlaneLookup(*vldc);
00056 PlexPlaneId fMaxPlaneId = fMaxPlaneLookup.GetLastNormalPlane();
00057 if(fMaxPlaneId.IsValid()) fTmpInstallPlane = fMaxPlaneId.GetPlane();
00058 if(fTmpInstallPlane<fMaxInstallPlane) fMaxInstallPlane=fTmpInstallPlane;
00059 MSG("FarDetSlice",Msg::kDebug) << " MaxInstallPlane=" << fMaxInstallPlane << endl;
00060
00061 if(fMaxInstallPlane<fMaxPlane){
00062 MSG("FarDetSlice",Msg::kDebug) << " ... resetting MaxPlane to: " << fMaxInstallPlane << endl;
00063 fMaxPlane=fMaxInstallPlane;
00064 }
00065
00066 if(fMaxInstallPlane<fMinPlane){
00067 MSG("FarDetSlice",Msg::kDebug) << " ... resetting MinPlane to: " << fMaxInstallPlane << endl;
00068 fMinPlane=fMaxInstallPlane;
00069 }
00070
00071 // Unpack CandContext
00072 const CandStripListHandle* cslh = dynamic_cast<const CandStripListHandle*>(cx.GetDataIn());
00073 TIter strpitr(cslh->GetDaughterIterator());
00074 while(CandStripHandle* csh = dynamic_cast<CandStripHandle*>(strpitr())){
00075 if(csh){
00076 pln = csh->GetPlane();
00077 if( pln>0 && pln<500
00078 && pln>fMinPlane && pln<fMaxPlane ){
00079 fSliceList->Add(csh);
00080 }
00081 }
00082 }
00083
00084 // Make CandSlices
00085 AlgFactory &af = AlgFactory::GetInstance();
00086 AlgHandle ahh = af.GetAlgHandle("AlgFarDetSlice","default");
00087 CandContext cxx(this,cx.GetMom());
00088 cxx.SetCandRecord(cx.GetCandRecord());
00089
00090 cxx.SetDataIn(fSliceList);
00091 FarDetSliceHandle myslice = FarDetSlice::MakeCandidate(ahh,cxx);
00092 myslice.SetName("FarDetSlice");
00093 myslice.SetTitle(TString("Created by AlgFarDetSliceList"));
00094 myslicelist.AddDaughterLink(myslice);
00095
00096 fSliceList->Clear();
00097
00098 }
|
|
|
Reimplemented from AlgBase. Definition at line 100 of file AlgFarDetSliceList.cxx. 00101 {
00102
00103 }
|
|
|
Definition at line 19 of file AlgFarDetSliceList.h. Referenced by RunAlg(). |
1.3.9.1