Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

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

void SetDebugFlags (const UInt_t dbgflgs)
UInt_t GetDebugFlags ()

Protected Member Functions

void FillMagnetArray () const

Protected Attributes

const Int_t * MagnetArray

Static Private Attributes

UInt_t fgDebugFlags = 0

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]
 

Definition at line 169 of file RawDcsMagnetMonitorBlock.cxx.

References RawDataBlock::GetData(), and MagnetArray.

Referenced by GetCalIsT7(), GetCalZT11_BHZ01(), GetCalZT11_BHZ02(), GetCalZT11_QDE01(), GetCalZT11_QDE05(), GetCalZT11_QFO02(), GetCalZT11_QFO03(), GetCalZT11_QFO04(), GetCalZT11_QVT01(), GetCalZT7_BHZ01NS7(), GetCalZT7_BHZ01S7(), GetCalZT7_BHZ02(), GetCalZT7_QDE02(), GetCalZT7_QDE04(), GetCalZT7_QFO01(), GetCalZT7_QFO03(), GetCalZT7_QFO05(), GetFarCurrent(), GetFarImbalanceVoltage(), GetFarSupermodule(), GetFarThermocoupleArray(), GetFarVoltage(), GetNearCurrent(), GetNearRawData(), GetNearVoltage(), GetNearVoltageReference(), and GetTimeStamp().

00170 {
00171         //off by 3 since the first three are 1:num words, 2: checksum
00173         MagnetArray = 3 + GetData();
00174 }

std::ostream & RawDcsMagnetMonitorBlock::FormatToOStream std::ostream &  os,
Option_t *  option = ""
const [virtual]
 

Reimplemented from RawDataBlock.

Definition at line 79 of file RawDcsMagnetMonitorBlock.cxx.

References VldTimeStamp::AsString(), RawDataBlock::FormatToOStream(), GetCalIsT11(), GetCalIsT7(), GetCalZT11_BHZ01(), GetCalZT11_BHZ02(), GetCalZT11_QDE01(), GetCalZT11_QDE05(), GetCalZT11_QFO02(), GetCalZT11_QFO03(), GetCalZT11_QFO04(), GetCalZT11_QVT01(), GetCalZT7_BHZ01NS7(), GetCalZT7_BHZ01S7(), GetCalZT7_BHZ02(), GetCalZT7_QDE02(), GetCalZT7_QDE04(), GetCalZT7_QFO01(), GetCalZT7_QFO03(), GetCalZT7_QFO05(), GetFarCurrent(), GetFarImbalanceVoltage(), GetFarSupermodule(), GetFarThermocoupleArray(), GetFarVoltage(), GetMagDetector(), GetNearCurrent(), GetNearCurrentRegMode(), GetNearGroundFault(), GetNearInterLockState(), GetNearLocalRemoteState(), GetNearOnOffState(), GetNearRawData(), GetNearVoltage(), GetNearVoltageReference(), GetNumEntries(), GetNumEvents(), GetTimeStamp(), and option.

