RawDcsMagnetMonitorBlock Class Reference

#include <RawDcsMagnetMonitorBlock.h>

Inheritance diagram for RawDcsMagnetMonitorBlock:
RawDataBlock

List of all members.

Public Member Functions

 RawDcsMagnetMonitorBlock ()
 RawDcsMagnetMonitorBlock (const Int_t *block)
virtual ~RawDcsMagnetMonitorBlock ()
Int_t GetNumEvents () const
Int_t GetNumEntries () const
VldContext GetVldContext () const
VldTimeStamp GetTimeStamp (Int_t indx) const
Float_t GetFarCurrent (Int_t indx) const
Float_t GetFarVoltage (Int_t indx) const
Int_t GetFarSupermodule (Int_t indx) const
void GetFarThermocoupleArray (Int_t indx, Int_t iArray[30]) const
Float_t GetFarImbalanceVoltage (Int_t indx) const
Float_t GetNearCurrent (Int_t indx) const
Float_t GetNearVoltage (Int_t indx) const
Float_t GetNearVoltageReference (Int_t indx) const
Int_t GetNearRawData (Int_t indx) const
Int_t GetNearLocalRemoteState (Int_t indx) const
Int_t GetNearInterLockState (Int_t indx) const
Int_t GetNearOnOffState (Int_t indx) const
Int_t GetNearGroundFault (Int_t indx) const
Int_t GetNearDCOverCurrent (Int_t indx) const
Int_t GetNearOverTemp (Int_t indx) const
Int_t GetNearCurrentRegMode (Int_t indx) const
Int_t GetNearExternalRef (Int_t indx) const
Int_t GetNearPolarity (Int_t indx) const
Int_t GetMagDetector () const
Int_t GetCalIsT7 (Int_t indx) const
Int_t GetCalIsT11 (Int_t indx) const
Float_t GetCalZT7_BHZ01S7 (Int_t indx) const
Float_t GetCalZT7_BHZ01NS7 (Int_t indx) const
Float_t GetCalZT7_BHZ02 (Int_t indx) const
Float_t GetCalZT7_QFO01 (Int_t indx) const
Float_t GetCalZT7_QDE02 (Int_t indx) const
Float_t GetCalZT7_QFO03 (Int_t indx) const
Float_t GetCalZT7_QDE04 (Int_t indx) const
Float_t GetCalZT7_QFO05 (Int_t indx) const
Float_t GetCalZT11_QDE01 (Int_t indx) const
Float_t GetCalZT11_QFO02 (Int_t indx) const
Float_t GetCalZT11_BHZ01 (Int_t indx) const
Float_t GetCalZT11_QFO03 (Int_t indx) const
Float_t GetCalZT11_BHZ02 (Int_t indx) const
Float_t GetCalZT11_QFO04 (Int_t indx) const
Float_t GetCalZT11_QDE05 (Int_t indx) const
Float_t GetCalZT11_QVT01 (Int_t indx) const
virtual std::ostream & FormatToOStream (std::ostream &os, Option_t *option="") const
 RawDcsMagnetMonitorBlock (const RawDcsMagnetMonitorBlock &rhs)

Static Public Member Functions

static void SetDebugFlags (const UInt_t dbgflgs)
static UInt_t GetDebugFlags ()

Protected Member Functions

void FillMagnetArray () const

Protected Attributes

const Int_t * MagnetArray

Static Private Attributes

static UInt_t fgDebugFlags = 0

Detailed Description

Definition at line 18 of file RawDcsMagnetMonitorBlock.h.


Constructor & Destructor Documentation

RawDcsMagnetMonitorBlock::RawDcsMagnetMonitorBlock (  ) 

Definition at line 35 of file RawDcsMagnetMonitorBlock.cxx.

00036   : MagnetArray(0)
00037 {
00038    // Default constructor
00039 }

RawDcsMagnetMonitorBlock::RawDcsMagnetMonitorBlock ( const Int_t *  block  ) 

Definition at line 42 of file RawDcsMagnetMonitorBlock.cxx.

