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

Public Member Functions | |
| RawDcsHvMonitorBlock () | |
| RawDcsHvMonitorBlock (const Int_t *block) | |
| virtual | ~RawDcsHvMonitorBlock () |
| Int_t | GetNumEvents () const |
| Int_t | GetNumEntries () const |
| VldContext | GetVldContext () const |
| VldTimeStamp | GetTimeStamp (Int_t indx) const |
| Int_t | GetRawChannel (Int_t indx) const |
| Int_t | GetRawGeometry (Int_t indx) const |
| Int_t | GetChannel (Int_t indx) const |
| Int_t | GetFarIsTriggerPmt (Int_t indx) const |
| Int_t | GetMainframe (Int_t indx) const |
| Int_t | GetCard (Int_t indx) const |
| Int_t | GetPlane (Int_t indx) const |
| Int_t | GetSide (Int_t indx) const |
| Int_t | GetPmt (Int_t indx) const |
| Int_t | GetSetVoltage (Int_t indx) const |
| Int_t | GetReadVoltage (Int_t indx) const |
| Int_t | GetNearIsTriggerPmt (Int_t indx) const |
| Int_t | GetAlarmbits (Int_t indx) const |
| Int_t | GetFarIsShield (Int_t indx) const |
| Int_t | GetFarShieldPlane (Int_t indx) const |
| Int_t | GetHvDetector () const |
| virtual std::ostream & | FormatToOStream (std::ostream &os, Option_t *option="") const |
| RawDcsHvMonitorBlock (const RawDcsHvMonitorBlock &rhs) | |
Static Public Member Functions | |
| void | SetDebugFlags (const UInt_t dbgflgs) |
| UInt_t | GetDebugFlags () |
Protected Member Functions | |
| void | FillHvArray () const |
Protected Attributes | |
| const Int_t * | HvArray |
Static Private Attributes | |
| UInt_t | fgDebugFlags = 0 |
|
|
Definition at line 33 of file RawDcsHvMonitorBlock.cxx. 00034 : HvArray(0) 00035 { 00036 // Default constructor 00037 }
|
|
|
Definition at line 40 of file RawDcsHvMonitorBlock.cxx. 00041 : RawDataBlock(block), HvArray(0) 00042 { 00043 // stored block format is: 00044 //--------------------- 00045 // 0 i = # words in block 00046 // 1 checksum 00047 // 2 Block Id 00048 00049 /* 00050 * The data has the following repeating structure from here 00051 * Int_t n = ((i-3)/6) = num blocks (test modulo for errors); 00052 * Int_t d[n*6]; d = block+3; 00053 * Int_t indx; 00054 * d[(indx*6)+0] = timestamp (long secs) 00055 * d[(indx*6)+1] = mfcdch (long) 00056 * d[(indx*6)+2] = geom(long) 00057 * d[(indx*6)+3] = setv(signed long) 00058 * d[(indx*6)+4] = readv(signed long) 00059 * d[(indx*6)+5] = alarm(long) 00060 * indx++;(test if indx is greater than n, if so, finito) 00061 00062 * version 1 has timestamp off by 1 hour in sm2 records between 00063 * 2003-06-03 12:24:00 and 2003-06-11 03:22:26 in GMT time. 00064 * add one hour to these when making final record. 00065 00066 * version 2 has some recs with order screwed up, check this by 00067 * checking whether mfcdch or geom is negative. if so, then 00068 * swap mfcdch with setv and geom with readv.(version 1 also) 00069 00070 * version 3 has none of these problems, and also has the 00071 * new shield and trig pmt values (of adding 10000 to shield and 20000 to trig) 00072 */ 00073 }
|
|
|
Definition at line 76 of file RawDcsHvMonitorBlock.cxx. 00077 {
00078 // dtor
00079 }
|
|
|
Definition at line 54 of file RawDcsHvMonitorBlock.h. 00055 : RawDataBlock(rhs) { ; }
|
|
|
Definition at line 123 of file RawDcsHvMonitorBlock.cxx. References RawDataBlock::GetData(), and HvArray. Referenced by GetAlarmbits(), GetRawChannel(), GetRawGeometry(), GetReadVoltage(), GetSetVoltage(), and GetTimeStamp(). 00124 {
00125 //off by 3 since the first three are 1: num words, 2: checksum
00126 // and 3:block ID
00127 HvArray = 3 + GetData();
00128 }
|
|
||||||||||||
|
Reimplemented from RawDataBlock. Definition at line 82 of file RawDcsHvMonitorBlock.cxx. References VldTimeStamp::AsString(), RawDataBlock::FormatToOStream(), GetAlarmbits(), GetCard(), GetChannel(), GetFarIsShield(), GetFarIsTriggerPmt(), GetFarShieldPlane(), GetHvDetector(), GetMainframe(), GetNearIsTriggerPmt(), GetNumEntries(), GetNumEvents(), GetPlane(), GetPmt(), GetReadVoltage(), GetSetVoltage(), GetSide(), GetTimeStamp(), and option. 00084 {
00085 RawDataBlock::FormatToOStream(os,option);
00086 if (option[0] == 'X') return os;
00087
00088 Int_t numEntries=GetNumEntries();
00089 os << " Number of Entries " << numEntries
00090 << " Number of Events " << GetNumEvents() << endl;
00091 for(Int_t i = 0; i < numEntries; i++)
00092 {
00093 os << "Timestamp " << GetTimeStamp(i).AsString("c")
00094 <<" Mainframe " << GetMainframe(i) << " Card "
00095 << GetCard(i)
00096 << " Channel " << GetChannel(i);
00097 if (GetHvDetector()==Detector::kFar)
00098 {
00099 if (GetFarIsShield(i))
00100 os << " Shield Plane " << GetFarShieldPlane(i);
00101 else
00102 if (GetFarIsTriggerPmt(i))
00103 os << " Trigger Pmt ";
00104 else
00105 os << " Plane " << GetPlane(i);
00106 os << " Side " << GetSide(i) << " Pmt " << GetPmt(i);
00107 }
00108 if (GetHvDetector()==Detector::kNear)
00109 {
00110 if (GetNearIsTriggerPmt(i))
00111 os << " Is Trigger Pmt ";
00112 else
00113 os << " Near Plane: " << GetPlane(i);
00114 }
00115 os << " Set Voltage " << GetSetVoltage(i) << " Read Voltage "
00116 << GetReadVoltage(i) << " Alarms " << GetAlarmbits(i) << endl;
00117 }
00118 return os;
00119 }
|
|
|
Definition at line 71 of file RawDcsHvMonitorBlock.h. References FillHvArray(), and HvArray. Referenced by FormatToOStream(), and DcsWriter::ProcessRawRecord(). 00072 { FillHvArray(); return HvArray[(indx*6)+5];}
|
|
|
Definition at line 212 of file RawDcsHvMonitorBlock.cxx. References GetRawChannel(). Referenced by FormatToOStream(), GetFarIsShield(), GetPlane(), and DcsWriter::ProcessRawRecord(). 00213 {
00214 Int_t nRawChan = GetRawChannel(indx);
00215 Int_t temp = nRawChan/1000;
00216 nRawChan = nRawChan - (temp*1000);
00217 return (nRawChan/16);
00218 }
|
|
|
Definition at line 198 of file RawDcsHvMonitorBlock.cxx. References GetRawChannel(). Referenced by FormatToOStream(), and DcsWriter::ProcessRawRecord(). 00199 {
00200 Int_t nRawChan = GetRawChannel(indx);
00201 Int_t temp = nRawChan/1000;
00202 nRawChan = nRawChan - (temp*1000);
00203 Int_t nCard = nRawChan/16;
00204 return (nRawChan-(nCard*16));
00205 }
|
|
|
Definition at line 51 of file RawDcsHvMonitorBlock.h. 00051 { return fgDebugFlags; }
|
|
|
Definition at line 157 of file RawDcsHvMonitorBlock.cxx. References GetCard(), RawDataBlock::GetMinorId(), GetPlane(), and GetRawGeometry(). Referenced by FormatToOStream(), and GetFarShieldPlane(). 00158 {
00159 if (GetMinorId()<3)
00160 {
00161 if ( (GetPlane(indx)<100) && (GetCard(indx)==12) )
00162 return 1;
00163 }
00164 else if (GetMinorId()==3)
00165 {
00166 if ((GetRawGeometry(indx) > 10000)&& (GetRawGeometry(indx)<20000) )
00167 return 1;
00168 }
00169 return 0;
00170 }
|
|
|
Definition at line 183 of file RawDcsHvMonitorBlock.cxx. References RawDataBlock::GetMinorId(), GetRawChannel(), and GetRawGeometry(). Referenced by FormatToOStream(), GetNearIsTriggerPmt(), and GetPlane(). 00184 {
00185 if ( (GetMinorId()<3) && (GetRawChannel(indx)==3015) )
00186 return 1;
00187 if (GetMinorId()==3)
00188 if (GetRawGeometry(indx)>=20000)
00189 return 1;
00190 return 0;
00191 }
|
|
|
Definition at line 172 of file RawDcsHvMonitorBlock.cxx. References GetFarIsShield(), RawDataBlock::GetMinorId(), GetPlane(), and GetRawGeometry(). Referenced by FormatToOStream(). 00173 {
00174 if (GetFarIsShield(indx)==0)
00175 return 0;
00176 if (GetMinorId()<3)
00177 {
00178 return GetPlane(indx);
00179 }
00180 return ((GetRawGeometry(indx)/10)-1000);
00181 }
|
|
|
Definition at line 220 of file RawDcsHvMonitorBlock.cxx. References RawDataBlock::GetBlockId(), and RawBlockId::GetDetector(). Referenced by FormatToOStream(), and GetPlane(). 00221 {
00222 RawBlockId rbid = GetBlockId();
00223 return rbid.GetDetector();
00224 }
|
|
|
Definition at line 207 of file RawDcsHvMonitorBlock.cxx. References GetRawChannel(). Referenced by FormatToOStream(), GetTimeStamp(), and DcsWriter::ProcessRawRecord(). 00208 {
00209 return (GetRawChannel(indx)/1000);
00210 }
|
|
|
Definition at line 193 of file RawDcsHvMonitorBlock.cxx. References GetFarIsTriggerPmt(). Referenced by FormatToOStream(). 00194 {
00195 return GetFarIsTriggerPmt(indx);
00196 }
|
|
|
Definition at line 130 of file RawDcsHvMonitorBlock.cxx. References MSG. Referenced by FormatToOStream(), and DcsWriter::ProcessRawRecord(). 00131 {
00132 // remember, all versions
00133 // have offset of 3 due to first 3 longs)
00134 if((fSize-3)%6)
00135 {
00136 MSG("RawData",Msg::kError)
00137 << " Size of Hv Block screwed up. Have: "
00138 << (fSize-3)%6 << " left over from modulo 6."
00139 << endl;
00140 return -1;
00141 }
00142 return ((fSize-3)/6);
00143 }
|
|
|
Definition at line 145 of file RawDcsHvMonitorBlock.cxx. Referenced by FormatToOStream(). 00146 {
00147 return 1;
00148 }
|
|
|
Definition at line 226 of file RawDcsHvMonitorBlock.cxx. References GetCard(), GetFarIsTriggerPmt(), GetHvDetector(), and GetRawGeometry(). Referenced by FormatToOStream(), GetFarIsShield(), GetFarShieldPlane(), and DcsWriter::ProcessRawRecord(). 00227 {
00228 if (GetHvDetector()==Detector::kFar)
00229 {
00230 if ( (GetFarIsTriggerPmt(indx)) || ( ((GetRawGeometry(indx)/10)<100) && (GetCard(indx)==12)) )
00231 return 0;
00232 }
00233 return (GetRawGeometry(indx)/10);
00234 }
|
|
|
Definition at line 244 of file RawDcsHvMonitorBlock.cxx. References GetRawGeometry(). Referenced by FormatToOStream(), and DcsWriter::ProcessRawRecord(). 00245 {
00246 Int_t iRawGeom = GetRawGeometry(indx);
00247 Int_t iTemp = iRawGeom/10;
00248 iRawGeom = iRawGeom - (iTemp*10);
00249 iTemp = iRawGeom/3;
00250 return (iRawGeom-(iTemp*3));
00251 }
|
|
|
Definition at line 253 of file RawDcsHvMonitorBlock.cxx. References FillHvArray(), RawDataBlock::GetMinorId(), and HvArray. Referenced by GetCard(), GetChannel(), GetFarIsTriggerPmt(), GetMainframe(), and DcsWriter::ProcessRawRecord(). 00254 {
00255 FillHvArray();
00256 Int_t hvtemp = HvArray[(indx*6)+1];
00257 if (GetMinorId()==3)
00258 return hvtemp;
00259 if (hvtemp<0)
00260 return HvArray[(indx*6)+3];
00261 return hvtemp;
00262 }
|
|
|
Definition at line 264 of file RawDcsHvMonitorBlock.cxx. References FillHvArray(), RawDataBlock::GetMinorId(), and HvArray. Referenced by GetFarIsShield(), GetFarIsTriggerPmt(), GetFarShieldPlane(), GetPlane(), GetPmt(), GetSide(), and DcsWriter::ProcessRawRecord(). 00265 {
00266 FillHvArray();
00267 Int_t hvtemp = HvArray[(indx*6)+2];
00268 if (GetMinorId()==3)
00269 return hvtemp;
00270 if (hvtemp<0)
00271 return HvArray[(indx*6)+4];
00272 return hvtemp;
00273 }
|
|
|
Definition at line 284 of file RawDcsHvMonitorBlock.cxx. References FillHvArray(), and HvArray. Referenced by FormatToOStream(), and DcsWriter::ProcessRawRecord(). 00285 {
00286 FillHvArray();
00287 Int_t hvtemp = HvArray[(indx*6)+2];
00288 if (hvtemp<0)
00289 return hvtemp;
00290 return HvArray[(indx*6)+4];
00291 }
|
|
|
Definition at line 275 of file RawDcsHvMonitorBlock.cxx. References FillHvArray(), and HvArray. Referenced by FormatToOStream(), and DcsWriter::ProcessRawRecord(). 00276 {
00277 FillHvArray();
00278 Int_t hvtemp = HvArray[(indx*6)+1];
00279 if (hvtemp<0)
00280 return hvtemp;
00281 return HvArray[(indx*6)+3];
00282 }
|
|
|
Definition at line 236 of file RawDcsHvMonitorBlock.cxx. References GetRawGeometry(). Referenced by FormatToOStream(), and DcsWriter::ProcessRawRecord(). 00237 {
00238 Int_t iRawGeom = GetRawGeometry(indx);
00239 Int_t iTemp = iRawGeom/10;
00240 iRawGeom = iRawGeom - (iTemp*10);
00241 return (iRawGeom/3);
00242 }
|
|
|
Definition at line 293 of file RawDcsHvMonitorBlock.cxx. References FillHvArray(), GetMainframe(), RawDataBlock::GetMinorId(), and HvArray. Referenced by FormatToOStream(), GetVldContext(), and DcsWriter::ProcessRawRecord(). 00294 {
00295 FillHvArray();
00296 Int_t temptime=HvArray[(indx*6)];
00297 if (GetMinorId()==1)
00298 /* fix the temptime offset to be between 2003-06-03 12:24 and 2003011 03:22:26 */
00299 if ((temptime>1054643040)&&(temptime<1055301756))
00300 if ((GetMainframe(indx)<=8)&&(GetMainframe(indx)>=5))
00301 temptime=temptime+3600;
00302 return VldTimeStamp(temptime,0);
00303 }
|
|
|
Definition at line 150 of file RawDcsHvMonitorBlock.cxx. References RawDataBlock::GetBlockId(), RawBlockId::GetDetector(), RawBlockId::GetSimFlag(), and GetTimeStamp(). Referenced by DcsWriter::ProcessRawRecord(). 00151 {
00152 // build validity context
00153 RawBlockId rbid = GetBlockId();
00154 return VldContext(rbid.GetDetector(),rbid.GetSimFlag(),GetTimeStamp(0));
00155 }
|
|
|
Definition at line 50 of file RawDcsHvMonitorBlock.h. References fgDebugFlags. 00050 {fgDebugFlags=dbgflgs;}
|
|
|
Definition at line 14 of file RawDcsHvMonitorBlock.cxx. Referenced by SetDebugFlags(). |
|
|
Definition at line 61 of file RawDcsHvMonitorBlock.h. Referenced by FillHvArray(), GetAlarmbits(), GetRawChannel(), GetRawGeometry(), GetReadVoltage(), GetSetVoltage(), and GetTimeStamp(). |
1.3.9.1