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

Public Member Functions | |
| RawDcsRpsMonitorBlock () | |
| RawDcsRpsMonitorBlock (const Int_t *block) | |
| virtual | ~RawDcsRpsMonitorBlock () |
| Int_t | GetNumEvents () const |
| Int_t | GetNumEntries () const |
| VldContext | GetVldContext () const |
| VldTimeStamp | GetTimeStamp (Int_t indx) const |
| Int_t | GetRackNumber (Int_t indx) const |
| Int_t | GetUnpackedRpsStruct (Int_t indx) const |
| Int_t | GetStatus (Int_t indx) const |
| Int_t | GetIsError (Int_t indx) const |
| Int_t | GetIsWarning (Int_t indx) const |
| Int_t | GetIsVoltageEvent (Int_t indx) const |
| Int_t | GetIsEnvEvent (Int_t indx) const |
| Int_t | GetIsExternalEvent (Int_t indx) const |
| Int_t | GetIsCommandEvent (Int_t indx) const |
| TString | GetRpsString (Int_t indx) const |
| virtual std::ostream & | FormatToOStream (std::ostream &os, Option_t *option="") const |
| RawDcsRpsMonitorBlock (const RawDcsRpsMonitorBlock &rhs) | |
Static Public Member Functions | |
| void | SetDebugFlags (const UInt_t dbgflgs) |
| UInt_t | GetDebugFlags () |
Protected Member Functions | |
| void | FillRpsArray () const |
Protected Attributes | |
| const Int_t * | RpsArray |
Static Private Attributes | |
| UInt_t | fgDebugFlags = 0 |
|
|
Definition at line 112 of file RawDcsRpsMonitorBlock.cxx. 00113 {
00114 // Default constructor
00115 }
|
|
|
Definition at line 118 of file RawDcsRpsMonitorBlock.cxx. 00119 : RawDataBlock(block) 00120 { 00121 // stored block format is: 00122 //--------------------- 00123 // 0 # words in block 00124 // 1 checksum 00125 // 2 Block Id 00126 //----- 00127 /* 00128 * The data has the following repeating structure from here 00129 * Int_t n = ((i-3)/4) = num blocks (test modulo for errors); 00130 * Int_t d[n*4]; d = block+3; 00131 * Int_t indx; 00132 * d[(indx*4)+0] = timestamp (long sec) 00133 * d[(indx*4)+1] = rackno (long) 00134 * d[(indx*4)+2] = raw(long) 00135 * d[(indx*4)+3] = status(signed long) 00136 * indx++;(test if indx is greater than n, if so, finito) 00137 * * 00138 */ 00139 }
|
|
|
Definition at line 142 of file RawDcsRpsMonitorBlock.cxx. 00143 {
00144 // dtor
00145 }
|
|
|
Definition at line 48 of file RawDcsRpsMonitorBlock.h. 00049 : RawDataBlock(rhs) { ; }
|
|
|
Definition at line 167 of file RawDcsRpsMonitorBlock.cxx. References RawDataBlock::GetData(), and RpsArray. Referenced by GetNumEvents(), GetRackNumber(), GetStatus(), GetTimeStamp(), and GetUnpackedRpsStruct(). 00168 {
00169 //off by 3 since the first three are 1:num words, 2: checksum
00170 // and 3:block ID
00171 RpsArray = 3 + GetData();
00172 }
|
|
||||||||||||
|
Reimplemented from RawDataBlock. Definition at line 148 of file RawDcsRpsMonitorBlock.cxx. References VldTimeStamp::AsString(), RawDataBlock::FormatToOStream(), GetNumEntries(), GetNumEvents(), GetRackNumber(), GetRpsString(), GetStatus(), GetTimeStamp(), GetUnpackedRpsStruct(), and option. 00150 {
00151 RawDataBlock::FormatToOStream(os,option);
00152 if (option[0] == 'X') return os;
00153
00154 Int_t numEntries=GetNumEntries();
00155 os << " Number of Entries " << numEntries
00156 << " Number of Events " << GetNumEvents() << endl;
00157 for(Int_t i = 0; i < numEntries; i++)
00158 {
00159 os << "Timestamp " << GetTimeStamp(i).AsString("c")
00160 << " Rack number " << GetRackNumber(i) << " unpacked data "
00161 << GetUnpackedRpsStruct(i) << " Status " << GetStatus(i) << endl
00162 << " String info " << GetRpsString(i) << endl;
00163 }
00164 return os;
00165 }
|
|
|
Definition at line 45 of file RawDcsRpsMonitorBlock.h. 00045 { return fgDebugFlags; }
|
|
|
Definition at line 270 of file RawDcsRpsMonitorBlock.cxx. References GetUnpackedRpsStruct(). 00271 {
00272 Int_t mydata=GetUnpackedRpsStruct(indx);
00273 mydata=(mydata>>24)&0xff; //shift over to get just the third port
00274 if (mydata!=0)
00275 return 1;
00276 return 0;
00277 }
|
|
|
Definition at line 246 of file RawDcsRpsMonitorBlock.cxx. References GetUnpackedRpsStruct(). 00247 {
00248 Int_t mydata=GetUnpackedRpsStruct(indx);
00249 Int_t port0,port1,port2;
00250 port0=mydata&0xff;
00251 port1=(mydata>>8)&0xff;
00252 port2=(mydata>>16)&0xff;
00253 if((port0&RPS_SMOKEALARM)||(port0&RPS_FANFAIL)||(port1&RPS_H2OFLOWWARN)||(port1&RPS_H2OFLOWALARM)||(port1&RPS_AIRTEMPDIFFWARN)||(port1&RPS_AIRTEMPALARM)||(port2&RPS_AIRTEMPDIFFALARM)||(port2&RPS_AIRTEMPWARN)||(port2&RPS_HUMIDITY)||(port2&RPS_AIRFLOWIN)||(port1&RPS_EXTTEMP))
00254 return 1;
00255 return 0;
00256 }
|
|
|
Definition at line 210 of file RawDcsRpsMonitorBlock.cxx. References GetUnpackedRpsStruct(). Referenced by DcsWriter::ProcessRawRecord(). 00211 {
00212 Int_t mydata=GetUnpackedRpsStruct(indx);
00213 Int_t port0,port1,port2;
00214 port0=mydata&0xff;
00215 port1=(mydata>>8)&0xff;
00216 port2=(mydata>>16)&0xff;
00217 if((port0&RPS_MAINALARM)||(port0&RPS_VMONALARM)||(port0&RPS_SMOKEALARM)||(port0&RPS_EXTALARM)||(port1&RPS_EXTTEMP)||(port1&RPS_H2OFLOWALARM)||(port1&RPS_H2OTEMPALARM)||(port1&RPS_AIRTEMPALARM)||(port2&RPS_AIRFLOWOUT)||(port2&RPS_H2OLEAK)||(port2&RPS_AIRFLOWIN))
00218 return 1;
00219 return 0;
00220 }
|
|
|
Definition at line 258 of file RawDcsRpsMonitorBlock.cxx. References GetUnpackedRpsStruct(). 00259 {
00260 Int_t mydata=GetUnpackedRpsStruct(indx);
00261 Int_t port0,port1,port2;
00262 port0=mydata&0xff;
00263 port1=(mydata>>8)&0xff;
00264 port2=(mydata>>16)&0xff;
00265 if((port0&RPS_EXTALARM))
00266 return 1;
00267 return 0;
00268 }
|
|
|
Definition at line 234 of file RawDcsRpsMonitorBlock.cxx. References GetUnpackedRpsStruct(). 00235 {
00236 Int_t mydata=GetUnpackedRpsStruct(indx);
00237 Int_t port0,port1,port2;
00238 port0=mydata&0xff;
00239 port1=(mydata>>8)&0xff;
00240 port2=(mydata>>16)&0xff;
00241 if((port0&RPS_VMONALARM)||(port0&RPS_VMONWARN))
00242 return 1;
00243 return 0;
00244 }
|
|
|
Definition at line 222 of file RawDcsRpsMonitorBlock.cxx. References GetUnpackedRpsStruct(). Referenced by DcsWriter::ProcessRawRecord(). 00223 {
00224 Int_t mydata=GetUnpackedRpsStruct(indx);
00225 Int_t port0,port1,port2;
00226 port0=mydata&0xff;
00227 port1=(mydata>>8)&0xff;
00228 port2=(mydata>>16)&0xff;
00229 if((port0&RPS_MAINWARN)||(port0&RPS_VMONWARN)||(port0&RPS_FANFAIL)||(port1&RPS_H2OFLOWWARN)||(port1&RPS_H2OTEMPWARN)||(port1&RPS_AIRTEMPDIFFWARN)||(port2&RPS_AIRTEMPWARN)||(port2&RPS_HUMIDITY))
00230 return 1;
00231 return 0;
00232 }
|
|
|
Definition at line 174 of file RawDcsRpsMonitorBlock.cxx. References MSG. Referenced by FormatToOStream(), GetNumEvents(), and DcsWriter::ProcessRawRecord(). 00175 {
00176 // remember, all versions
00177 // have offset of 3 due to first 3 longs)
00178 if((fSize-3)%4)
00179 {
00180 MSG("RawData",Msg::kError)
00181 << " Size of Rps Block screwed up. Have: "
00182 << (fSize-3)%4 << " left over from modulo 4."
00183 << endl;
00184 return -1;
00185 }
00186 return ((fSize-3)/4);
00187 }
|
|
|
Definition at line 189 of file RawDcsRpsMonitorBlock.cxx. References FillRpsArray(), and GetNumEntries(). Referenced by FormatToOStream(). 00190 {
00191 Int_t numEvents = 1;
00192 Int_t numEntries = GetNumEntries();
00193 FillRpsArray();
00194
00195 //seek throughout for the number of events (not entries)
00196 //so look for entries where
00197 // FOR RPS THERE IS ONLY ONE EVENT PER BLOCK
00198
00199 numEvents=numEntries;
00200 return numEvents;
00201 }
|
|
|
Definition at line 68 of file RawDcsRpsMonitorBlock.h. References FillRpsArray(), and RpsArray. Referenced by FormatToOStream(), and DcsWriter::ProcessRawRecord(). 00069 { FillRpsArray(); return RpsArray[(indx*4)+1]; }
|
|
|
Definition at line 279 of file RawDcsRpsMonitorBlock.cxx. References GetUnpackedRpsStruct(), initstring, and rps_translate(). Referenced by FormatToOStream(). 00280 {
00281 unsigned short vmon_id=0;
00282 unsigned char diodata[4];
00283 Int_t original=GetUnpackedRpsStruct(indx);
00284 memcpy(diodata,&original,4);
00285 rps_translate(diodata, initstring,&vmon_id);
00286 TString mystring(initstring);
00287 return mystring;
00288 }
|
|
|
Definition at line 74 of file RawDcsRpsMonitorBlock.h. References FillRpsArray(), and RpsArray. Referenced by FormatToOStream(), and DcsWriter::ProcessRawRecord(). 00075 { FillRpsArray(); return RpsArray[(indx*4)+3]; }
|
|
|
Definition at line 64 of file RawDcsRpsMonitorBlock.h. References FillRpsArray(), and RpsArray. Referenced by FormatToOStream(), GetVldContext(), and DcsWriter::ProcessRawRecord(). 00065 { FillRpsArray(); return VldTimeStamp(RpsArray[(indx*4)],0); }
|
|
|
Definition at line 71 of file RawDcsRpsMonitorBlock.h. References FillRpsArray(), and RpsArray. Referenced by FormatToOStream(), GetIsCommandEvent(), GetIsEnvEvent(), GetIsError(), GetIsExternalEvent(), GetIsVoltageEvent(), GetIsWarning(), GetRpsString(), and DcsWriter::ProcessRawRecord(). 00072 { FillRpsArray(); return RpsArray[(indx*4)+2]; }
|
|
|
Definition at line 203 of file RawDcsRpsMonitorBlock.cxx. References RawDataBlock::GetBlockId(), RawBlockId::GetDetector(), RawBlockId::GetSimFlag(), and GetTimeStamp(). Referenced by DcsWriter::ProcessRawRecord(). 00204 {
00205 // build validity context
00206 RawBlockId rbid = GetBlockId();
00207 return VldContext(rbid.GetDetector(),rbid.GetSimFlag(),GetTimeStamp(0));
00208 }
|
|
|
Definition at line 44 of file RawDcsRpsMonitorBlock.h. References fgDebugFlags. 00044 {fgDebugFlags=dbgflgs;}
|
|
|
Definition at line 82 of file RawDcsRpsMonitorBlock.cxx. Referenced by SetDebugFlags(). |
|
|
Definition at line 55 of file RawDcsRpsMonitorBlock.h. Referenced by FillRpsArray(), GetRackNumber(), GetStatus(), GetTimeStamp(), and GetUnpackedRpsStruct(). |
1.3.9.1