#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 = 0;
00043 Int_t fMaxPlane = 485;
00044 Int_t fCheckInstall = 0;
00045 fMinPlane = ac.GetInt("MinPlane");
00046 fMaxPlane = ac.GetInt("MaxPlane");
00047 fCheckInstall = ac.GetInt("CheckInstall");
00048
00049 MSG("FarDetSlice",Msg::kDebug) << " AlgFarDetSliceList Config: " << endl
00050 << " MinPlane=" << fMinPlane
00051 << " MaxPlane=" << fMaxPlane
00052 << " CheckInstall=" << fCheckInstall << endl;
00053
00054 // Check installation status
00055 if( fCheckInstall ){
00056
00057 // Find maximum installed plane
00058 MSG("FarDetSlice",Msg::kDebug) << " Checking Installation Status: " << endl;
00059 Int_t fMaxInstallPlane = 485, fTmpInstallPlane = 485;
00060 CandRecord* candrec = (CandRecord*)(cx.GetCandRecord());
00061 VldContext *vldc = (VldContext*)(candrec->GetVldContext());
00062 FabPlnInstallLookup fMaxPlaneLookup(*vldc);
00063 PlexPlaneId fMaxPlaneId = fMaxPlaneLookup.GetLastNormalPlane();
00064 if(fMaxPlaneId.IsValid()) fTmpInstallPlane = fMaxPlaneId.GetPlane();
00065 if(fTmpInstallPlane<fMaxInstallPlane) fMaxInstallPlane = fTmpInstallPlane;
00066 MSG("FarDetSlice",Msg::kDebug) << " Maximum Installed Plane=" << fMaxInstallPlane << endl;
00067
00068 // Reset maximum plane
00069 if( fMaxInstallPlane<fMaxPlane ){
00070 MSG("FarDetSlice",Msg::kDebug) << " ... resetting MaxPlane to: " << fMaxInstallPlane << endl;
00071 fMaxPlane=fMaxInstallPlane;
00072 }
00073
00074 // Reset minimum plane
00075 if( fMaxInstallPlane<fMinPlane ){
00076 MSG("FarDetSlice",Msg::kDebug) << " ... resetting MinPlane to: " << fMaxInstallPlane << endl;
00077 fMinPlane=fMaxInstallPlane;
00078 }
00079 }
00080
00081 // Unpack CandContext
00082 const CandStripListHandle* cslh = dynamic_cast<const CandStripListHandle*>(cx.GetDataIn());
00083 TIter strpitr(cslh->GetDaughterIterator());
00084 while(CandStripHandle* csh = dynamic_cast<CandStripHandle*>(strpitr())){
00085 if(csh){
00086 pln = csh->GetPlane();
00087 if( pln>0 && pln<500
00088 && pln>fMinPlane && pln<fMaxPlane ){
00089 fSliceList->Add(csh);
00090 }
00091 }
00092 }
00093
00094 // Make CandSlices
00095 AlgFactory &af = AlgFactory::GetInstance();
00096 AlgHandle ahh = af.GetAlgHandle("AlgFarDetSlice","default");
00097 CandContext cxx(this,cx.GetMom());
00098 cxx.SetCandRecord(cx.GetCandRecord());
00099
00100 cxx.SetDataIn(fSliceList);
00101 FarDetSliceHandle myslice = FarDetSlice::MakeCandidate(ahh,cxx);
00102 myslice.SetName("FarDetSlice");
00103 myslice.SetTitle(TString("Created by AlgFarDetSliceList"));
00104 myslicelist.AddDaughterLink(myslice);
00105
00106 fSliceList->Clear();
00107
00108 }
|
|
|
Reimplemented from AlgBase. Definition at line 110 of file AlgFarDetSliceList.cxx. 00111 {
00112
00113 }
|
|
|
Definition at line 19 of file AlgFarDetSliceList.h. Referenced by RunAlg(). |
1.3.9.1