00043   : RawDataBlock(block), MagnetArray(0)
00044 {
00045    //  stored block format is:
00046    //---------------------
00047    //  0   # words in block
00048    //  1   checksum
00049    //  2   Block Id
00050    //-----
00051    /*
00052     *  The data has the following repeating structure from here
00053     *  Int_t n = ((i-3)/32) = num blocks (test modulo for errors);
00054     *  Int_t d[n*32];  d = block+3;
00055     *  Int_t indx;
00056     *  d[(indx*32)+0] = timestamp (long sec)
00057     *  d[(indx*32)+1] = current
00058     *  d[(indx*32)+2] = voltage
00059     *  d[(indx*32)+3] = therm1
00060     *  . . . . 27 more thermocouples
00061     *  d[(indx*32)+31] = therm29
00062     *  indx++;(test if indx is greater than n, if so, finito)
00063     *
00064     *  FUTURE VERSION FOR SM2 MAGNET'S CURRENT, VOLTAGE AND THERMS
00065     *  SM1 and SM2 must be able to get supermodule number (version 1 just
00066     *  returns sm1, version 2 must split depending on info in rawblock, find
00067     *  version number in blockid).  Version 2 is also one Int_t longer
00068     *  (supermod number at end of block, d[(indx*32)+32] = supermod)
00069     */
00070 }

RawDcsMagnetMonitorBlock::~RawDcsMagnetMonitorBlock (  )  [virtual]

Definition at line 73 of file RawDcsMagnetMonitorBlock.cxx.

00074 {
00075    // dtor
00076 }

RawDcsMagnetMonitorBlock::RawDcsMagnetMonitorBlock ( const RawDcsMagnetMonitorBlock rhs  )  [inline]

Definition at line 77 of file RawDcsMagnetMonitorBlock.h.

00078      : RawDataBlock(rhs) { ; }


Member Function Documentation

void RawDcsMagnetMonitorBlock::FillMagnetArray (  )  const [protected]
virtual std::ostream& RawDcsMagnetMonitorBlock::FormatToOStream ( std::ostream &  os,
Option_t *  option = "" 
) const [virtual]

Reimplemented from RawDataBlock.

Int_t RawDcsMagnetMonitorBlock::GetCalIsT11 ( Int_t  indx  )  const

Definition at line 433 of file RawDcsMagnetMonitorBlock.cxx.

References GetCalIsT7().

00434 {
00435         if (GetCalIsT7(indx)==1)
00436                 return 0;
00437         return 1;
00438 }

Int_t RawDcsMagnetMonitorBlock::GetCalIsT7 ( Int_t  indx  )  const

Definition at line 425 of file RawDcsMagnetMonitorBlock.cxx.

References FillMagnetArray(), GetMagDetector(), Detector::kCalDet, and MagnetArray.

Referenced by GetCalIsT11(), and DcsWriter::ProcessRawRecord().

00426 {
00427         if(GetMagDetector()!=Detector::kCalDet)
00428                 return 0;
00429         FillMagnetArray();
00430         return MagnetArray[(indx*18)+1];
00431 }

Float_t RawDcsMagnetMonitorBlock::GetCalZT11_BHZ01 ( Int_t  indx  )  const

Definition at line 540 of file RawDcsMagnetMonitorBlock.cxx.

References FillMagnetArray(), GetMagDetector(), Detector::kCalDet, and MagnetArray.

Referenced by DcsWriter::ProcessRawRecord().

00541 {
00542         if(GetMagDetector()!=Detector::kCalDet)
00543                 return 0.0;
00544         FillMagnetArray();
00545         Float_t fValue=0;
00546         memcpy(&fValue,&MagnetArray[(indx*18)+12],4);
00547         return fValue;
00548 }

Float_t RawDcsMagnetMonitorBlock::GetCalZT11_BHZ02 ( Int_t  indx  )  const

Definition at line 560 of file RawDcsMagnetMonitorBlock.cxx.

References FillMagnetArray(), GetMagDetector(), Detector::kCalDet, and MagnetArray.

Referenced by DcsWriter::ProcessRawRecord().

00561 {
00562         if(GetMagDetector()!=Detector::kCalDet)
00563                 return 0.0;
00564         FillMagnetArray();
00565         Float_t fValue=0;
00566         memcpy(&fValue,&MagnetArray[(indx*18)+14],4);
00567         return fValue;
00568 }

