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

Public Member Functions | |
| NtpFitSAModule () | |
| ~NtpFitSAModule () | |
| const Registry & | DefaultConfig () const |
| void | Config (const Registry &r) |
| JobCResult | Reco (MomNavigator *mom) |
Private Member Functions | |
| void | FillNtpFitSA (NtpFitSARecord *ntprec, const CandRecord *cndrec) |
|
|
Definition at line 20 of file NtpFitSAModule.h. 00020 {}
|
|
|
Definition at line 21 of file NtpFitSAModule.h. 00021 {}
|
|
|
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 81 of file NtpFitSAModule.cxx. 00081 {
00082 //
00083 // Purpose: Configure the module given a registry.
00084 //
00085 // Arguments: Registry to use to configure the module.
00086 //
00087 // Return: none.
00088 //
00089
00090 TracerSA trace("NtpFitSAModule::Config(const Registry&)");
00091
00092 // Int_t tmpi;
00093 // Double_t tmpd;
00094 // const Char_t* tmps;
00095
00096
00097 }
|
|
|
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 54 of file NtpFitSAModule.cxx. References JobCModule::GetName(), Registry::LockValues(), Registry::Set(), and Registry::UnLockValues(). 00054 {
00055 //
00056 // Purpose: Method to return default configuration.
00057 //
00058 // Arguments: none.
00059 //
00060 // Return: Registry containing default configuration
00061 //
00062
00063 TracerSA trace("NtpFitSAModule::DefaultConfig()");;
00064
00065 static Registry r;
00066 std::string name = this->JobCModule::GetName();
00067 name += ".config.default";
00068 r.SetName(name.c_str());
00069
00070 r.UnLockValues();
00071
00072 r.Set("ListOut", "CandFitTrackSAList"); // Name of the output list
00073
00074 r.LockValues();
00075
00076 return r;
00077 }
|
|
||||||||||||
|
Definition at line 143 of file NtpFitSAModule.cxx. References CandRecord::FindCandHandle(), NtpFitSARecord::fitsa, JobCModule::GetConfig(), CandHandle::GetDaughterIterator(), CandFitTrackSAHandle::GetFits(), and NtpFitSARecord::ntrack. Referenced by Reco(). 00143 {
00144 //
00145 //
00146 TracerSA trace("NtpFitSA::FillNtpFitSA(NtpFitSARecord* ,const CandRecord*)");
00147
00148 TClonesArray& fitsaarray = *(ntprec->fitsa);
00149
00150 const CandFitTrackListHandle *fitsalisthandle = dynamic_cast <const CandFitTrackListHandle*>
00151 (cndrec->FindCandHandle("",GetConfig().GetCharString("ListOut")));
00152
00153 if ( fitsalisthandle ) {
00154
00155 Int_t nfitsa = 0;
00156
00157 TIter fitsaItr(fitsalisthandle->GetDaughterIterator());
00158 while ( const CandFitTrackSAHandle* fitsahandle = dynamic_cast<const CandFitTrackSAHandle*> (fitsaItr())) {
00159 // increment number of tracks
00160 (ntprec->ntrack)++;
00161 // get array from cand handle
00162 const TClonesArray& fits = fitsahandle->GetFits();
00163 NtpFitSA* ntpfitsa;
00164 for (Int_t i = 0; i<fits.GetEntriesFast(); i++) {
00165 // Uses new with placement to efficiently create strip ntp
00166 ntpfitsa = new((fitsaarray)[nfitsa++]) NtpFitSA(*(NtpFitSA*) fits[i]);
00167 // Transport information from CandFitTrackSA to fitsa ntp
00168 //(*ntpfitsa) = fitsahandle->GetNtpFitSA();
00169 }
00170 }
00171 }
00172 }
|
|
|
Implement this for read-write access to the MomNavigator Reimplemented from JobCModule. Definition at line 101 of file NtpFitSAModule.cxx. References FillNtpFitSA(), DataUtil::GetCandHeader(), RawDaqSnarlHeader::GetErrorCode(), CandHeader::GetEvent(), MomNavigator::GetFragment(), DataUtil::GetRawHeader(), RawDaqSnarlHeader::GetRemoteSpillType(), RawDaqHeader::GetRun(), RawDaqHeader::GetRunType(), RawDaqSnarlHeader::GetSnarl(), RawDaqHeader::GetSubRun(), RawDaqHeader::GetTimeFrameNum(), RawDaqSnarlHeader::GetTrigSrc(), and RecMinosHdr::GetVldContext(). 00101 {
00102 //
00103 // Purpose: Create and fill ntuple record.
00104 //
00105 // Arguments: mom.
00106 //
00107 // Return: status.
00108 //
00109
00110 TracerSA trace("NtpFitSAModule::Reco(MomNavigator*)");
00111
00112 JobCResult result(JobCResult::kPassed); // The default result
00113
00114 const RawRecord* rawrec = dynamic_cast<const RawRecord*>(mom->GetFragment("RawRecord","","DaqSnarl"));
00115
00116 CandRecord* cndrec = dynamic_cast<CandRecord*>
00117 (mom->GetFragment("CandRecord","PrimaryCandidateRecord"));
00118
00119 // Check if there actually are records in mom before trying to use them!
00120 if ( !rawrec || !cndrec ) {
00121 return JobCResult::kFailed;
00122 }
00123
00124 // Extract header from CandRecord and use this to create RecCandHeader
00125 // and NtpSRRecord.
00126 const CandHeader* cndhdr = cndrec -> GetCandHeader();
00127 const RawDaqSnarlHeader* rawhdr = dynamic_cast<const RawDaqSnarlHeader*> (rawrec -> GetRawHeader());
00128 RecCandHeader ntphdr(rawhdr->GetVldContext(),rawhdr->GetRun(),
00129 rawhdr->GetSubRun(),rawhdr->GetRunType(),rawhdr->GetErrorCode(),
00130 rawhdr->GetSnarl(),rawhdr->GetTrigSrc(),rawhdr->GetTimeFrameNum(), rawhdr->GetRemoteSpillType(),
00131 cndhdr->GetEvent());
00132
00133 NtpFitSARecord* ntprec = new NtpFitSARecord(ntphdr);
00134
00135 this -> FillNtpFitSA(ntprec, cndrec);
00136
00137 mom -> AdoptFragment(ntprec); // pass record to mom to own
00138
00139 return result;
00140 }
|
1.3.9.1