00081 {
00082    RawDataBlock::FormatToOStream(os,option);
00083    if (option[0] == 'X') return os;
00084 
00085    MsgFormat ffmt("%9.3f");
00086    Int_t iArray[30];
00087    Float_t fArray[30];
00088    Int_t numEntries=GetNumEntries();
00089    os << " Number of Entries " << numEntries
00090     << " Number of Events " << GetNumEvents() << endl;
00091    if (GetMagDetector()==Detector::kFar)
00092    {
00093            for(Int_t i = 0; i < numEntries; i++)
00094            {
00095                    os << "Timestamp " << GetTimeStamp(i).AsString("c") << setw(5)
00096                    << " Current "  << ffmt(GetFarCurrent(i)) << " Voltage " 
00097                    << ffmt(GetFarVoltage(i)) << " Supermodule number "<<GetFarSupermodule(i);
00098                    GetFarThermocoupleArray(i,iArray);
00099                    for(Int_t k = 0; k < 29; k++)
00100                    {
00101                            fArray[k] = 0;
00102                            memcpy(&fArray[k],&iArray[k],4);
00103                    }
00104                    for(Int_t j = 0; j < 29; j++)
00105                    {
00106                         os << " Thermocouple " << j+1 << " "
00107                         << ffmt(fArray[j]);
00108                    }
00109                    os << " Imbalance voltage " << ffmt(GetFarImbalanceVoltage(i)) << endl;
00110            }
00111    }
00112    if (GetMagDetector()==Detector::kCalDet)
00113    {
00114            for(Int_t i = 0; i < numEntries; i++)
00115            {
00116                    os << "Timestamp " << GetTimeStamp(i).AsString("c") << setw(5);
00117                    if (GetCalIsT7(i)==1)
00118                    {
00119                            os << " ZT7_BHZ01S7 " << ffmt(GetCalZT7_BHZ01S7(i))
00120                            << " ZT7_BHZ01NS7 " << ffmt(GetCalZT7_BHZ01NS7(i))
00121                            << " ZT7_BHZ02 " << ffmt(GetCalZT7_BHZ02(i))
00122                            << " ZT7_QFO01 " << ffmt(GetCalZT7_QFO01(i))
00123                            << " ZT7_QDE02 " << ffmt(GetCalZT7_QDE02(i))
00124                            << " ZT7_QFO03 " << ffmt(GetCalZT7_QFO03(i))
00125                            << " ZT7_QDE04 " << ffmt(GetCalZT7_QDE04(i))
00126                            << " ZT7_QFO05 " << ffmt(GetCalZT7_QFO05(i));
00127                    }
00128                    if (GetCalIsT11(i)==1)
00129                    {
00130                            os << " ZT11_QDE01 " << ffmt(GetCalZT11_QDE01(i))
00131                            << " ZT11_QFO02 " << ffmt(GetCalZT11_QFO02(i))
00132                            << " ZT11_BHZ01 " << ffmt(GetCalZT11_BHZ01(i))
00133                            << " ZT11_QFO03 " << ffmt(GetCalZT11_QFO03(i))
00134                            << " ZT11_BHZ02 " << ffmt(GetCalZT11_BHZ02(i))
00135                            << " ZT11_QFO04 " << ffmt(GetCalZT11_QFO04(i))
00136                            << " ZT11_QDE05 " << ffmt(GetCalZT11_QDE05(i))
00137                            << " ZT11_QVT01 " << ffmt(GetCalZT11_QVT01(i));
00138                    }
00139                    os << endl;
00140            }
00141            os << endl;
00142    }
00143    if (GetMagDetector()==Detector::kNear)
00144    {
00145            for(Int_t i = 0; i < numEntries; i++)
00146            {
00147                    os << "Timestamp " << GetTimeStamp(i).AsString("c") << setw(5)
00148                    << " Current "  << ffmt(GetNearCurrent(i)) << " Voltage " 
00149                    << ffmt(GetNearVoltage(i)) << " Voltage ref: " 
00150                    << ffmt(GetNearVoltageReference(i)) 
00151                    << " On or Off (on is 1): " << GetNearOnOffState(i) 
00152                    << " Raw Data: " << GetNearRawData(i) << " Remote: "
00153                    << GetNearLocalRemoteState(i) << "  Interlocks: "
00154                    << GetNearInterLockState(i) << "  ground fault: "
00155                    << GetNearGroundFault(i) << " current reg: "
00156                    << GetNearCurrentRegMode(i);
00157            }
00158            os << endl;
00159    }
00160    return os;
00161 }

Int_t RawDcsMagnetMonitorBlock::GetCalIsT11 Int_t  indx  )  const
 

Definition at line 433 of file RawDcsMagnetMonitorBlock.cxx.

References GetCalIsT7().

Referenced by FormatToOStream().

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(), and MagnetArray.

Referenced by FormatToOStream(), 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(), and MagnetArray.

Referenced by FormatToOStream(), and 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(), and MagnetArray.

Referenced by FormatToOStream(), and 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(), and MagnetArray.

Referenced by FormatToOStream(), and 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(), and MagnetArray.

Referenced by FormatToOStream(), and 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(), and MagnetArray.

Referenced by FormatToOStream(), and 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(), and MagnetArray.

Referenced by FormatToOStream(), and 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(), and MagnetArray.

Referenced by FormatToOStream(), and 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(), and MagnetArray.

Referenced by FormatToOStream(), and 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(), and MagnetArray.

Referenced by FormatToOStream(), and 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(), and MagnetArray.

Referenced by FormatToOStream(), and 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(), and MagnetArray.

Referenced by FormatToOStream(), and 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(), and MagnetArray.

Referenced by FormatToOStream(), and 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(), and MagnetArray.