Float_t RawDcsMagnetMonitorBlock::GetCalZT11_QDE01 ( Int_t  indx  )  const

Definition at line 520 of file RawDcsMagnetMonitorBlock.cxx.

References FillMagnetArray(), GetMagDetector(), Detector::kCalDet, and MagnetArray.

Referenced by DcsWriter::ProcessRawRecord().

00521 {
00522         if(GetMagDetector()!=Detector::kCalDet)
00523                 return 0.0;
00524         FillMagnetArray();
00525         Float_t fValue=0;
00526         memcpy(&fValue,&MagnetArray[(indx*18)+10],4);
00527         return fValue;
00528 }

Float_t RawDcsMagnetMonitorBlock::GetCalZT11_QDE05 ( Int_t  indx  )  const

Definition at line 580 of file RawDcsMagnetMonitorBlock.cxx.

References FillMagnetArray(), GetMagDetector(), Detector::kCalDet, and MagnetArray.

Referenced by DcsWriter::ProcessRawRecord().

00581 {
00582         if(GetMagDetector()!=Detector::kCalDet)
00583                 return 0.0;
00584         FillMagnetArray();
00585         Float_t fValue=0;
00586         memcpy(&fValue,&MagnetArray[(indx*18)+16],4);
00587         return fValue;
00588 }

Float_t RawDcsMagnetMonitorBlock::GetCalZT11_QFO02 ( Int_t  indx  )  const

Definition at line 530 of file RawDcsMagnetMonitorBlock.cxx.

References FillMagnetArray(), GetMagDetector(), Detector::kCalDet, and MagnetArray.

Referenced by DcsWriter::ProcessRawRecord().

00531 {
00532         if(GetMagDetector()!=Detector::kCalDet)
00533                 return 0.0;
00534         FillMagnetArray();
00535         Float_t fValue=0;
00536         memcpy(&fValue,&MagnetArray[(indx*18)+11],4);
00537         return fValue;
00538 }

Float_t RawDcsMagnetMonitorBlock::GetCalZT11_QFO03 ( Int_t  indx  )  const

Definition at line 550 of file RawDcsMagnetMonitorBlock.cxx.

References FillMagnetArray(), GetMagDetector(), Detector::kCalDet, and MagnetArray.

Referenced by DcsWriter::ProcessRawRecord().

00551 {
00552         if(GetMagDetector()!=Detector::kCalDet)
00553                 return 0.0;
00554         FillMagnetArray();
00555         Float_t fValue=0;
00556         memcpy(&fValue,&MagnetArray[(indx*18)+13],4);
00557         return fValue;
00558 }

Float_t RawDcsMagnetMonitorBlock::GetCalZT11_QFO04 ( Int_t  indx  )  const

Definition at line 570 of file RawDcsMagnetMonitorBlock.cxx.

References FillMagnetArray(), GetMagDetector(), Detector::kCalDet, and MagnetArray.

Referenced by DcsWriter::ProcessRawRecord().

00571 {
00572         if(GetMagDetector()!=Detector::kCalDet)
00573                 return 0.0;
00574         FillMagnetArray();
00575         Float_t fValue=0;
00576         memcpy(&fValue,&MagnetArray[(indx*18)+15],4);
00577         return fValue;
00578 }

Float_t RawDcsMagnetMonitorBlock::GetCalZT11_QVT01 ( Int_t  indx  )  const

Definition at line 590 of file RawDcsMagnetMonitorBlock.cxx.

References FillMagnetArray(), GetMagDetector(), Detector::kCalDet, and MagnetArray.

Referenced by DcsWriter::ProcessRawRecord().

00591 {
00592         if(GetMagDetector()!=Detector::kCalDet)
00593                 return 0.0;
00594         FillMagnetArray();
00595         Float_t fValue=0;
00596         memcpy(&fValue,&MagnetArray[(indx*18)+17],4);
00597         return fValue;
00598 }

Float_t RawDcsMagnetMonitorBlock::GetCalZT7_BHZ01NS7 ( Int_t  indx  )  const

