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

Public Member Functions | |
| RawTriggerStatsBlock () | |
| RawTriggerStatsBlock (const Int_t *block) | |
| RawTriggerStatsBlock (const VldContext &vldc_start, const VldTimeStamp &time_end, Int_t run, Short_t subrun, Short_t runtype, Int_t nsnarls, Int_t nsrcs, const Int_t *srcid, const Int_t *snarlcnt) | |
| virtual | ~RawTriggerStatsBlock () |
| VldTimeStamp | GetStartTime () const |
| VldTimeStamp | GetEndTime () const |
| Int_t | GetRun () const |
| Short_t | GetSubRun () const |
| Short_t | GetRunType () const |
| Int_t | GetNumberOfSnarls () const |
| Int_t | GetNumberOfSources () const |
| Int_t | GetSourceId (Int_t indx) const |
| Int_t | GetSnarlCount (Int_t indx) const |
| VldContext | GetVldContext () const |
| virtual std::ostream & | FormatToOStream (std::ostream &os, Option_t *option="") const |
| RawTriggerStatsBlock (const RawTriggerStatsBlock &rhs) | |
Static Public Member Functions | |
| void | SetDebugFlags (const UInt_t dbgflgs) |
| UInt_t | GetDebugFlags () |
Static Private Attributes | |
| UInt_t | fgDebugFlags = 0 |
|
|
Definition at line 42 of file RawTriggerStatsBlock.cxx. 00042 : RawDataBlock() 00043 { 00044 // Default constructor 00045 }
|
|
|
Definition at line 48 of file RawTriggerStatsBlock.cxx. 00049 : RawDataBlock(block) 00050 { 00051 // stored block format is: 00052 //--------------------- 00053 // 0 # words in block 00054 // 1 checksum 00055 // 2 Block Id 00056 //----- 00057 // 3 run # 00058 // 4 {subrun#| run type} 00059 // 5 start time (sec) 00060 // 6 start time (nsec) 00061 // 7 end time (sec) 00062 // 8 end time (nsec) 00063 // 9 total number of snarls 00064 // 10 number trigger sources 00065 // 11 src id (index 1) 00066 // 12 # snarls (index 1) 00067 // .. {src id / # snarls} pairs 00068 }
|
|
||||||||||||||||||||||||||||||||||||||||
|
Definition at line 71 of file RawTriggerStatsBlock.cxx. References VldContext::GetDetector(), RawBlockProxy::GetMajorId(), VldTimeStamp::GetNanoSec(), VldTimeStamp::GetSec(), VldContext::GetSimFlag(), VldContext::GetTimeStamp(), RawBlockRegistry::Instance(), RawBlockProxy::IsDCS(), RawBlockRegistry::LookUp(), rdxsum_fill(), and zzzz_last. 00076 : RawDataBlock() 00077 { 00078 // Component ctor 00079 00080 fSize = zzzz_last + 2*nsrcs; 00081 if (fRawBlock) delete [] fRawBlock; 00082 fRawBlock = new Int_t [fSize]; 00083 00084 fRawBlock[0] = fSize; 00085 // fRawBlock[1] = checksum... see below 00086 00087 RawBlockRegistry& rbr = RawBlockRegistry::Instance(); 00088 RawBlockProxy* rbp = rbr.LookUp("RawTriggerStatsBlock"); 00089 00090 Bool_t isDCS = rbp->IsDCS(); 00091 Int_t majorId = rbp->GetMajorId(); 00092 Int_t minorId = 0; 00093 RawBlockId rbid(majorId,minorId,isDCS, 00094 vldc_start.GetDetector(),vldc_start.GetSimFlag()); 00095 fRawBlock[2] = rbid.GetEncoded(); 00096 00097 fRawBlock[indx_run] = run; 00098 fRawBlock[indx_subrun] = (subrun&0xffff)<<16 | (runtype&0xffff); 00099 fRawBlock[indx_startsec] = vldc_start.GetTimeStamp().GetSec(); 00100 fRawBlock[indx_startnsec] = vldc_start.GetTimeStamp().GetNanoSec(); 00101 fRawBlock[indx_endsec] = time_end.GetSec(); 00102 fRawBlock[indx_endnsec] = time_end.GetNanoSec(); 00103 fRawBlock[indx_nsnarls] = nsnarls; 00104 fRawBlock[indx_nsrcs] = nsrcs; 00105 00106 for (Int_t i=0; i<nsrcs; i++) { 00107 Int_t ioff = zzzz_last + 2*i; 00108 fRawBlock[ioff+0] = srcid[i]; 00109 fRawBlock[ioff+1] = snarlcnt[i]; 00110 } 00111 00112 // fill checksum 00113 rdxsum_fill((long*)fRawBlock,0); 00114 }
|
|
|
Definition at line 117 of file RawTriggerStatsBlock.cxx. 00118 {
00119 // dtor
00120 }
|
|
|
Definition at line 51 of file RawTriggerStatsBlock.h. 00052 : RawDataBlock(rhs) { ; }
|
|
||||||||||||
|
Reimplemented from RawDataBlock. Definition at line 209 of file RawTriggerStatsBlock.cxx. References VldTimeStamp::AsString(), RawDataBlock::FormatToOStream(), GetEndTime(), GetNumberOfSnarls(), GetNumberOfSources(), GetRun(), GetRunType(), GetSnarlCount(), GetSourceId(), GetStartTime(), GetSubRun(), and option. 00211 {
00212 RawDataBlock::FormatToOStream(os,option);
00213 if (option[0] == 'X') return os;
00214
00215 // additional block specific formatted output is done here
00216
00217 os << " Start " << GetStartTime().AsString("c") << endl;
00218 os << " End " << GetEndTime().AsString("c") << endl;
00219 os << " Run " << GetRun()
00220 << " SubRun " << GetSubRun()
00221 << " RunType " << GetRunType() << endl;
00222 os << " " << GetNumberOfSnarls() << " snarls from "
00223 << GetNumberOfSources() << " sources: " << endl;
00224 for (int i = 0; i<GetNumberOfSources(); i++) {
00225 os << " src 0x" << hex << GetSourceId(i) << dec
00226 << " gave " << GetSnarlCount(i) << " snarls" << endl;
00227 }
00228
00229 return os;
00230 }
|
|
|
Definition at line 48 of file RawTriggerStatsBlock.h. 00048 { return fgDebugFlags; }
|
|
|
Definition at line 133 of file RawTriggerStatsBlock.cxx. References indx_endnsec, and indx_endsec. Referenced by FormatToOStream(), and GetVldContext(). 00134 {
00135 // get the end time
00136 if (fSize >= zzzz_last)
00137 return VldTimeStamp(fRawBlock[indx_endsec],fRawBlock[indx_endnsec]);
00138
00139 return VldTimeStamp((time_t)0,(Int_t)0);
00140 }
|
|
|
Definition at line 167 of file RawTriggerStatsBlock.cxx. Referenced by FormatToOStream(). 00168 {
00169 // get the total number of snarls
00170 if (fSize >= zzzz_last) return fRawBlock[indx_nsnarls];
00171 return -1;
00172 }
|
|
|
Definition at line 175 of file RawTriggerStatsBlock.cxx. Referenced by FormatToOStream(). 00176 {
00177 // get the number of sources in the list
00178 if (fSize >= zzzz_last) return fRawBlock[indx_nsrcs];
00179 return -1;
00180 }
|
|
|
Definition at line 143 of file RawTriggerStatsBlock.cxx. Referenced by FormatToOStream(). 00144 {
00145 // get the run number
00146 if (fSize >= zzzz_last) return fRawBlock[indx_run];
00147 return -1;
00148 }
|
|
|
Definition at line 159 of file RawTriggerStatsBlock.cxx. Referenced by FormatToOStream(). 00160 {
00161 // get the run type
00162 if (fSize >= zzzz_last) return fRawBlock[indx_runtype]&0xffff;
00163 return -1;
00164 }
|
|
|
Definition at line 192 of file RawTriggerStatsBlock.cxx. References zzzz_last. Referenced by FormatToOStream(). 00193 {
00194 // get the "indx"-th snarl count from the list
00195 Int_t ioff = zzzz_last + 2*indx + 1;
00196 if (fSize >= ioff) return fRawBlock[ioff];
00197 return -1;
00198 }
|
|
|
Definition at line 183 of file RawTriggerStatsBlock.cxx. References zzzz_last. Referenced by FormatToOStream(). 00184 {
00185 // get the "indx"-th source from the list
00186 Int_t ioff = zzzz_last + 2*indx + 0;
00187 if (fSize >= ioff) return fRawBlock[ioff];
00188 return -1;
00189 }
|
|
|
Definition at line 123 of file RawTriggerStatsBlock.cxx. References indx_startnsec, and indx_startsec. Referenced by FormatToOStream(). 00124 {
00125 // get the start time
00126 if (fSize >= zzzz_last)
00127 return VldTimeStamp(fRawBlock[indx_startsec],fRawBlock[indx_startnsec]);
00128
00129 return VldTimeStamp((time_t)0,(Int_t)0);
00130 }
|
|
|
Definition at line 151 of file RawTriggerStatsBlock.cxx. Referenced by FormatToOStream(). 00152 {
00153 // get the subrun number
00154 if (fSize >= zzzz_last) return (fRawBlock[indx_subrun]>>16)&0xffff;
00155 return -1;
00156 }
|
|
|
Definition at line 201 of file RawTriggerStatsBlock.cxx. References RawDataBlock::GetBlockId(), RawBlockId::GetDetector(), GetEndTime(), and RawBlockId::GetSimFlag(). 00202 {
00203 // build validity context
00204 RawBlockId rbid = GetBlockId();
00205 return VldContext(rbid.GetDetector(),rbid.GetSimFlag(),GetEndTime());
00206 }
|
|
|
Definition at line 47 of file RawTriggerStatsBlock.h. References fgDebugFlags. 00047 {fgDebugFlags=dbgflgs;}
|
|
|
Definition at line 14 of file RawTriggerStatsBlock.cxx. Referenced by SetDebugFlags(). |
1.3.9.1