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

Public Member Functions | |
| RawVtmTimeInfoBlock () | |
| RawVtmTimeInfoBlock (const Int_t *block) | |
| virtual | ~RawVtmTimeInfoBlock () |
| Int_t | GetRun () const |
| Short_t | GetSubRun () const |
| Short_t | GetRunType () const |
| VldTimeStamp | GetTimeStamp () const |
| VldContext | GetVldContext () const |
| ElecType::Elec_t | GetElecType () const |
| Bool_t | GetPedMode () const |
| Bool_t | GetSparsMode () const |
| Bool_t | GetCommonMode () const |
| UShort_t | GetCrate () const |
| Int_t | GetCrateIdInfo () const |
| Int_t | GetTimeFrameNum () const |
| Int_t | GetLastRFClock () const |
| Int_t | GetLastTimeStamp () const |
| Int_t | GetSpillTimeRF () const |
| Int_t | GetSpillTimeGPS () const |
| Int_t | GetClockStatus () const |
| Bool_t | VtmInError () const |
| Bool_t | ModuleInError (UShort_t indx) const |
| std::vector< UShort_t > | ErrorModules () const |
| Int_t | GetLastRFClockFromPrevTF () const |
| virtual std::ostream & | FormatToOStream (ostream &os, Option_t *option="") const |
| RawVtmTimeInfoBlock (const RawVtmTimeInfoBlock &rhs) | |
| RawVtmTimeInfoBlock & | operator= (const RawVtmTimeInfoBlock &rhs) |
Static Public Member Functions | |
| void | SetDebugFlags (const UInt_t dbgflgs) |
| UInt_t | GetDebugFlags () |
Protected Member Functions | |
| virtual void | FillCrateId () const |
Protected Attributes | |
| RawChannelId | fCrateId |
Static Private Attributes | |
| UInt_t | fgDebugFlags = 0 |
| unpacked crateinfo | |
|
|
Definition at line 51 of file RawVtmTimeInfoBlock.cxx. 00052 : RawDataBlock(), fCrateId() 00053 { 00054 // Default constructor 00055 }
|
|
|
Definition at line 58 of file RawVtmTimeInfoBlock.cxx. 00059 : RawDataBlock(block), fCrateId() 00060 { 00061 // stored block format is: 00062 //--------------------- 00063 // 0 # words in block 00064 // 1 checksum 00065 // 2 Block Id 00066 //----- 00067 // 3 run # 00068 // 4 subRunAndType 00069 // 5 timestamp sec 00070 // 6 timestamp nsec 00071 // 7 crateIdentifier 00072 // 8 timeFrameNumber 00073 // 9 lastRFClock 00074 // 10 spillTimeRF 00075 // 11 spillTimeGPS 00076 // 12 clockStatus (version 2 and above) 00077 // 13 endLastTF (version 3 and above) 00078 00079 }
|
|
|
Definition at line 82 of file RawVtmTimeInfoBlock.cxx. 00083 {
00084 // dtor
00085 }
|
|
|
Definition at line 65 of file RawVtmTimeInfoBlock.h. References fCrateId. 00066 : RawDataBlock(rhs), fCrateId(rhs.fCrateId) 00067 { ; }
|
|
|
Definition at line 206 of file RawVtmTimeInfoBlock.cxx. References ModuleInError(). Referenced by FormatToOStream(). 00207 {
00208 // return list of module that were in the error state
00209 std::vector<UShort_t> mdlsInError;
00210
00211 for (unsigned short mdl = 0; mdl < 15; ++mdl) {
00212 if ( ModuleInError(mdl) ) mdlsInError.push_back(mdl);
00213 }
00214
00215 return mdlsInError;
00216 }
|
|
|
Definition at line 293 of file RawVtmTimeInfoBlock.cxx. References fCrateId, RawDataBlock::GetBlockId(), GetCrateIdInfo(), DataUtil::GetDetector(), and RawChannelId::IsNull(). Referenced by GetCommonMode(), GetCrate(), GetElecType(), GetPedMode(), and GetSparsMode(). 00294 {
00295 // unpack crate info
00296 if (!fCrateId.IsNull()) return;
00297 fCrateId = RawChannelId(GetBlockId().GetDetector(),GetCrateIdInfo(),0x1fff);
00298 }
|
|
||||||||||||
|
Definition at line 235 of file RawVtmTimeInfoBlock.cxx. References VldTimeStamp::AsString(), ErrorModules(), fgDebugFlags, RawDataBlock::FormatToOStream(), GetClockStatus(), GetCrateIdInfo(), GetLastRFClockFromPrevTF(), GetLastTimeStamp(), RawDataBlock::GetMinorId(), GetRun(), GetRunType(), GetSpillTimeGPS(), GetSpillTimeRF(), GetSubRun(), GetTimeFrameNum(), GetTimeStamp(), option, and VtmInError(). 00237 {
00238 if (fgDebugFlags & kdbg_ForceHexDump) option = "x";
00239
00240 RawDataBlock::FormatToOStream(os,option);
00241 if (option[0] == 'X') return os;
00242
00243 // additional block specific formatted output is done here
00244
00245 os << " TimeStamp " << GetTimeStamp().AsString("c")
00246 << " TimeFrame " << GetTimeFrameNum() << endl;
00247 os << " Run " << GetRun()
00248 << " SubRun " << GetSubRun()
00249 << " RunType " << GetRunType();
00250 int crateid = GetCrateIdInfo();
00251
00252 os << " Crate " << (crateid&0x3f)
00253 << " (0x" << hex << crateid << dec << ") had: " << endl
00254 << " LastTimeStamp " << setw(8) << GetLastTimeStamp()
00255 << " SpillTimeRF " << setw(8) << GetSpillTimeRF()
00256 << " SpillTimeGPS " << setw(8) << GetSpillTimeGPS()
00257 << endl;
00258
00259 int minor = GetMinorId();
00260
00261 if (minor > 1) {
00262 os << " ClockStatus 0x"
00263 << std::hex << std::setfill('0')
00264 << setw(8) << GetClockStatus()
00265 << std::setfill(' ') << std::dec;
00266
00267 if ( ! VtmInError() ) os << " Vtm Okay,";
00268 else os << " Vtm Error,";
00269
00270 std::vector<UShort_t> mdlsInError = ErrorModules();
00271 unsigned int nerr = mdlsInError.size();
00272 if ( nerr == 0 ) os << " No Module Errors";
00273 else {
00274 if ( nerr == 1 ) os << " Error in Module " << mdlsInError[0];
00275 else {
00276 os << " Errors in Modules:";
00277 for (unsigned short i = 0; i < nerr; ++i)
00278 os << " " << mdlsInError[i];
00279 }
00280 }
00281 os << "." << endl;
00282 }
00283 if (minor > 2) {
00284 os << " LastRFClockFromPrevTF "
00285 << setw(10) << GetLastRFClockFromPrevTF()
00286 << endl;
00287 }
00288
00289 return os;
00290 }
|
|
|
Definition at line 173 of file RawVtmTimeInfoBlock.cxx. References RawDataBlock::GetMinorId(), and MSG. Referenced by FormatToOStream(), ModuleInError(), and VtmInError(). 00174 {
00175 // get the latched bits from each mtm and vtm
00176 const Int_t badValue = -1;
00177 if (GetMinorId() <= 1 || fSize <= indx_clockstatus) {
00178 MSG("RawData",Msg::kWarning)
00179 << "GetClockStatus() not available fSize " << fSize
00180 << " MinorId " << GetMinorId() << endl;
00181 return badValue;
00182 }
00183 return fRawBlock[indx_clockstatus];
00184 }
|
|
|
Definition at line 96 of file RawVtmTimeInfoBlock.h. References fCrateId, FillCrateId(), and RawChannelId::GetCommonMode(). 00097 { FillCrateId(); return fCrateId.GetCommonMode(); }
|
|
|
Definition at line 99 of file RawVtmTimeInfoBlock.h. References fCrateId, FillCrateId(), and RawChannelId::GetCrate(). Referenced by FiltSGateModule::ProcessVtmTimeInfoBlks(). 00100 { FillCrateId(); return fCrateId.GetCrate(); }
|
|
|
Definition at line 133 of file RawVtmTimeInfoBlock.cxx. Referenced by FillCrateId(), and FormatToOStream(). 00134 {
00135 // get the crate id info (packed)
00136 if (fSize > indx_crateid) return fRawBlock[indx_crateid];
00137 return -1;
00138 }
|
|
|
Definition at line 62 of file RawVtmTimeInfoBlock.h. 00062 { return fgDebugFlags; }
|
|
|
Definition at line 87 of file RawVtmTimeInfoBlock.h. References fCrateId, FillCrateId(), and RawChannelId::GetElecType(). 00088 { FillCrateId(); return fCrateId.GetElecType(); }
|
|
|
Definition at line 149 of file RawVtmTimeInfoBlock.cxx. Referenced by NtpSRModule::FillNtpTimeStatus(), and GetLastTimeStamp(). 00150 {
00151 // get the RF clock counter at end of time frame
00152 if (fSize > indx_lastrfclock) return fRawBlock[indx_lastrfclock];
00153 return -1;
00154 }
|
|
|
Definition at line 219 of file RawVtmTimeInfoBlock.cxx. Referenced by NtpSRModule::FillNtpTimeStatus(), and FormatToOStream(). 00220 {
00221 // get the RF clock at the counter reset on the previous time frame
00222 if (fSize > indx_endlasttf) return fRawBlock[indx_endlasttf];
00223 return -1;
00224 }
|
|
|
Definition at line 102 of file RawVtmTimeInfoBlock.h. References GetLastRFClock(). Referenced by FormatToOStream(), and FiltSGateModule::ProcessVtmTimeInfoBlks(). 00103 { return GetLastRFClock(); }
|
|
|
Definition at line 90 of file RawVtmTimeInfoBlock.h. References fCrateId, FillCrateId(), and RawChannelId::GetPedMode(). 00091 { FillCrateId(); return fCrateId.GetPedMode(); }
|
|
|
Definition at line 109 of file RawVtmTimeInfoBlock.cxx. Referenced by FormatToOStream(), and FiltSGateModule::ProcessVtmTimeInfoBlks(). 00110 {
00111 // get the run number
00112 if (fSize > indx_run) return fRawBlock[indx_run];
00113 return -1;
00114 }
|
|
|
Definition at line 125 of file RawVtmTimeInfoBlock.cxx. Referenced by FormatToOStream(). 00126 {
00127 // get the run type
00128 if (fSize > indx_runtype) return fRawBlock[indx_runtype]&0xffff;
00129 return -1;
00130 }
|
|
|
Definition at line 93 of file RawVtmTimeInfoBlock.h. References fCrateId, FillCrateId(), and RawChannelId::GetSparsMode(). 00094 { FillCrateId(); return fCrateId.GetSparsMode(); }
|
|
|
Definition at line 165 of file RawVtmTimeInfoBlock.cxx. Referenced by NtpSRModule::FillNtpTimeStatus(), FormatToOStream(), and FiltSGateModule::ProcessVtmTimeInfoBlks(). 00166 {
00167 // get the latched GPS 10Mhz dounter at spill gate
00168 if (fSize > indx_spilltimegps) return fRawBlock[indx_spilltimegps];
00169 return -1;
00170 }
|
|
|
Definition at line 157 of file RawVtmTimeInfoBlock.cxx. Referenced by NtpSRModule::FillNtpTimeStatus(), FormatToOStream(), and FiltSGateModule::ProcessVtmTimeInfoBlks(). 00158 {
00159 // get the latched timestamp counter at spill gate
00160 if (fSize > indx_spilltimerf) return fRawBlock[indx_spilltimerf];
00161 return -1;
00162 }
|
|
|
Definition at line 117 of file RawVtmTimeInfoBlock.cxx. Referenced by FormatToOStream(), and FiltSGateModule::ProcessVtmTimeInfoBlks(). 00118 {
00119 // get the subrun number
00120 if (fSize > indx_subrun) return (fRawBlock[indx_subrun]>>16)&0xffff;
00121 return -1;
00122 }
|
|
|
Definition at line 141 of file RawVtmTimeInfoBlock.cxx. Referenced by NtpSRModule::FillNtpTimeStatus(), FormatToOStream(), and FiltSGateModule::ProcessVtmTimeInfoBlks(). 00142 {
00143 // get the time frame
00144 if (fSize > indx_tf) return fRawBlock[indx_tf];
00145 return -1;
00146 }
|
|
|
Definition at line 99 of file RawVtmTimeInfoBlock.cxx. References indx_nsec, and indx_sec. Referenced by FormatToOStream(), and GetVldContext(). 00100 {
00101 // get the timestamp
00102 if (fSize > indx_nsec)
00103 return VldTimeStamp(fRawBlock[indx_sec],fRawBlock[indx_nsec]);
00104
00105 return VldTimeStamp((time_t)0,(Int_t)0);
00106 }
|
|
|
Definition at line 227 of file RawVtmTimeInfoBlock.cxx. References RawDataBlock::GetBlockId(), RawBlockId::GetDetector(), RawBlockId::GetSimFlag(), and GetTimeStamp(). 00228 {
00229 // build validity context
00230 RawBlockId rbid = GetBlockId();
00231 return VldContext(rbid.GetDetector(),rbid.GetSimFlag(),GetTimeStamp());
00232 }
|
|
|
Definition at line 196 of file RawVtmTimeInfoBlock.cxx. References GetClockStatus(). Referenced by ErrorModules(). 00197 {
00198 // return whether a module was in an error state
00199 Int_t status = GetClockStatus();
00200 // the modules are only bit 0-14
00201 if (indx > 14) return true;
00202 return ((1<<indx) & status);
00203 }
|
|
|
Definition at line 88 of file RawVtmTimeInfoBlock.cxx. References fCrateId, and RawDataBlock::operator=(). 00089 {
00090 // deep copy assignment
00091 if (this != &rhs) {
00092 RawDataBlock::operator=(rhs);
00093 fCrateId = rhs.fCrateId;
00094 }
00095 return *this;
00096 }
|
|
|
Definition at line 61 of file RawVtmTimeInfoBlock.h. References fgDebugFlags. 00061 {fgDebugFlags=dbgflgs;}
|
|
|
Definition at line 187 of file RawVtmTimeInfoBlock.cxx. References GetClockStatus(). Referenced by FormatToOStream(). 00188 {
00189 // return whether the was in an error state
00190 Int_t status = GetClockStatus();
00191 // the modules are bits 0-14, vtm is bit 15
00192 return ((1<<15) & status);
00193 }
|
|
|
Definition at line 77 of file RawVtmTimeInfoBlock.h. Referenced by FillCrateId(), GetCommonMode(), GetCrate(), GetElecType(), GetPedMode(), GetSparsMode(), operator=(), and RawVtmTimeInfoBlock(). |
|
|
unpacked crateinfo
Definition at line 17 of file RawVtmTimeInfoBlock.cxx. Referenced by FormatToOStream(), and SetDebugFlags(). |
1.3.9.1