#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 138 of file NtpFitSAModule.cxx. References CandRecord::FindCandHandle(), NtpFitSARecord::fitsa, JobCModule::GetConfig(), CandHandle::GetDaughterIterator(), CandFitTrackSAHandle::GetFits(), and NtpFitSARecord::ntrack. Referenced by Reco(). 00138 {
00139 //
00140 //
00141 TracerSA trace("NtpFitSA::FillNtpFitSA(NtpFitSARecord* ,const CandRecord*)");
00142
00143 TClonesArray& fitsaarray = *(ntprec->fitsa);
00144
00145 const CandFitTrackListHandle *fitsalisthandle = dynamic_cast <const CandFitTrackListHandle*>
00146 (cndrec->FindCandHandle("",GetConfig().GetCharString("ListOut")));
00147
00148 if ( fitsalisthandle ) {
00149
00150 Int_t nfitsa = 0;
00151
00152 TIter fitsaItr(fitsalisthandle->GetDaughterIterator());
00153 while ( const CandFitTrackSAHandle* fitsahandle = dynamic_cast<const CandFitTrackSAHandle*> (fitsaItr())) {
00154 // increment number of tracks
00155 (ntprec->ntrack)++;
00156 // get array from cand handle
00157 const TClonesArray& fits = fitsahandle->GetFits();
00158 NtpFitSA* ntpfitsa;
00159 for (Int_t i = 0; i<fits.GetEntriesFast(); i++) {
00160 // Uses new with placement to efficiently create strip ntp
00161 ntpfitsa = new((fitsaarray)[nfitsa++]) NtpFitSA(*(NtpFitSA*) fits[i]);
00162 // Transport information from CandFitTrackSA to fitsa ntp
00163 //(*ntpfitsa) = fitsahandle->GetNtpFitSA();
00164 }
00165 }
00166 }
00167 }
|
|
|
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 // Extract header from CandRecord and use this to create RecCandHeader
00120 // and NtpSRRecord.
00121 const CandHeader* cndhdr = cndrec -> GetCandHeader();
00122 const RawDaqSnarlHeader* rawhdr = dynamic_cast<const RawDaqSnarlHeader*> (rawrec -> GetRawHeader());
00123 RecCandHeader ntphdr(rawhdr->GetVldContext(),rawhdr->GetRun(),
00124 rawhdr->GetSubRun(),rawhdr->GetRunType(),rawhdr->GetErrorCode(),
00125 rawhdr->GetSnarl(),rawhdr->GetTrigSrc(),rawhdr->GetTimeFrameNum(), rawhdr->GetRemoteSpillType(),
00126 cndhdr->GetEvent());
00127
00128 NtpFitSARecord* ntprec = new NtpFitSARecord(ntphdr);
00129
00130 this -> FillNtpFitSA(ntprec, cndrec);
00131
00132 mom -> AdoptFragment(ntprec); // pass record to mom to own
00133
00134 return result;
00135 }
|
1.3.9.1