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

Public Member Functions | |
| RawSnarlHeaderBlock () | |
| RawSnarlHeaderBlock (const Int_t *block) | |
| RawSnarlHeaderBlock (const VldContext &vldc, Int_t run, Short_t subrun, Short_t runtype, Int_t timeframe, Int_t snarl, Int_t trigsrc, Int_t err, Int_t nrawdigits, Int_t spilltype=0) | |
| virtual | ~RawSnarlHeaderBlock () |
| VldTimeStamp | GetTriggerTime () const |
| Int_t | GetRun () const |
| Short_t | GetSubRun () const |
| Short_t | GetRunType () const |
| Int_t | GetTimeFrameNum () const |
| Int_t | GetSnarl () const |
| Int_t | GetTriggerSource () const |
| Int_t | GetErrorCode () const |
| Int_t | GetNumRawDigits () const |
| Int_t | GetRemoteSpillType () const |
| VldContext | GetVldContext () const |
| Int_t | GetTimeFrameNo () const |
| virtual std::ostream & | FormatToOStream (std::ostream &os, Option_t *option="") const |
| RawSnarlHeaderBlock (const RawSnarlHeaderBlock &rhs) | |
Static Public Member Functions | |
| void | SetDebugFlags (const UInt_t dbgflgs) |
| UInt_t | GetDebugFlags () |
Static Private Attributes | |
| UInt_t | fgDebugFlags = 0 |
|
|
Definition at line 46 of file RawSnarlHeaderBlock.cxx. 00047 {
00048 // Default constructor
00049 }
|
|
|
Definition at line 52 of file RawSnarlHeaderBlock.cxx. 00053 : RawDataBlock(block) 00054 { 00055 // stored block format is: 00056 // version 0 version 1, 2 00057 //--- --------------- ---------------- 00058 // 0 # words in block # words in block 00059 // 1 checksum checksum 00060 // 2 Block Id Block Id 00061 //--- 00062 // 3 run # run # 00063 // 4 {subrun #| run type} {subrun #| run type} 00064 // 5 trigger time (sec) trigger time (sec) 00065 // 6 trigger time (nsec) trigger time (nsec) 00066 // 7 snarl # timeframe # 00067 // 8 trigger source snarl # 00068 // 9 error code trigger source 00069 // 10 error code 00070 // 11 # of raw digits in crate block ( >= v2 only ) 00071 // 12 remote spill type ( >= v3 only ) 00072 }
|
|
||||||||||||||||||||||||||||||||||||||||||||
|
Definition at line 74 of file RawSnarlHeaderBlock.cxx. References VldContext::GetDetector(), RawBlockProxy::GetMajorId(), VldTimeStamp::GetNanoSec(), VldTimeStamp::GetSec(), VldContext::GetSimFlag(), VldContext::GetTimeStamp(), RawBlockRegistry::Instance(), RawBlockProxy::IsDCS(), RawBlockRegistry::LookUp(), and rdxsum_fill(). 00078 : RawDataBlock() 00079 { 00080 // Component ctor 00081 00082 fSize = zzzz_last; 00083 fRawBlock = new Int_t [fSize]; 00084 00085 fRawBlock[0] = fSize; 00086 // fRawBlock[1] = checksum... see below 00087 00088 RawBlockRegistry& rbr = RawBlockRegistry::Instance(); 00089 RawBlockProxy* rbp = rbr.LookUp("RawSnarlHeaderBlock"); 00090 00091 Bool_t isDCS = rbp->IsDCS(); 00092 Int_t majorId = rbp->GetMajorId(); 00093 Int_t minorId = 3; // latest and greatest minor version # 00094 RawBlockId rbid(majorId,minorId,isDCS, 00095 vldc.GetDetector(),vldc.GetSimFlag()); 00096 fRawBlock[2] = rbid.GetEncoded(); 00097 00098 fRawBlock[indx_run] = run; 00099 fRawBlock[indx_subrun] = (subrun&0xffff)<<16 | (runtype&0xffff); 00100 fRawBlock[indx_sec] = vldc.GetTimeStamp().GetSec(); 00101 fRawBlock[indx_nsec] = vldc.GetTimeStamp().GetNanoSec(); 00102 fRawBlock[indx_tf] = timeframe; 00103 00104 fRawBlock[indx_snarl] = snarl; 00105 fRawBlock[indx_trigsrc] = trigsrc; 00106 fRawBlock[indx_errcode] = err; 00107 fRawBlock[indx_nrdigit] = nrawdigits; 00108 fRawBlock[indx_spilltype] = spilltype; 00109 00110 // fill checksum 00111 rdxsum_fill((long*)fRawBlock,0); 00112 }
|
|
|
Definition at line 115 of file RawSnarlHeaderBlock.cxx. 00116 {
00117 // dtor
00118 }
|
|
|
Definition at line 55 of file RawSnarlHeaderBlock.h. 00056 : RawDataBlock(rhs) { ; }
|
|
||||||||||||
|
Reimplemented from RawDataBlock. Definition at line 223 of file RawSnarlHeaderBlock.cxx. References VldTimeStamp::AsString(), fgDebugFlags, RawDataBlock::FormatToOStream(), GetErrorCode(), RawDataBlock::GetMinorId(), GetNumRawDigits(), GetRemoteSpillType(), GetRun(), GetRunType(), GetSnarl(), GetSubRun(), GetTimeFrameNo(), GetTriggerSource(), GetTriggerTime(), and option. 00225 {
00226
00227 if (fgDebugFlags & kdbg_ForceHexDump) option = "x";
00228
00229 RawDataBlock::FormatToOStream(os,option);
00230 if (option[0] == 'X') return os;
00231
00232 // additional block specific formatted output is done here
00233 int minorid = GetMinorId();
00234
00235 os << " TriggerTime " << GetTriggerTime().AsString("c") << endl;
00236 os << " Run " << GetRun()
00237 << " SubRun " << GetSubRun()
00238 << " RunType " << GetRunType();
00239 if (minorid > 0) {
00240 os << " TimeFrame " << GetTimeFrameNo();
00241 }
00242 os << endl;
00243 os << " Snarl " << GetSnarl()
00244 << " TrigSource " << GetTriggerSource()
00245 << " ErrorCode " << GetErrorCode();
00246 if (minorid > 1) {
00247 os << " # RawDigits " << GetNumRawDigits();
00248 }
00249 if (minorid > 2) {
00250 os << " RemoteSpillType " << GetRemoteSpillType();
00251 }
00252 os << endl;
00253
00254 return os;
00255 }
|
|
|
Definition at line 52 of file RawSnarlHeaderBlock.h. 00052 { return fgDebugFlags; }
|
|
|
Definition at line 186 of file RawSnarlHeaderBlock.cxx. References RawDataBlock::GetMinorId(). Referenced by RotoObjectifier::BuildRecord(), FormatToOStream(), and DQHeader::Process(). 00187 {
00188 // get the trigger source
00189
00190 int indx_errcode_v = indx_errcode;
00191 if (GetMinorId() <= 0) indx_errcode_v--;
00192 if (fSize > indx_errcode_v) return fRawBlock[indx_errcode_v];
00193 return -1;
00194 }
|
|
|
Definition at line 197 of file RawSnarlHeaderBlock.cxx. Referenced by RotoObjectifier::BuildRecord(), and FormatToOStream(). 00198 {
00199 // get the # of raw digits in crate readout block RawDigitDataBlock
00200
00201 if (fSize > indx_nrdigit) return fRawBlock[indx_nrdigit];
00202 return -1;
00203 }
|
|
|
Definition at line 206 of file RawSnarlHeaderBlock.cxx. Referenced by FilterRunType::Ana(), RotoObjectifier::BuildRecord(), and FormatToOStream(). 00207 {
00208 // get the remote spill type (only valid for appropriate triggers)
00209
00210 if (fSize > indx_spilltype) return fRawBlock[indx_spilltype];
00211 return -1;
00212 }
|
|
|
Definition at line 131 of file RawSnarlHeaderBlock.cxx. Referenced by RecoTreeModule::Ana(), FarDetSliceListModule::Ana(), FarDetRawRateDump::Ana(), FarDetRawDigitDump::Ana(), CountPot::Ana(), AtNuTreeModule::Ana(), RotoObjectifier::BuildRecord(), PEGainModule::DoMeanSigmaFromData(), FormatToOStream(), PEGainModule::MakeHistosFromData(), DQHeader::Process(), FarDetDataQualityModule::ProcessBlock(), OltNewModule::Reco(), OltDataIntegrity::Reco(), and OltBlockScan::Reco(). 00132 {
00133 // get the run number
00134 if (fSize > indx_run) return fRawBlock[indx_run];
00135 return -1;
00136 }
|
|
|
Definition at line 147 of file RawSnarlHeaderBlock.cxx. Referenced by RecoTreeModule::Ana(), FarDetRawDigitDump::Ana(), CountPot::Ana(), AtNuTreeModule::Ana(), RotoObjectifier::BuildRecord(), FormatToOStream(), and DQHeader::Process(). 00148 {
00149 // get the run type
00150 if (fSize > indx_runtype) return fRawBlock[indx_runtype]&0xffff;
00151 return -1;
00152 }
|
|
|
Definition at line 164 of file RawSnarlHeaderBlock.cxx. References RawDataBlock::GetMinorId(). Referenced by RecoTreeModule::Ana(), FarDetSliceListModule::Ana(), FarDetRawDigitDump::Ana(), CountPot::Ana(), AtNuTreeModule::Ana(), RotoObjectifier::BuildRecord(), FormatToOStream(), DQRawDigits::Process(), DQHeader::Process(), FarDetDataQualityModule::ProcessBlock(), OltTimeScan::Reco(), OltTimePlot::Reco(), OltRawLI::Reco(), and AlgCalDetSI::RunAlg(). 00165 {
00166 // get the snarl number
00167
00168 int indx_snarl_v = indx_snarl;
00169 if (GetMinorId() <= 0) indx_snarl_v--;
00170 if (fSize > indx_snarl_v) return fRawBlock[indx_snarl_v];
00171 return -1;
00172 }
|
|
|
Definition at line 139 of file RawSnarlHeaderBlock.cxx. Referenced by RecoTreeModule::Ana(), FarDetRawDigitDump::Ana(), CountPot::Ana(), AtNuTreeModule::Ana(), RotoObjectifier::BuildRecord(), FormatToOStream(), DQHeader::Process(), FarDetDataQualityModule::ProcessBlock(), OltNewModule::Reco(), OltDataIntegrity::Reco(), and OltBlockScan::Reco(). 00140 {
00141 // get the subrun number
00142 if (fSize > indx_subrun) return (fRawBlock[indx_subrun]>>16)&0xffff;
00143 return -1;
00144 }
|
|
|
Definition at line 46 of file RawSnarlHeaderBlock.h. References GetTimeFrameNum(). Referenced by FarPlaneCheckout::Ana(), FormatToOStream(), OltNewModule::ProcessTimeframe(), OltTimeScan::Reco(), OltTimePlot::Reco(), OltRawLI::Reco(), OltEnds::Reco(), OltDataIntegrity::Reco(), OltBlockScan::Reco(), and AlgCalDetSI::RunAlg(). 00046 { return GetTimeFrameNum(); }
|
|
|
Definition at line 155 of file RawSnarlHeaderBlock.cxx. References RawDataBlock::GetMinorId(). Referenced by SexyPedReco::Ana(), RecoTreeModule::Ana(), FarDetSliceListModule::Ana(), FarDetRawRateDump::Ana(), FarDetRawDigitDump::Ana(), AtNuTreeModule::Ana(), RotoObjectifier::BuildRecord(), GetTimeFrameNo(), DQHeader::Process(), and FarDetDataQualityModule::ProcessBlock(). 00156 {
00157 // get the timeframe number
00158 if (GetMinorId() <= 0) return -1; // didn't exist in this version
00159 if (fSize > indx_tf) return fRawBlock[indx_tf];
00160 return -1;
00161 }
|
|
|
Definition at line 175 of file RawSnarlHeaderBlock.cxx. References RawDataBlock::GetMinorId(). Referenced by RecoTreeModule::Ana(), FarmListModule::Ana(), FarDetRawDigitDump::Ana(), CountPot::Ana(), AtNuTreeModule::Ana(), RotoObjectifier::BuildRecord(), PEGainModule::DoMeanSigmaFromData(), FormatToOStream(), PEGainModule::MakeHistosFromData(), DQHeader::Process(), and AlgCalDetSI::RunAlg(). 00176 {
00177 // get the trigger source
00178
00179 int indx_trigsrc_v = indx_trigsrc;
00180 if (GetMinorId() <= 0) indx_trigsrc_v--;
00181 if (fSize > indx_trigsrc_v) return fRawBlock[indx_trigsrc_v];
00182 return -1;
00183 }
|
|
|
Definition at line 121 of file RawSnarlHeaderBlock.cxx. References indx_nsec, and indx_sec. Referenced by SexyPedReco::Ana(), RunSummary::Ana(), RecoTreeModule::Ana(), RateSummary::Ana(), FiltMBSpillModule::Ana(), FarmListModule::Ana(), FarDetStripListModule::Ana(), FarDetSliceListModule::Ana(), FarDetShieldPlankListModule::Ana(), FarDetRawRateDump::Ana(), FarDetRawDigitDump::Ana(), CountPot::Ana(), BDAnaModule::Ana(), AtNuTreeModule::Ana(), FormatToOStream(), GetVldContext(), DQRawDigits::Process(), DQHeader::Process(), FillNearRunQuality::ProcessBlock(), FarDetDataQualityModule::ProcessBlock(), and OltBlockScan::Reco(). 00122 {
00123 // get the trigger time
00124 if (fSize > indx_nsec)
00125 return VldTimeStamp(fRawBlock[indx_sec],fRawBlock[indx_nsec]);
00126
00127 return VldTimeStamp((time_t)0,(Int_t)0);
00128 }
|
|
|
Definition at line 215 of file RawSnarlHeaderBlock.cxx. References RawDataBlock::GetBlockId(), RawBlockId::GetDetector(), RawBlockId::GetSimFlag(), and GetTriggerTime(). Referenced by RotoObjectifier::BuildRecord(), DQHeader::Process(), OltTimeScan::Reco(), OltTimePlot::Reco(), OltRawLI::Reco(), OltNewModule::Reco(), and OltEnds::Reco(). 00216 {
00217 // build validity context
00218 RawBlockId rbid = GetBlockId();
00219 return VldContext(rbid.GetDetector(),rbid.GetSimFlag(),GetTriggerTime());
00220 }
|
|
|
Definition at line 51 of file RawSnarlHeaderBlock.h. References fgDebugFlags. 00051 {fgDebugFlags=dbgflgs;}
|
|
|
Definition at line 14 of file RawSnarlHeaderBlock.cxx. Referenced by FormatToOStream(), and SetDebugFlags(). |
1.3.9.1