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

Public Member Functions | |
| RawRunEndBlock () | |
| RawRunEndBlock (const Int_t *block) | |
| RawRunEndBlock (const VldContext &vldc_start, const VldTimeStamp &time_end, Int_t run, Short_t subrun, Short_t runtype) | |
| virtual | ~RawRunEndBlock () |
| VldTimeStamp | GetStartTime () const |
| VldTimeStamp | GetEndTime () const |
| Int_t | GetRun () const |
| Short_t | GetSubRun () const |
| Short_t | GetRunType () const |
| Int_t | GetTerminationCode () const |
| Int_t | GetNumberOfSnarls () const |
| Int_t | GetNumberOfNonSnarls () const |
| Int_t | GetNumberOfErrors () const |
| Int_t | GetTotalTimeFrames () const |
| Int_t | GetDroppedTimeFrames () const |
| VldTimeStamp | GetDeadTime () const |
| VldContext | GetVldContext () const |
| virtual std::ostream & | FormatToOStream (std::ostream &os, Option_t *option="") const |
| RawRunEndBlock (const RawRunEndBlock &rhs) | |
Static Public Member Functions | |
| void | SetDebugFlags (const UInt_t dbgflgs) |
| UInt_t | GetDebugFlags () |
Static Private Attributes | |
| UInt_t | fgDebugFlags = 0 |
|
|
Definition at line 51 of file RawRunEndBlock.cxx. 00052 {
00053 // Default constructor
00054 }
|
|
|
Definition at line 57 of file RawRunEndBlock.cxx. 00058 : RawDataBlock(block) 00059 { 00060 // stored block format is: 00061 //--------------------- 00062 // 0 # words in block 00063 // 1 checksum 00064 // 2 Block Id 00065 //----- 00066 // 3 run # 00067 // 4 {subrun#| run type} 00068 // 5 start time (sec) 00069 // 6 start time (nsec) 00070 // 7 end time (sec) 00071 // 8 end time (nsec) 00072 // 9 termination code (reason for run stop) 00073 // 10 number of snarls 00074 // 11 number of non-snarls 00075 // 12 number of errors 00076 // 13 total # of time frames // v1: deadtime (sec) 00077 // 14 # of dropped time frames // v1: deadtime (nsec) 00078 }
|
|
||||||||||||||||||||||||
|
Definition at line 81 of file RawRunEndBlock.cxx. References VldContext::GetDetector(), RawBlockProxy::GetMajorId(), VldTimeStamp::GetNanoSec(), VldTimeStamp::GetSec(), VldContext::GetSimFlag(), VldContext::GetTimeStamp(), RawBlockRegistry::Instance(), RawBlockProxy::IsDCS(), RawBlockRegistry::LookUp(), and rdxsum_fill(). 00084 : RawDataBlock() 00085 { 00086 // Component ctor 00087 00088 fSize = zzzz_last; 00089 fRawBlock = new Int_t [fSize]; 00090 00091 fRawBlock[0] = fSize; 00092 // fRawBlock[1] = checksum... see below 00093 00094 RawBlockRegistry& rbr = RawBlockRegistry::Instance(); 00095 RawBlockProxy* rbp = rbr.LookUp("RawRunEndBlock"); 00096 00097 Bool_t isDCS = rbp->IsDCS(); 00098 Int_t majorId = rbp->GetMajorId(); 00099 Int_t minorId = 0; 00100 RawBlockId rbid(majorId,minorId,isDCS, 00101 vldc_start.GetDetector(),vldc_start.GetSimFlag()); 00102 fRawBlock[2] = rbid.GetEncoded(); 00103 00104 fRawBlock[indx_run] = run; 00105 fRawBlock[indx_subrun] = (subrun&0xffff)<<16 | (runtype&0xffff); 00106 fRawBlock[indx_startsec] = vldc_start.GetTimeStamp().GetSec(); 00107 fRawBlock[indx_startnsec] = vldc_start.GetTimeStamp().GetNanoSec(); 00108 fRawBlock[indx_endsec] = time_end.GetSec(); 00109 fRawBlock[indx_endnsec] = time_end.GetNanoSec(); 00110 fRawBlock[indx_termcode] = 0; 00111 fRawBlock[indx_nsnarls] = -1; 00112 fRawBlock[indx_nnonsnarls] = -1; 00113 fRawBlock[indx_nerrors] = 0; 00114 fRawBlock[indx_deadsec] = 0; 00115 fRawBlock[indx_deadnsec] = 0; 00116 00117 00118 00119 // fill checksum 00120 rdxsum_fill((long*)fRawBlock,0); 00121 }
|
|
|
Definition at line 124 of file RawRunEndBlock.cxx. 00125 {
00126 // dtor
00127 }
|
|
|
Definition at line 55 of file RawRunEndBlock.h. 00056 : RawDataBlock(rhs) { ; }
|
|
||||||||||||
|
Reimplemented from RawDataBlock. Definition at line 247 of file RawRunEndBlock.cxx. References VldTimeStamp::AsString(), fgDebugFlags, RawDataBlock::FormatToOStream(), RawDataBlock::GetBlockId(), GetDeadTime(), GetDroppedTimeFrames(), GetEndTime(), RawBlockId::GetMinor(), VldTimeStamp::GetNanoSec(), GetNumberOfNonSnarls(), GetNumberOfSnarls(), GetRun(), GetRunType(), VldTimeStamp::GetSec(), GetStartTime(), GetSubRun(), GetTotalTimeFrames(), and option. 00249 {
00250
00251 if (fgDebugFlags & kdbg_ForceHexDump) option = "x";
00252
00253 RawDataBlock::FormatToOStream(os,option);
00254 if (option[0] == 'X') return os;
00255
00256 // additional block specific formatted output is done here
00257
00258 os << " Run " << GetRun()
00259 << " SubRun " << GetSubRun()
00260 << " RunType " << GetRunType()
00261 << " : "
00262 << GetNumberOfSnarls() << " snarls, "
00263 << GetNumberOfNonSnarls() << " non-snarls"
00264 << endl;
00265 os << " Start " << GetStartTime().AsString("c") << endl;
00266 os << " End " << GetEndTime().AsString("c") << endl;
00267 if ( GetBlockId().GetMinor() >= 2 ) {
00268 os << " Dropped " << GetDroppedTimeFrames()
00269 << " timeframes out of " << GetTotalTimeFrames() << endl;
00270 }
00271 else {
00272 os << " Dead " << GetDeadTime().GetSec() << "."
00273 << setw(9) << setfill('0') << GetDeadTime().GetNanoSec()
00274 << setfill(' ') << endl;
00275 }
00276
00277 return os;
00278 }
|
|
|
Definition at line 228 of file RawRunEndBlock.cxx. References RawDataBlock::GetBlockId(), RawBlockId::GetMinor(), indx_deadnsec, and indx_deadsec. Referenced by FormatToOStream(). 00229 {
00230 // get the deadtime (only for minor version <2; never was filled by DAQ)
00231
00232 if (fSize > indx_deadnsec && GetBlockId().GetMinor() < 2 )
00233 return VldTimeStamp(fRawBlock[indx_deadsec],fRawBlock[indx_deadnsec]);
00234
00235 return VldTimeStamp((time_t)0,(Int_t)0);
00236 }
|
|
|
Definition at line 52 of file RawRunEndBlock.h. 00052 { return fgDebugFlags; }
|
|
|
Definition at line 217 of file RawRunEndBlock.cxx. References RawDataBlock::GetBlockId(), RawBlockId::GetMinor(), and indx_ndroppedtfs. Referenced by FormatToOStream(), DbuDaqMonitorModule::ProcessRawRecord(), and DbuDaqFileModule::ProcessRawRecord(). 00218 {
00219 // get the number of time frames dropped during the run
00220
00221 if (fSize > indx_ndroppedtfs && GetBlockId().GetMinor() >= 2 )
00222 return fRawBlock[indx_ndroppedtfs];
00223
00224 return -1;
00225 }
|
|
|
Definition at line 140 of file RawRunEndBlock.cxx. References indx_endnsec, and indx_endsec. Referenced by RunSummary::Ana(), FormatToOStream(), GetVldContext(), DbuDaqMonitorModule::ProcessRawRecord(), and DbuDaqFileModule::ProcessRawRecord(). 00141 {
00142 // get the end time
00143 if (fSize > indx_endnsec)
00144 return VldTimeStamp(fRawBlock[indx_endsec],fRawBlock[indx_endnsec]);
00145
00146 return VldTimeStamp((time_t)0,(Int_t)0);
00147 }
|
|
|
Definition at line 198 of file RawRunEndBlock.cxx. Referenced by DbuDaqMonitorModule::ProcessRawRecord(), and DbuDaqFileModule::ProcessRawRecord(). 00199 {
00200 // get the number of errors
00201 if (fSize > indx_nerrors) return fRawBlock[indx_nerrors];
00202 return -1;
00203 }
|
|
|
Definition at line 190 of file RawRunEndBlock.cxx. Referenced by FormatToOStream(), DbuDaqMonitorModule::ProcessRawRecord(), and DbuDaqFileModule::ProcessRawRecord(). 00191 {
00192 // get the number of non-snarls
00193 if (fSize > indx_nnonsnarls) return fRawBlock[indx_nnonsnarls];
00194 return -1;
00195 }
|
|
|
Definition at line 182 of file RawRunEndBlock.cxx. Referenced by RunSummary::Ana(), FormatToOStream(), DbuDaqMonitorModule::ProcessRawRecord(), and DbuDaqFileModule::ProcessRawRecord(). 00183 {
00184 // get the number of snarls
00185 if (fSize > indx_nsnarls) return fRawBlock[indx_nsnarls];
00186 return -1;
00187 }
|
|
|
Definition at line 150 of file RawRunEndBlock.cxx. Referenced by RunSummary::Ana(), RotoObjectifier::BuildRecord(), and FormatToOStream(). 00151 {
00152 // get the run number
00153 if (fSize > indx_run) return fRawBlock[indx_run];
00154 return -1;
00155 }
|
|
|
Definition at line 166 of file RawRunEndBlock.cxx. Referenced by RotoObjectifier::BuildRecord(), and FormatToOStream(). 00167 {
00168 // get the run type
00169 if (fSize > indx_runtype) return fRawBlock[indx_runtype]&0xffff;
00170 return -1;
00171 }
|
|
|
Definition at line 130 of file RawRunEndBlock.cxx. References indx_startnsec, and indx_startsec. Referenced by RunSummary::Ana(), FormatToOStream(), DbuDaqMonitorModule::ProcessRawRecord(), and DbuDaqFileModule::ProcessRawRecord(). 00131 {
00132 // get the start time
00133 if (fSize > indx_startnsec)
00134 return VldTimeStamp(fRawBlock[indx_startsec],fRawBlock[indx_startnsec]);
00135
00136 return VldTimeStamp((time_t)0,(Int_t)0);
00137 }
|
|
|
Definition at line 158 of file RawRunEndBlock.cxx. Referenced by RunSummary::Ana(), RotoObjectifier::BuildRecord(), and FormatToOStream(). 00159 {
00160 // get the subrun number
00161 if (fSize > indx_subrun) return (fRawBlock[indx_subrun]>>16)&0xffff;
00162 return -1;
00163 }
|
|
|
Definition at line 174 of file RawRunEndBlock.cxx. Referenced by RunSummary::Ana(), DbuDaqMonitorModule::ProcessRawRecord(), and DbuDaqFileModule::ProcessRawRecord(). 00175 {
00176 // get the termination code
00177 if (fSize > indx_termcode) return fRawBlock[indx_termcode];
00178 return -1;
00179 }
|
|
|
Definition at line 206 of file RawRunEndBlock.cxx. References RawDataBlock::GetBlockId(), RawBlockId::GetMinor(), and indx_ntimeframes. Referenced by RotoObjectifier::BuildRecord(), FormatToOStream(), DbuDaqMonitorModule::ProcessRawRecord(), and DbuDaqFileModule::ProcessRawRecord(). 00207 {
00208 // get the total number of time frames in the run
00209
00210 if (fSize > indx_ntimeframes && GetBlockId().GetMinor() >= 2 )
00211 return fRawBlock[indx_ntimeframes];
00212
00213 return -1;
00214 }
|
|
|
Definition at line 239 of file RawRunEndBlock.cxx. References RawDataBlock::GetBlockId(), RawBlockId::GetDetector(), GetEndTime(), and RawBlockId::GetSimFlag(). Referenced by RotoObjectifier::BuildRecord(). 00240 {
00241 // build validity context
00242 RawBlockId rbid = GetBlockId();
00243 return VldContext(rbid.GetDetector(),rbid.GetSimFlag(),GetEndTime());
00244 }
|
|
|
Definition at line 51 of file RawRunEndBlock.h. References fgDebugFlags. 00051 {fgDebugFlags=dbgflgs;}
|
|
|
Definition at line 14 of file RawRunEndBlock.cxx. Referenced by FormatToOStream(), and SetDebugFlags(). |
1.3.9.1