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

Public Member Functions | |
| RawLIAdcSummaryBlock () | |
| RawLIAdcSummaryBlock (const Int_t *block) | |
| virtual | ~RawLIAdcSummaryBlock () |
| virtual Short_t | GetCalibType () const |
| virtual Short_t | GetCalibPoint () const |
| virtual Short_t | GetPulserBox () const |
| virtual Short_t | GetLed () const |
| virtual Short_t | GetPulseHeight () const |
| virtual Short_t | GetPulseWidth () const |
| virtual Short_t | GetPulses () const |
| virtual Short_t | GetPeriod () const |
| virtual Int_t | GetCount () const |
| virtual VldContext | GetVldContext () const |
| virtual VldTimeStamp | GetTimeStamp () const |
| virtual Int_t | GetSpareSize () const |
| virtual const Int_t * | GetSpares () const |
| Int_t | GetNumberOfSummaries () const |
| const RawLIAdcSummary * | At (Int_t idx) const |
| virtual TIter | GetDatumIter (Bool_t dir=kIterForward) const |
| Int_t | IndexOf (RawLIAdcSummary *rawAdcSum) const |
| virtual std::ostream & | FormatToOStream (std::ostream &os, Option_t *option="") const |
| RawLIAdcSummaryBlock (const RawLIAdcSummaryBlock &rhs) | |
| RawLIAdcSummaryBlock & | operator= (const RawLIAdcSummaryBlock &rhs) |
Static Public Member Functions | |
| void | SetDebugFlags (const UInt_t dbgflgs) |
| UInt_t | GetDebugFlags () |
Protected Member Functions | |
| virtual void | FillRawAdcSums () const |
| const RawLIHeader * | GetHeader () const |
Protected Attributes | |
| RawLIHeader * | fRawLIHeader |
| TObjArray * | fRawCrateStatuses |
| not written out | |
| TObjArray * | fRawAdcSums |
| not written out | |
Static Private Attributes | |
| UInt_t | fgDebugFlags = 0 |
| not written out | |
|
|
Definition at line 37 of file RawLIAdcSummaryBlock.cxx. 00037 : 00038 RawDataBlock(), fRawLIHeader(0), fRawCrateStatuses(0), fRawAdcSums(0) 00039 { 00040 // Default constructor 00041 }
|
|
|
Definition at line 44 of file RawLIAdcSummaryBlock.cxx. 00045 : RawDataBlock(block), 00046 fRawLIHeader(0), fRawCrateStatuses(0), fRawAdcSums(0) 00047 { 00048 // stored block format is: 00049 //--------------------- 00050 // 0 # words in block 00051 // 1 checksum 00052 // 2 Block Id 00053 //----- 00054 // 3 CalibType | CalibPoint# 00055 // 4 PulserBox # | LED # 00056 // 5 PulseHeight | PulseWidth 00057 // 6 # pulses | flashing period 00058 // 7 T0 (1st ROP) sec 00059 // 8 T0 (1st ROP) nsec 00060 // 9 spare field 0 (v0,v1) : # pulses used in this summary (v2) 00061 // 10 spare field 1 (v0,v1) : spare field 0 (v2) 00062 //----- 00063 // 11 Crate # i (+extra) 00064 // 12 # of crate entries (N_i) 00065 //----- 00066 // 13 ChAdd 1_i | # of entries 00067 // 14 Mean*4 | RMS*4 00068 // 15 ChAdd 2_i | # of entries 00069 // 16 Mean*4 | RMS*4 00070 // ... 00071 // ChAdd N_i | # of entries 00072 // Mean*4 | RMS*4 00073 //----- 00074 // x Crate # j (+extra) 00075 // # of crate entries (N_j) 00076 //----- 00077 // ChAdd 1_j | # of entries 00078 // Mean*4 | RMS*4 00079 // ChAdd 2_j | # of entries 00080 // Mean*4 | RMS*4 00081 // ... 00082 // ChAdd N_j | # of entries 00083 // Mean*4 | RMS*4 00084 00085 // version 0: 00086 // 1st 32-bit word: no of entries (16); Chadd (16) 00087 // 2nd 32-bit word: RMS (16); Mean (16) 00088 // Mean and RMS are both scaled by a factor of 4, so that they have a 00089 // two-binal resolution. 00090 00091 // version 1: 00092 // 1st 32-bit word: Chadd (16); no of entries (16) 00093 // 2nd 32-bit word: Mean (16); RMS (16) 00094 // Mean and RMS are both scaled by a factor of 4, so that they have a 00095 // two-binal resolution. 00096 00097 // version 2: 00098 // 1st 32-bit word: Chadd (16); no of entries (16) 00099 // 2nd 32-bit word: Mean (17); RMS (15) 00100 // Mean is scaled by a factor of 4 and RMS scaled by 2. 00101 // Mean is a 2's complement # (ie. when unpacking high order bit 00102 // of the field must be sign extended). 00103 00104 // We're now up to v4 - look in RawLIAdcSummary.cxx 00105 00106 }
|
|
|
Definition at line 109 of file RawLIAdcSummaryBlock.cxx. References fRawAdcSums, fRawCrateStatuses, and fRawLIHeader. 00110 {
00111
00112 if (fRawLIHeader) {
00113 delete fRawLIHeader;
00114 fRawLIHeader = 0;
00115 }
00116
00117 if (fRawAdcSums) {
00118 fRawAdcSums->Delete();
00119 delete fRawAdcSums;
00120 fRawAdcSums = 0;
00121 }
00122 if (fRawCrateStatuses) {
00123 fRawCrateStatuses->Delete();
00124 delete fRawCrateStatuses;
00125 fRawCrateStatuses = 0;
00126 }
00127 return;
00128 }
|
|
|
Definition at line 60 of file RawLIAdcSummaryBlock.h. References fRawAdcSums, fRawCrateStatuses, and fRawLIHeader. 00061 : RawDataBlock(rhs), RawLIHeaderInterface(rhs), 00062 fRawLIHeader(0), fRawCrateStatuses(0), fRawAdcSums(0) { ; }
|
|
|
Definition at line 169 of file RawLIAdcSummaryBlock.cxx. References FillRawAdcSums(), and fRawAdcSums. Referenced by RawLILooker::Ana(), LISummaryAnalyser::Ana(), and LISummaryModule::GetSummaryBlocks(). 00170 {
00171 // create/fill the TObjArray of RawAdcSummarys (if it doesn't exist)
00172 // return pointer to the i-th element
00173
00174 if ( ! fRawAdcSums ) FillRawAdcSums();
00175 return (RawLIAdcSummary*) fRawAdcSums->At(idx);
00176 }
|
|
|
Definition at line 199 of file RawLIAdcSummaryBlock.cxx. References SimFlag::AsString(), fgDebugFlags, fRawAdcSums, fRawCrateStatuses, fRawLIHeader, RawDataBlock::GetBlockId(), RawCrateStatus::GetEntries(), RawBlockId::GetMinor(), RawBlockId::GetSimFlag(), MSG, RawLIAdcSummary::Print(), RawCrateStatus::Print(), and RawLIHeader::Print(). Referenced by At(), GetDatumIter(), GetHeader(), GetNumberOfSummaries(), and IndexOf(). 00200 {
00201 // create the TObjArray of RawAdcSum (if it doesn't exist)
00202
00203 if ( fRawAdcSums ) return; // already filled
00204 if ( fSize <= 0 || fRawBlock == 0) {
00205 MSG("RawData",Msg::kWarning)
00206 << "RawLIAdcSummaryBlock::FillRawAdcSums empty block? "
00207 << fSize << " " << fRawBlock << endl;
00208 // build a dummy header at least
00209 fRawLIHeader = new RawLIHeader;
00210 return;
00211 }
00212
00213 fRawCrateStatuses = new TObjArray();
00214 fRawAdcSums = new TObjArray();
00215 RawCrateStatus *cratestatus = 0;
00216 RawLIAdcSummary *rawAdcSum = 0;
00217 const Int_t *p = fRawBlock;
00218 const Int_t *end = fRawBlock + fSize; // 1 beyond end
00219
00220 RawBlockId rbid = GetBlockId();
00221 Int_t minor = rbid.GetMinor();
00222
00223 p += 3; // skip #words, blockid and checksum
00224
00225 // eat up the common header info
00226 fRawLIHeader = new RawLIHeader(rbid,p);
00227
00228 if (fgDebugFlags&dbg_DumpHeaderOnUnpack) fRawLIHeader->Print();
00229
00230 while (p<end) {
00231 // start a new crate (pointer advanced by RawCrateStatus ctor
00232 cratestatus = new RawCrateStatus(rbid,p);
00233 fRawCrateStatuses->Add(cratestatus);
00234 Int_t npairs = cratestatus->GetEntries();
00235
00236 if (fgDebugFlags&dbg_DumpCrateOnUnpack) cratestatus->Print();
00237
00238 for (Int_t ipair = 0; ipair < npairs; ipair++) {
00239 rawAdcSum = new RawLIAdcSummary(p,cratestatus,minor);
00240 fRawAdcSums->Add(rawAdcSum);
00241
00242 if (fgDebugFlags&dbg_DumpAdcSumOnUnpack) {
00243 std::cout << " i=" << ipair << " ";
00244 rawAdcSum->Print();
00245 }
00246 if (p>end) {
00247 MSG("RawData",Msg::kWarning)
00248 << "RawLIAdcSummaryBlock::FillRawAdcSums crate info seems trashed"
00249 << endl << " SimFlag " << SimFlag::AsString(rbid.GetSimFlag())
00250 << endl;
00251 break;
00252 }
00253 }
00254 }
00255
00256 }
|
|
||||||||||||
|
Reimplemented from RawDataBlock. Definition at line 259 of file RawLIAdcSummaryBlock.cxx. References RawDataBlock::FormatToOStream(), GetDatumIter(), GetHeader(), and option. 00261 {
00262 RawDataBlock::FormatToOStream(os,option);
00263 if (option[0] == 'X') return os;
00264
00265 TIter iter = GetDatumIter();
00266
00267 const RawLIHeader* header = GetHeader();
00268 os << (*header);
00269
00270 os << " " << "Channel "
00271 << "entries"
00272 << " " << " Mean" << " "
00273 << " " << " RMS" << " "
00274 << endl;
00275
00276 TObject *tobj;
00277 RawLIAdcSummary *usum;
00278 while ( ( tobj = iter.Next() ) ) {
00279 usum = dynamic_cast<RawLIAdcSummary *>(tobj);
00280 if (usum) os << (*usum);
00281 }
00282 os << endl;
00283
00284 return os;
00285
00286 }
|
|
|
Implements RawLIHeaderInterface. Definition at line 92 of file RawLIAdcSummaryBlock.h. References RawLIHeader::GetCalibPoint(), and GetHeader(). Referenced by PulserSummaryList::Add(), RawLILooker::Ana(), LIStreamHunter::Ana(), LISummaryModule::GetSummaryBlocks(), PulserFromRawLiBlock::New(), DQLightInjection::Process(), FarDetDataQualityModule::ProcessBlock(), PulserSummaryList::PulserSummaryList(), and PulserSummaryModule::Reco(). 00093 { return GetHeader()->GetCalibPoint(); }
|
|
|
Implements RawLIHeaderInterface. Definition at line 89 of file RawLIAdcSummaryBlock.h. References RawLIHeader::GetCalibType(), and GetHeader(). Referenced by PulserSummaryList::Add(), RawLILooker::Ana(), LISummaryModule::GetSummaryBlocks(), PulserFromRawLiBlock::New(), DQLightInjection::Process(), FarDetDataQualityModule::ProcessBlock(), PulserSummaryList::PulserSummaryList(), and PulserSummaryModule::Reco(). 00090 { return GetHeader()->GetCalibType(); }
|
|
|
Implements RawLIHeaderInterface. Definition at line 113 of file RawLIAdcSummaryBlock.h. References RawLIHeader::GetCount(), and GetHeader(). Referenced by PulserFromRawLiBlock::New().
|
|
|
Definition at line 179 of file RawLIAdcSummaryBlock.cxx. References FillRawAdcSums(), and fRawAdcSums. Referenced by PulserSummaryList::Add(), FormatToOStream(), and PEGainModule::MakeDebugTree(). 00180 {
00181 // create/fill the TObjArray of RawAdcSummarys (if it doesn't exist)
00182 // return an iterator to look over them
00183
00184 if ( ! fRawAdcSums ) FillRawAdcSums();
00185 return TIter(fRawAdcSums,dir);
00186 }
|
|
|
Definition at line 57 of file RawLIAdcSummaryBlock.h. 00057 { return fgDebugFlags; }
|
|
|
Definition at line 86 of file RawLIAdcSummaryBlock.h. References FillRawAdcSums(). Referenced by FormatToOStream(), GetCalibPoint(), GetCalibType(), GetCount(), GetLed(), GetPeriod(), GetPulseHeight(), GetPulserBox(), GetPulses(), GetPulseWidth(), GetSpares(), GetSpareSize(), GetTimeStamp(), and GetVldContext(). 00087 { if (!fRawLIHeader) FillRawAdcSums(); return fRawLIHeader; }
|
|
|
|
Definition at line 159 of file RawLIAdcSummaryBlock.cxx. References FillRawAdcSums(), and fRawAdcSums. Referenced by PulserSummaryList::Add(), RawLILooker::Ana(), LISummaryAnalyser::Ana(), LIStreamHunter::Ana(), LISummaryModule::GetSummaryBlocks(), and PulserFromRawFilterModule::Reco(). 00160 {
00161 // create/fill the TObjArray of RawAdcSummarys (if it doesn't exist)
00162 // return the number of entries
00163
00164 if ( ! fRawAdcSums ) FillRawAdcSums();
00165 return fRawAdcSums->GetEntriesFast(); // known not to have gaps
00166 }
|
|
|
Implements RawLIHeaderInterface. Definition at line 110 of file RawLIAdcSummaryBlock.h. References GetHeader(), and RawLIHeader::GetPeriod(). Referenced by RawLILooker::Ana(), LISummaryModule::GetSummaryBlocks(), and PulserFromRawLiBlock::New().
|
|
|
Implements RawLIHeaderInterface. Definition at line 101 of file RawLIAdcSummaryBlock.h. References GetHeader(), and RawLIHeader::GetPulseHeight(). Referenced by PulserSummaryList::Add(), RawLILooker::Ana(), LISummaryAnalyser::Ana(), LIStreamHunter::Ana(), PEGainModule::DoMeanSigmaFromData(), LISummaryModule::GetSummaryBlocks(), PEGainModule::MakeDebugTree(), PEGainModule::MakeHistosFromData(), PulserFromRawLiBlock::New(), DQLightInjection::Process(), FarDetDataQualityModule::ProcessBlock(), PulserSummaryList::PulserSummaryList(), PulserFromRawModule::Reco(), and PulserFromRawFilterModule::Reco(). 00102 { return GetHeader()->GetPulseHeight(); }
|
|
|
Implements RawLIHeaderInterface. Definition at line 95 of file RawLIAdcSummaryBlock.h. References GetHeader(), and RawLIHeader::GetPulserBox(). Referenced by PulserSummaryList::Add(), RawLILooker::Ana(), LISummaryAnalyser::Ana(), LIStreamHunter::Ana(), PEGainModule::DoMeanSigmaFromData(), LISummaryModule::GetSummaryBlocks(), PEGainModule::MakeDebugTree(), PEGainModule::MakeHistosFromData(), PulserFromRawLiBlock::New(), DQLightInjection::Process(), FarDetDataQualityModule::ProcessBlock(), PulserSummaryList::PulserSummaryList(), and PulserSummaryModule::Reco(). 00096 { return GetHeader()->GetPulserBox(); }
|
|
|
Implements RawLIHeaderInterface. Definition at line 107 of file RawLIAdcSummaryBlock.h. References GetHeader(), and RawLIHeader::GetPulses(). Referenced by RawLILooker::Ana(), LISummaryAnalyser::Ana(), LISummaryModule::GetSummaryBlocks(), PulserFromRawLiBlock::New(), and PulserSummaryList::PulserSummaryList().
|
|
|
Implements RawLIHeaderInterface. Definition at line 104 of file RawLIAdcSummaryBlock.h. References GetHeader(), and RawLIHeader::GetPulseWidth(). Referenced by PulserSummaryList::Add(), RawLILooker::Ana(), LIStreamHunter::Ana(), LISummaryModule::GetSummaryBlocks(), PEGainModule::MakeDebugTree(), PulserFromRawLiBlock::New(), DQLightInjection::Process(), FarDetDataQualityModule::ProcessBlock(), and PulserSummaryList::PulserSummaryList(). 00105 { return GetHeader()->GetPulseWidth(); }
|
|
|
Implements RawLIHeaderInterface. Definition at line 125 of file RawLIAdcSummaryBlock.h. References GetHeader(), and RawLIHeader::GetSpares().
|
|
|
Implements RawLIHeaderInterface. Definition at line 122 of file RawLIAdcSummaryBlock.h. References RawLIHeader::GetCalibType(), and GetHeader(). 00123 { return GetHeader()->GetCalibType(); }
|
|
|
Implements RawLIHeaderInterface. Definition at line 119 of file RawLIAdcSummaryBlock.h. References GetHeader(), and RawLIHeader::GetTimeStamp(). Referenced by RawLILooker::Ana(), LISummaryAnalyser::Ana(), LIStreamHunter::Ana(), RotoObjectifier::BuildRecord(), LISummaryModule::GetSummaryBlocks(), and PulserFromRawLiBlock::New(). 00120 { return GetHeader()->GetTimeStamp(); }
|
|
|
Implements RawLIHeaderInterface. Definition at line 116 of file RawLIAdcSummaryBlock.h. References GetHeader(), and RawLIHeader::GetVldContext(). Referenced by PulserSummaryList::Add(), RawLILooker::Ana(), PEGainModule::DoMeanSigmaFromData(), LISummaryModule::GetSummaryBlocks(), PEGainModule::MakeDebugTree(), PEGainModule::MakeHistosFromData(), PulserFromRawLiBlock::New(), DQLightInjection::Process(), and PulserSummaryList::PulserSummaryList(). 00117 { return GetHeader()->GetVldContext(); }
|
|
|
Definition at line 189 of file RawLIAdcSummaryBlock.cxx. References FillRawAdcSums(), and fRawAdcSums. 00190 {
00191 // create/fill the TObjArray of RawAdcSummarys (if it doesn't exist)
00192 // return the index for this object (if contained in the list)
00193
00194 if ( ! fRawAdcSums ) FillRawAdcSums();
00195 return fRawAdcSums->IndexOf(rawAdcSum);
00196 }
|
|
|
Definition at line 132 of file RawLIAdcSummaryBlock.cxx. References fRawAdcSums, fRawCrateStatuses, fRawLIHeader, and RawDataBlock::operator=(). 00133 {
00134
00135 // deep copy assignment
00136 if (this != &rhs) {
00137 RawDataBlock::operator=(rhs);
00138
00139 if (fRawLIHeader) {
00140 delete fRawLIHeader;
00141 fRawLIHeader = 0;
00142 }
00143
00144 if (fRawAdcSums) {
00145 fRawAdcSums->Delete();
00146 delete fRawAdcSums;
00147 fRawAdcSums = 0;
00148 }
00149 if (fRawCrateStatuses) {
00150 fRawCrateStatuses->Delete();
00151 delete fRawCrateStatuses;
00152 fRawCrateStatuses = 0;
00153 }
00154 }
00155 return *this;
00156 }
|
|
|
Definition at line 56 of file RawLIAdcSummaryBlock.h. References fgDebugFlags. 00056 {fgDebugFlags=dbgflgs;}
|
|
|
not written out
Definition at line 21 of file RawLIAdcSummaryBlock.cxx. Referenced by FillRawAdcSums(), and SetDebugFlags(). |
|
|
not written out
Definition at line 76 of file RawLIAdcSummaryBlock.h. Referenced by At(), FillRawAdcSums(), GetDatumIter(), GetNumberOfSummaries(), IndexOf(), operator=(), RawLIAdcSummaryBlock(), and ~RawLIAdcSummaryBlock(). |
|
|
not written out
Definition at line 75 of file RawLIAdcSummaryBlock.h. Referenced by FillRawAdcSums(), operator=(), RawLIAdcSummaryBlock(), and ~RawLIAdcSummaryBlock(). |
|
|
Definition at line 74 of file RawLIAdcSummaryBlock.h. Referenced by FillRawAdcSums(), operator=(), RawLIAdcSummaryBlock(), and ~RawLIAdcSummaryBlock(). |
1.3.9.1