Definition at line 450 of file RawDcsMagnetMonitorBlock.cxx.

References FillMagnetArray(), GetMagDetector(), Detector::kCalDet, and MagnetArray.

Referenced by DcsWriter::ProcessRawRecord().

00451 {
00452         if(GetMagDetector()!=Detector::kCalDet)
00453                 return 0.0;
00454         FillMagnetArray();
00455         Float_t fValue=0;
00456         memcpy(&fValue,&MagnetArray[(indx*18)+3],4);
00457         return fValue;
00458 }

Float_t RawDcsMagnetMonitorBlock::GetCalZT7_BHZ01S7 ( Int_t  indx  )  const

Definition at line 440 of file RawDcsMagnetMonitorBlock.cxx.

References FillMagnetArray(), GetMagDetector(), Detector::kCalDet, and MagnetArray.

Referenced by DcsWriter::ProcessRawRecord().

00441 {
00442         if(GetMagDetector()!=Detector::kCalDet)
00443                 return 0.0;
00444         FillMagnetArray();
00445         Float_t fValue=0;
00446         memcpy(&fValue,&MagnetArray[(indx*18)+2],4);
00447         return fValue;
00448 }

Float_t RawDcsMagnetMonitorBlock::GetCalZT7_BHZ02 ( Int_t  indx  )  const

Definition at line 460 of file RawDcsMagnetMonitorBlock.cxx.

References FillMagnetArray(), GetMagDetector(), Detector::kCalDet, and MagnetArray.

Referenced by DcsWriter::ProcessRawRecord().

00461 {
00462         if(GetMagDetector()!=Detector::kCalDet)
00463                 return 0.0;
00464         FillMagnetArray();
00465         Float_t fValue=0;
00466         memcpy(&fValue,&MagnetArray[(indx*18)+4],4);
00467         return fValue;
00468 }

Float_t RawDcsMagnetMonitorBlock::GetCalZT7_QDE02 ( Int_t  indx  )  const

Definition at line 480 of file RawDcsMagnetMonitorBlock.cxx.

References FillMagnetArray(), GetMagDetector(), Detector::kCalDet, and MagnetArray.

Referenced by DcsWriter::ProcessRawRecord().

00481 {
00482         if(GetMagDetector()!=Detector::kCalDet)
00483                 return 0.0;
00484         FillMagnetArray();
00485         Float_t fValue=0;
00486         memcpy(&fValue,&MagnetArray[(indx*18)+6],4);
00487         return fValue;
00488 }

Float_t RawDcsMagnetMonitorBlock::GetCalZT7_QDE04 ( Int_t  indx  )  const

Definition at line 500 of file RawDcsMagnetMonitorBlock.cxx.

References FillMagnetArray(), GetMagDetector(), Detector::kCalDet, and MagnetArray.

Referenced by DcsWriter::ProcessRawRecord().

00501 {
00502         if(GetMagDetector()!=Detector::kCalDet)
00503                 return 0.0;
00504         FillMagnetArray();
00505         Float_t fValue=0;
00506         memcpy(&fValue,&MagnetArray[(indx*18)+8],4);
00507         return fValue;
00508 }

Float_t RawDcsMagnetMonitorBlock::GetCalZT7_QFO01 ( Int_t  indx  )  const

Definition at line 470 of file RawDcsMagnetMonitorBlock.cxx.

References FillMagnetArray(), GetMagDetector(), Detector::kCalDet, and MagnetArray.

Referenced by DcsWriter::ProcessRawRecord().

00471 {
00472         if(GetMagDetector()!=Detector::kCalDet)
00473                 return 0.0;
00474         FillMagnetArray();
00475         Float_t fValue=0;
00476         memcpy(&fValue,&MagnetArray[(indx*18)+5],4);
00477         return fValue;
00478 }

Float_t RawDcsMagnetMonitorBlock::GetCalZT7_QFO03 ( Int_t  indx  )  const

Definition at line 490 of file RawDcsMagnetMonitorBlock.cxx.

References FillMagnetArray(), GetMagDetector(), Detector::kCalDet, and MagnetArray.

Referenced by DcsWriter::ProcessRawRecord().