Referenced by FormatToOStream(), and 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(), and MagnetArray.

Referenced by FormatToOStream(), and 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(), and MagnetArray.

Referenced by FormatToOStream(), and 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(), and MagnetArray.

Referenced by FormatToOStream(), and 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 }

UInt_t RawDcsMagnetMonitorBlock::GetDebugFlags  )  [inline, static]
 

Definition at line 74 of file RawDcsMagnetMonitorBlock.h.

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 FormatToOStream(), and 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 FormatToOStream(), and 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 FormatToOStream(), and 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 FormatToOStream(), and 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 FormatToOStream(), and 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
 

Definition at line 163 of file RawDcsMagnetMonitorBlock.cxx.

References RawDataBlock::GetBlockId(), and RawBlockId::GetDetector().

Referenced by FormatToOStream(), GetCalIsT7(), GetCalZT11_BHZ01(), GetCalZT11_BHZ02(), GetCalZT11_QDE01(), GetCalZT11_QDE05(), GetCalZT11_QFO02(), GetCalZT11_QFO03(), GetCalZT11_QFO04(), GetCalZT11_QVT01(), GetCalZT7_BHZ01NS7(), GetCalZT7_BHZ01S7(), GetCalZT7_BHZ02(), GetCalZT7_QDE02(), GetCalZT7_QDE04(), GetCalZT7_QFO01(), GetCalZT7_QFO03(), GetCalZT7_QFO05(), GetNumEntries(), GetTimeStamp(), and DcsWriter::ProcessRawRecord().

00164 {
00165         RawBlockId rbid = GetBlockId();
00166         return rbid.GetDetector();
00167 }

Float_t RawDcsMagnetMonitorBlock::GetNearCurrent Int_t  indx  )  const
 

Definition at line 193 of file RawDcsMagnetMonitorBlock.cxx.

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

Referenced by FormatToOStream(), and 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 FormatToOStream(), and 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 FormatToOStream(), and 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 FormatToOStream(), and 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 FormatToOStream(), and 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 FormatToOStream(), and 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 FormatToOStream(), 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 FormatToOStream(), and 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 FormatToOStream(), and 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 GetMagDetector(), RawDataBlock::GetMinorId(), and MSG.

Referenced by FormatToOStream(), 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().

Referenced by FormatToOStream().

00413 {
00414         return GetNumEntries();
00415 }

VldTimeStamp RawDcsMagnetMonitorBlock::GetTimeStamp Int_t  indx  )  const
 

Definition at line 176 of file RawDcsMagnetMonitorBlock.cxx.

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

Referenced by FormatToOStream(), 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
 

Definition at line 417 of file RawDcsMagnetMonitorBlock.cxx.

References RawDataBlock::GetBlockId(), RawBlockId::GetDetector(), RawBlockId::GetSimFlag(), and GetTimeStamp().

Referenced by DcsWriter::ProcessRawRecord().

00418 {
00419         RawBlockId rbid = GetBlockId();
00420         return VldContext(rbid.GetDetector(),rbid.GetSimFlag(),GetTimeStamp(0));
00421 }

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 15 of file RawDcsMagnetMonitorBlock.cxx.

Referenced by SetDebugFlags().

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

Definition at line 84 of file RawDcsMagnetMonitorBlock.h.

Referenced by FillMagnetArray(), GetCalIsT7(), GetCalZT11_BHZ01(), GetCalZT11_BHZ02(), GetCalZT11_QDE01(), GetCalZT11_QDE05(), GetCalZT11_QFO02(), GetCalZT11_QFO03(), GetCalZT11_QFO04(), GetCalZT11_QVT01(), GetCalZT7_BHZ01NS7(), GetCalZT7_BHZ01S7(), GetCalZT7_BHZ02(), GetCalZT7_QDE02(), GetCalZT7_QDE04(), GetCalZT7_QFO01(), GetCalZT7_QFO03(), GetCalZT7_QFO05(), GetFarCurrent(), GetFarImbalanceVoltage(), GetFarSupermodule(), GetFarThermocoupleArray(), GetFarVoltage(), GetNearCurrent(), GetNearRawData(), GetNearVoltage(), GetNearVoltageReference(), and GetTimeStamp().


The documentation for this class was generated from the following files:
Generated on Mon Nov 23 05:32:49 2009 for loon by  doxygen 1.3.9.1