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

Public Member Functions | |
| FarDetEventModule () | |
| ~FarDetEventModule () | |
| void | BeginJob () |
| JobCResult | Reco (MomNavigator *mom) |
| JobCResult | Ana (const MomNavigator *mom) |
| const Registry & | DefaultConfig () const |
| void | Config (const Registry &r) |
| void | HandleCommand (JobCommand *command) |
| void | EndJob () |
Private Attributes | |
| TString | fListInStrp |
| TString | fListInTrk |
| TString | fListInShw |
| TString | fListInFit |
| TString | fListOut |
|
|
Definition at line 33 of file FarDetEventModule.cxx. 00033 : 00034 fListInStrp("CandStripListHandle"), 00035 fListInTrk("CandTrackListHandle"), 00036 fListInShw("CandShowerListHandle"), 00037 fListInFit("CandFitTrackListHandle"), 00038 fListOut("FarDetEventListHandle") 00039 { 00040 00041 } //===============================================================================================================
|
|
|
Definition at line 43 of file FarDetEventModule.cxx. 00044 {
00045
00046 }
|
|
|
Implement this for read only access to the MomNavigator Reimplemented from JobCModule. Definition at line 176 of file FarDetEventModule.cxx. References MSG. 00177 {
00178 MSG("FarDetEvent",Msg::kDebug) << " *** FarDetEventModule::Ana( ) *** " << endl;
00179
00180 JobCResult result(JobCResult::kPassed);
00181
00182 return result;
00183 }
|
|
|
Implement for notification of begin of job Reimplemented from JobCModule. Definition at line 83 of file FarDetEventModule.cxx. References MSG. 00084 {
00085 MSG("FarDetEvent",Msg::kDebug) << " *** FarDetEventModule::BeginJob( ) *** " << endl;
00086
00087 /*
00088 AlgFactory &af = AlgFactory::GetInstance();
00089 af.Register("AlgFarDetEventList","default","libFarDetEvent.so","AlgConfig");
00090 af.Register("AlgFarDetEvent","default","libFarDetEvent.so","AlgConfig");
00091 */
00092 }
|
|
|
Return the actual configuration. If your module directly pulls its configuration from the fConfig Registry, you don't need to override this. Override if you have local config variables. Reimplemented from JobCModule. Definition at line 64 of file FarDetEventModule.cxx. References fListInFit, fListInShw, fListInStrp, fListInTrk, Registry::Get(), and MSG. 00065 {
00066 MSG("FarDetEvent",Msg::kDebug) << " *** FarDetEventModule::Config( ) *** " << endl;
00067
00068 const char* tmpchar = 0;
00069
00070 if(r.Get("ListInStrp",tmpchar)) fListInStrp = tmpchar;
00071 if(r.Get("ListInTrk",tmpchar)) fListInTrk = tmpchar;
00072 if(r.Get("ListInShw",tmpchar)) fListInShw = tmpchar;
00073 if(r.Get("ListInFit",tmpchar)) fListInFit = tmpchar;
00074
00075 MSG("FarDetEvent",Msg::kDebug) << " configuration: " << endl
00076 << " ListInStrp=" << fListInStrp.Data() << endl
00077 << " ListInTrk=" << fListInTrk.Data() << endl
00078 << " ListInShw=" << fListInShw.Data() << endl
00079 << " ListInFit=" << fListInFit.Data() << endl;
00080 return;
00081 }
|
|
|
Get the default configuration registry. This should normally be overridden. One useful idiom is to implement it like: const Registry& MyModule::DefaultConfig() const { static Registry cfg; // never is destroyed if (cfg.Size()) return cfg; // already filled it // set defaults: cfg.Set("TheAnswer",42); cfg.Set("Units","unknown"); return cfg; } Reimplemented from JobCModule. Definition at line 48 of file FarDetEventModule.cxx. References fListInFit, fListInShw, fListInStrp, fListInTrk, Registry::LockValues(), MSG, Registry::Set(), and Registry::UnLockValues(). 00049 {
00050 MSG("FarDetEvent",Msg::kDebug) << " *** FarDetEventModule::DefaultConfig( ) *** " << endl;
00051
00052 static Registry r;
00053 r.SetName("FarDetEventModule.config.default");
00054 r.UnLockValues();
00055 r.Set("ListInStrp",fListInStrp.Data());
00056 r.Set("ListInTrk",fListInTrk.Data());
00057 r.Set("ListInShw",fListInShw.Data());
00058 r.Set("ListInFit",fListInFit.Data());
00059 r.LockValues();
00060
00061 return r;
00062 }
|
|
|
Implement for notification of end of job Reimplemented from JobCModule. Definition at line 194 of file FarDetEventModule.cxx. References MSG. 00195 {
00196 MSG("FarDetEvent",Msg::kDebug) << " *** FarDetEventModule::EndJob( ) *** " << endl;
00197
00198
00199 }
|
|
|
Implement to handle a JobCommand Reimplemented from JobCModule. Definition at line 185 of file FarDetEventModule.cxx. References JobCommand::PopCmd(), and JobCommand::PopOpt(). 00186 {
00187 TString cmd = command->PopCmd();
00188 if(cmd=="Set"){
00189 TString opt = command->PopOpt();
00190
00191 }
00192 }
|
|
|
Implement this for read-write access to the MomNavigator Reimplemented from JobCModule. Definition at line 94 of file FarDetEventModule.cxx. References CandRecord::FindCandHandle(), fListInFit, fListInShw, fListInStrp, fListInTrk, fListOut, AlgFactory::GetAlgHandle(), MomNavigator::GetFragment(), AlgFactory::GetInstance(), FarDetEventList::MakeCandidate(), MSG, CandRecord::SecureCandHandle(), CandContext::SetCandRecord(), CandContext::SetDataIn(), JobCResult::SetFailed(), CandHandle::SetName(), and CandHandle::SetTitle(). 00095 {
00096 MSG("FarDetEvent",Msg::kDebug) << " *** FarDetEventModule::Reco( ) *** " << endl;
00097
00098 JobCResult result(JobCResult::kPassed);
00099
00100 CandRecord* candrec = dynamic_cast<CandRecord*>(mom->GetFragment("CandRecord","PrimaryCandidateRecord"));
00101 if( candrec==0 )
00102 {
00103 MSG("FarDetEvent",Msg::kDebug) << " *** FAILED TO FIND CANDRECORD *** " << endl;
00104 return result.SetFailed();
00105 }
00106
00107 TObjArray* cxt = new TObjArray();
00108
00109 // Look for CandFitTrackListHandle
00110 CandFitTrackListHandle* fitlist = dynamic_cast<CandFitTrackListHandle*>(candrec->FindCandHandle("CandFitTrackListHandle",fListInFit.Data()));
00111 if( fitlist )
00112 {
00113 MSG("FarDetEvent",Msg::kDebug) << " ... FOUND " << fListInFit.Data() << endl;
00114 }
00115 else
00116 {
00117 MSG("FarDetEvent",Msg::kWarning) << " ... FAILED TO FIND " << fListInFit.Data() << endl;
00118 }
00119 cxt->Add(fitlist);
00120
00121 // Look for CandTrackListHandle
00122 CandTrackListHandle* trklist = dynamic_cast<CandTrackListHandle*>(candrec->FindCandHandle("CandTrackListHandle",fListInTrk.Data()));
00123 if( trklist )
00124 {
00125 MSG("FarDetEvent",Msg::kDebug) << " ... FOUND " << fListInTrk.Data() << endl;
00126 }
00127 else
00128 {
00129 MSG("FarDetEvent",Msg::kWarning) << " ... FAILED TO FIND " << fListInTrk.Data() << endl;
00130 }
00131 cxt->Add(trklist);
00132
00133 // Look for CandShowerListHandle
00134 CandShowerListHandle* shwlist = dynamic_cast<CandShowerListHandle*>(candrec->FindCandHandle("CandShowerListHandle",fListInShw.Data()));
00135 if( shwlist )
00136 {
00137 MSG("FarDetEvent",Msg::kDebug) << " ... FOUND " << fListInShw.Data() << endl;
00138 }
00139 else
00140 {
00141 MSG("FarDetEvent",Msg::kWarning) << " ... FAILED TO FIND " << fListInShw.Data() << endl;
00142 }
00143 cxt->Add(shwlist);
00144
00145 // Look for CandStripListHandle
00146 CandStripListHandle* strplist = dynamic_cast<CandStripListHandle*>(candrec->FindCandHandle("CandStripListHandle",fListInStrp.Data()));
00147 if( strplist )
00148 {
00149 MSG("FarDetEvent",Msg::kDebug) << " ... FOUND " << fListInStrp.Data() << endl;
00150 }
00151 else
00152 {
00153 MSG("FarDetEvent",Msg::kWarning) << " ... FAILED TO FIND " << fListInStrp.Data() << endl;
00154 }
00155 cxt->Add(strplist);
00156
00157 MSG("FarDetEvent",Msg::kDebug) << " MAKING FARDETEVENTLIST " << endl;
00158 AlgFactory &af = AlgFactory::GetInstance();
00159 AlgHandle ah = af.GetAlgHandle("AlgFarDetEventList", "default");
00160
00161 CandContext cx(this, mom);
00162 cx.SetCandRecord(candrec);
00163 cx.SetDataIn(cxt);
00164 FarDetEventListHandle eventlist = FarDetEventList::MakeCandidate(ah,cx);
00165 eventlist.SetName(fListOut.Data());
00166 eventlist.SetTitle(TString("Created by FarDetEventModule"));
00167
00168 candrec->SecureCandHandle(eventlist);
00169
00170 cxt->Clear();
00171 delete cxt;
00172
00173 return result;
00174 }
|
|
|
Definition at line 33 of file FarDetEventModule.h. Referenced by Config(), DefaultConfig(), and Reco(). |
|
|
Definition at line 32 of file FarDetEventModule.h. Referenced by Config(), DefaultConfig(), and Reco(). |
|
|
Definition at line 30 of file FarDetEventModule.h. Referenced by Config(), DefaultConfig(), and Reco(). |
|
|
Definition at line 31 of file FarDetEventModule.h. Referenced by Config(), DefaultConfig(), and Reco(). |
|
|
Definition at line 34 of file FarDetEventModule.h. Referenced by Reco(). |
1.3.9.1