00491 {
00492         if(GetMagDetector()!=Detector::kCalDet)
00493                 return 0.0;
00494         FillMagnetArray();
00495         Float_t fValue=0;
00496         memcpy(&fValue,&MagnetArray[(indx*18)+7],4);
00497         return fValue;
00498 }

Float_t RawDcsMagnetMonitorBlock::GetCalZT7_QFO05 ( Int_t  indx  )  const

Definition at line 510 of file RawDcsMagnetMonitorBlock.cxx.

References FillMagnetArray(), GetMagDetector(), Detector::kCalDet, and MagnetArray.

Referenced by DcsWriter::ProcessRawRecord().

00511 {
00512         if(GetMagDetector()!=Detector::kCalDet)
00513                 return 0.0;
00514         FillMagnetArray();
00515         Float_t fValue=0;
00516         memcpy(&fValue,&MagnetArray[(indx*18)+9],4);
00517         return fValue;
00518 }

static UInt_t RawDcsMagnetMonitorBlock::GetDebugFlags (  )  [inline, static]

Definition at line 74 of file RawDcsMagnetMonitorBlock.h.

References fgDebugFlags.

00074 { return fgDebugFlags; }

Float_t RawDcsMagnetMonitorBlock::GetFarCurrent ( Int_t  indx  )  const

Definition at line 272 of file RawDcsMagnetMonitorBlock.cxx.

References FillMagnetArray(), RawDataBlock::GetMinorId(), and MagnetArray.

Referenced by DcsWriter::ProcessRawRecord().

00273 {
00274         FillMagnetArray();
00275         Float_t fValue=0.0;
00276         if (GetMinorId()==1)
00277                 memcpy(&fValue,&MagnetArray[(indx*32)+1],4);
00278         if (GetMinorId()==2)
00279                 memcpy(&fValue,&MagnetArray[(indx*33)+1],4);
00280         if (GetMinorId()==3)
00281                 memcpy(&fValue,&MagnetArray[(indx*34)+1],4);
00282         return fValue;
00283 }

Float_t RawDcsMagnetMonitorBlock::GetFarImbalanceVoltage ( Int_t  indx  )  const

Definition at line 298 of file RawDcsMagnetMonitorBlock.cxx.

References FillMagnetArray(), RawDataBlock::GetMinorId(), and MagnetArray.

Referenced by DcsWriter::ProcessRawRecord().

00299 {
00300         FillMagnetArray();
00301         Float_t fValue = 0.0;
00302         if (GetMinorId()<3)
00303                 return fValue;
00304         memcpy(&fValue,&MagnetArray[(indx*34)+33],4);
00305         return fValue;
00306 }

Int_t RawDcsMagnetMonitorBlock::GetFarSupermodule ( Int_t  indx  )  const

Definition at line 308 of file RawDcsMagnetMonitorBlock.cxx.

References FillMagnetArray(), RawDataBlock::GetMinorId(), and MagnetArray.

Referenced by DcsWriter::ProcessRawRecord().

00309 {
00310         FillMagnetArray();
00311         Int_t iValue=0;
00312         if (GetMinorId()==1)
00313                 return 1;
00314         if (GetMinorId()==2)
00315         {
00316                 memcpy(&iValue,&MagnetArray[(indx*33)+32],4);
00317                 return iValue;
00318         }
00319         if (GetMinorId()==3)
00320         {
00321                 memcpy(&iValue,&MagnetArray[(indx*34)+32],4);
00322                 return iValue;
00323         }
00324         return 0;
00325 }

void RawDcsMagnetMonitorBlock::GetFarThermocoupleArray ( Int_t  indx,
Int_t  iArray[30] 
) const

Definition at line 327 of file RawDcsMagnetMonitorBlock.cxx.

References FillMagnetArray(), RawDataBlock::GetMinorId(), and MagnetArray.

Referenced by DcsWriter::ProcessRawRecord().

00328 {
00329         FillMagnetArray();
00330         if (GetMinorId()==1)
00331                 for(Int_t i = 0; i < 29; i++)
00332                 {
00333                         iArray[i] = MagnetArray[(indx*32)+3+i];
00334                 }
00335         if (GetMinorId()==2)
00336                 for (Int_t i = 0; i < 30; i++)
00337                 {
00338                         iArray[i] = MagnetArray[(indx*33)+3+i];
00339                 }
00340         if (GetMinorId()==3)
00341                 for (Int_t i = 0; i < 30; i++)
00342                 {
00343                         iArray[i] = MagnetArray[(indx*34)+3+i];
00344                 }
00345 }

Float_t RawDcsMagnetMonitorBlock::GetFarVoltage ( Int_t  indx  )  const

Definition at line 285 of file RawDcsMagnetMonitorBlock.cxx.

References FillMagnetArray(), RawDataBlock::GetMinorId(), and MagnetArray.

Referenced by DcsWriter::ProcessRawRecord().

00286 {
00287         FillMagnetArray();
00288         Float_t fValue = 0.0;
00289         if (GetMinorId()==1)
00290                 memcpy(&fValue,&MagnetArray[(indx*32)+2],4);
00291         if (GetMinorId()==2)
00292                 memcpy(&fValue,&MagnetArray[(indx*33)+2],4);
00293         if (GetMinorId()==3)
00294                 memcpy(&fValue,&MagnetArray[(indx*34)+2],4);
00295         return fValue;
00296 }

Int_t RawDcsMagnetMonitorBlock::GetMagDetector (  )  const
Float_t RawDcsMagnetMonitorBlock::GetNearCurrent ( Int_t  indx  )  const

Definition at line 193 of file RawDcsMagnetMonitorBlock.cxx.

References FillMagnetArray(), RawDataBlock::GetMinorId(), and MagnetArray.

Referenced by DcsWriter::ProcessRawRecord().

00194 {
00195         FillMagnetArray();
00196         Float_t fValue=0.0;
00197         if (GetMinorId()==4)
00198                 memcpy(&fValue,&MagnetArray[(indx*5)+1],4);
00199         return fValue;
00200 }

Int_t RawDcsMagnetMonitorBlock::GetNearCurrentRegMode ( Int_t  indx  )  const

Definition at line 256 of file RawDcsMagnetMonitorBlock.cxx.

References GetNearRawData().

Referenced by DcsWriter::ProcessRawRecord().

00256                                                                       {
00257         Int_t raw = GetNearRawData(indx);
00258         return (raw/64)%2;
00259 }

Int_t RawDcsMagnetMonitorBlock::GetNearDCOverCurrent ( Int_t  indx  )  const

Definition at line 246 of file RawDcsMagnetMonitorBlock.cxx.

References GetNearRawData().

Referenced by DcsWriter::ProcessRawRecord().

00246                                                                      {
00247         Int_t raw = GetNearRawData(indx);
00248         return (raw/16)%2;
00249 }

Int_t RawDcsMagnetMonitorBlock::GetNearExternalRef ( Int_t  indx  )  const

Definition at line 261 of file RawDcsMagnetMonitorBlock.cxx.

References GetNearRawData().

Referenced by DcsWriter::ProcessRawRecord().

00261                                                                    {
00262         Int_t raw = GetNearRawData(indx);
00263         return (raw/128)%2;
00264 }

Int_t RawDcsMagnetMonitorBlock::GetNearGroundFault ( Int_t  indx  )  const

Definition at line 241 of file RawDcsMagnetMonitorBlock.cxx.

References GetNearRawData().

Referenced by DcsWriter::ProcessRawRecord().

00241                                                                    {
00242         Int_t raw = GetNearRawData(indx);
00243         return (raw/8)%2;
00244 }

Int_t RawDcsMagnetMonitorBlock::GetNearInterLockState ( Int_t  indx  )  const

Definition at line 231 of file RawDcsMagnetMonitorBlock.cxx.

References GetNearRawData().

Referenced by DcsWriter::ProcessRawRecord().

00231                                                                       {
00232         Int_t raw = GetNearRawData(indx);
00233         return (raw/2)%2;
00234 }

Int_t RawDcsMagnetMonitorBlock::GetNearLocalRemoteState ( Int_t  indx  )  const

Definition at line 226 of file RawDcsMagnetMonitorBlock.cxx.

References GetNearRawData().

Referenced by DcsWriter::ProcessRawRecord().

00226                                                                         {
00227         Int_t raw = GetNearRawData(indx);
00228         return (raw%2);
00229 }

Int_t RawDcsMagnetMonitorBlock::GetNearOnOffState ( Int_t  indx  )  const

Definition at line 236 of file RawDcsMagnetMonitorBlock.cxx.

References GetNearRawData().

Referenced by DcsWriter::ProcessRawRecord().

00236                                                                   {
00237         Int_t raw = GetNearRawData(indx);
00238         return (raw/4)%2;
00239 }

Int_t RawDcsMagnetMonitorBlock::GetNearOverTemp ( Int_t  indx  )  const

Definition at line 251 of file RawDcsMagnetMonitorBlock.cxx.

References GetNearRawData().

Referenced by DcsWriter::ProcessRawRecord().

00251                                                                 {
00252         Int_t raw = GetNearRawData(indx);
00253         return (raw/32)%2;
00254 }

Int_t RawDcsMagnetMonitorBlock::GetNearPolarity ( Int_t  indx  )  const

Definition at line 266 of file RawDcsMagnetMonitorBlock.cxx.

References GetNearRawData().

Referenced by DcsWriter::ProcessRawRecord().

00266                                                                 {
00267         Int_t raw = GetNearRawData(indx);
00268         return (raw/256)%2;
00269 }

Int_t RawDcsMagnetMonitorBlock::GetNearRawData ( Int_t  indx  )  const

Definition at line 218 of file RawDcsMagnetMonitorBlock.cxx.

References FillMagnetArray(), RawDataBlock::GetMinorId(), and MagnetArray.

Referenced by GetNearCurrentRegMode(), GetNearDCOverCurrent(), GetNearExternalRef(), GetNearGroundFault(), GetNearInterLockState(), GetNearLocalRemoteState(), GetNearOnOffState(), GetNearOverTemp(), GetNearPolarity(), and DcsWriter::ProcessRawRecord().

00218                                                                {
00219         FillMagnetArray();
00220         if (GetMinorId()==4)
00221                 return MagnetArray[(indx*5)+4];
00222                 //memcpy(&iValue,&MagnetArray[(indx*5)+4],4);
00223         return 0;
00224 }

Float_t RawDcsMagnetMonitorBlock::GetNearVoltage ( Int_t  indx  )  const

Definition at line 202 of file RawDcsMagnetMonitorBlock.cxx.

References FillMagnetArray(), RawDataBlock::GetMinorId(), and MagnetArray.

Referenced by DcsWriter::ProcessRawRecord().

00202                                                                  {
00203         FillMagnetArray();
00204         Float_t fValue=0.0;
00205         if (GetMinorId()==4)
00206                 memcpy(&fValue,&MagnetArray[(indx*5)+2],4);
00207         return fValue;
00208 }

Float_t RawDcsMagnetMonitorBlock::GetNearVoltageReference ( Int_t  indx  )  const

Definition at line 210 of file RawDcsMagnetMonitorBlock.cxx.

References FillMagnetArray(), RawDataBlock::GetMinorId(), and MagnetArray.

Referenced by DcsWriter::ProcessRawRecord().

00210                                                                           {
00211         FillMagnetArray();
00212         Float_t fValue=0.0;
00213         if (GetMinorId()==4)
00214                 memcpy(&fValue,&MagnetArray[(indx*5)+3],4);
00215         return fValue;
00216 }

Int_t RawDcsMagnetMonitorBlock::GetNumEntries (  )  const

Definition at line 347 of file RawDcsMagnetMonitorBlock.cxx.

References RawDataBlock::fSize, GetMagDetector(), RawDataBlock::GetMinorId(), Detector::kCalDet, Msg::kError, Detector::kNear, and MSG.

Referenced by GetNumEvents(), and DcsWriter::ProcessRawRecord().

00348 {
00349         if (GetMagDetector()==Detector::kCalDet)
00350         {
00351                 if((fSize-3)%18)
00352                 {
00353                         MSG("RawData",Msg::kError)
00354                                 << " Size of Magnet Block screwed up.  Have: "
00355                                 << (fSize-3)%18 << " left over from modulo 18. "
00356                                 << endl;
00357                         return -1;
00358                 }
00359                 return ((fSize-3)/18);
00360         }
00361         if (GetMinorId()==1)
00362         {
00363                 if((fSize-3)%32)
00364                 {
00365                         MSG("RawData",Msg::kError)
00366                                 << " Size of Magnet Block screwed up.  Have: "
00367                                 << (fSize-3)%32 << " left over from modulo 32. "
00368                                 << endl;
00369                         return -1;
00370                 }
00371                 return ((fSize-3)/32);
00372         }
00373         if (GetMinorId()==2)
00374         {
00375                 if((fSize-3)%33)
00376                 {
00377                         MSG("RawData",Msg::kError)
00378                                 << " Size of Magnet Block screwed up.  Have: "
00379                                 << (fSize-3)%33 << " left over from modulo 33. "
00380                                 << endl;
00381                         return -1;
00382                 }
00383                 return ((fSize-3)/33);
00384         }
00385         if (GetMinorId()==3)
00386         {
00387                 if((fSize-3)%34)
00388                 {
00389                         MSG("RawData",Msg::kError)
00390                                 << " Size of Magnet Block screwed up.  Have: "
00391                                 << (fSize-3)%34 << " left over from modulo 34. "
00392                                 << endl;
00393                         return -1;
00394                 }
00395                 return ((fSize-3)/34);
00396         }
00397         if ((GetMinorId()==4)&&(GetMagDetector()==Detector::kNear))
00398         {
00399                 if((fSize-3)%5)
00400                 {
00401                         MSG("RawData",Msg::kError)
00402                                 << " Size of Magnet Block screwed up.  Have: "
00403                                 << (fSize-3)%5 << " left over from modulo 34. "
00404                                 << endl;
00405                         return -1;
00406                 }
00407                 return ((fSize-3)/5);
00408         }
00409         return 0;
00410 }

Int_t RawDcsMagnetMonitorBlock::GetNumEvents (  )  const

Definition at line 412 of file RawDcsMagnetMonitorBlock.cxx.

References GetNumEntries().

00413 {
00414         return GetNumEntries();
00415 }

VldTimeStamp RawDcsMagnetMonitorBlock::GetTimeStamp ( Int_t  indx  )  const

Definition at line 176 of file RawDcsMagnetMonitorBlock.cxx.

References exit(), FillMagnetArray(), GetMagDetector(), RawDataBlock::GetMinorId(), Detector::kCalDet, Detector::kNear, and MagnetArray.

Referenced by GetVldContext(), and DcsWriter::ProcessRawRecord().

00177 {
00178         FillMagnetArray();
00179         if (GetMagDetector()==Detector::kCalDet)
00180                 return VldTimeStamp(MagnetArray[indx*11],0);
00181         if (GetMagDetector()==Detector::kNear)
00182                 return VldTimeStamp(MagnetArray[indx*5],0);
00183         if (GetMinorId()==1)
00184                 return VldTimeStamp(MagnetArray[(indx*32)],0);
00185         if (GetMinorId()==2)
00186                 return VldTimeStamp(MagnetArray[(indx*33)],0);
00187         if (GetMinorId()==3)
00188                 return VldTimeStamp(MagnetArray[(indx*34)],0);
00189         printf("fell through on minor version number\n");
00190         exit(1);
00191 }

VldContext RawDcsMagnetMonitorBlock::GetVldContext (  )  const
static void RawDcsMagnetMonitorBlock::SetDebugFlags ( const UInt_t  dbgflgs  )  [inline, static]

Definition at line 73 of file RawDcsMagnetMonitorBlock.h.

References fgDebugFlags.

00073 {fgDebugFlags=dbgflgs;}


Member Data Documentation

UInt_t RawDcsMagnetMonitorBlock::fgDebugFlags = 0 [static, private]

Definition at line 89 of file RawDcsMagnetMonitorBlock.h.

Referenced by GetDebugFlags(), and SetDebugFlags().

const Int_t* RawDcsMagnetMonitorBlock::MagnetArray [mutable, protected]

The documentation for this class was generated from the following files:

Generated on 22 Nov 2017 for loon by  doxygen 1.6.1