RawDcsChillerMonitorBlock Class Reference

#include <RawDcsChillerMonitorBlock.h>

Inheritance diagram for RawDcsChillerMonitorBlock:
RawDataBlock

List of all members.

Public Member Functions

 RawDcsChillerMonitorBlock ()
 RawDcsChillerMonitorBlock (const Int_t *block)
virtual ~RawDcsChillerMonitorBlock ()
Int_t GetNumEvents () const
Int_t GetNumEntries () const
VldContext GetVldContext () const
VldTimeStamp GetTimeStamp (Int_t indx) const
Float_t GetReturnWt (Int_t indx) const
Float_t GetDischargeFct (Int_t indx) const
Float_t GetReturnCwt (Int_t indx) const
Float_t GetDischargeCwt (Int_t indx) const
Int_t GetStateFluidCooler (Int_t indx) const
Int_t GetStatePumpP4 (Int_t indx) const
Int_t GetStateChiller1 (Int_t indx) const
Int_t GetStateChiller2 (Int_t indx) const
Float_t GetDetReturnCwt (Int_t indx) const
Float_t GetDetSupplyCwt (Int_t indx) const
Int_t GetStatePumpP5 (Int_t indx) const
Int_t GetStateDetAlarm (Int_t indx) const
Float_t GetAhuS1RmTemp (Int_t indx) const
Float_t GetHx3ColdRetWt (Int_t indx) const
Float_t GetHx3WarmDischWt (Int_t indx) const
Int_t GetStatePumpP1 (Int_t indx) const
Float_t GetFcu1RmTemp (Int_t indx) const
Float_t GetFcu2RmTemp (Int_t indx) const
Float_t GetS1RmTemp (Int_t indx) const
Float_t GetSurfaceTemp (Int_t indx) const
virtual std::ostream & FormatToOStream (std::ostream &os, Option_t *option="") const
 RawDcsChillerMonitorBlock (const RawDcsChillerMonitorBlock &rhs)

Static Public Member Functions

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

Protected Member Functions

void FillChillerArray () const

Protected Attributes

const Int_t * ChillerArray

Static Private Attributes

static UInt_t fgDebugFlags = 0

Detailed Description

Definition at line 19 of file RawDcsChillerMonitorBlock.h.


Constructor & Destructor Documentation

RawDcsChillerMonitorBlock::RawDcsChillerMonitorBlock (  ) 

Definition at line 26 of file RawDcsChillerMonitorBlock.cxx.

00027 {
00028    // Default constructor
00029 }

RawDcsChillerMonitorBlock::RawDcsChillerMonitorBlock ( const Int_t *  block  ) 

Definition at line 32 of file RawDcsChillerMonitorBlock.cxx.

00033    : RawDataBlock(block)
00034 {
00035    //  stored block format is:
00036    //---------------------
00037    //  0   # words in block
00038    //  1   checksum
00039    //  2   Block Id
00040    //-----
00041    /*
00042     *  The data has the following repeating structure from here
00043     *  Int_t n = ((i-3)/4) = num blocks (test modulo for errors);
00044     *  Int_t d[n*4];  d = block+3;
00045     *  Int_t indx;
00046     *  d[(indx*4)+0] = timestamp (long sec)
00047     *  d[(indx*4)+1] = rackno (long)
00048     *  d[(indx*4)+2] = raw(long)
00049     *  d[(indx*4)+3] = status(signed long)
00050     *  indx++;(test if indx is greater than n, if so, finito)
00051         *                                          *
00052     */
00053 }

RawDcsChillerMonitorBlock::~RawDcsChillerMonitorBlock (  )  [virtual]

Definition at line 56 of file RawDcsChillerMonitorBlock.cxx.

00057 {
00058    // dtor
00059 }

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

Definition at line 58 of file RawDcsChillerMonitorBlock.h.

00059      : RawDataBlock(rhs) { ; }


Member Function Documentation

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

Reimplemented from RawDataBlock.

Float_t RawDcsChillerMonitorBlock::GetAhuS1RmTemp ( Int_t  indx  )  const

Definition at line 189 of file RawDcsChillerMonitorBlock.cxx.

References ChillerArray, and FillChillerArray().

Referenced by DcsWriter::ProcessRawRecord().

00190 {
00191         FillChillerArray();
00192         Float_t fValue = 0.0;
00193         memcpy(&fValue,&ChillerArray[(indx*21)+13],4);
00194         return fValue;
00195 }

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

Definition at line 55 of file RawDcsChillerMonitorBlock.h.

References fgDebugFlags.

00055 { return fgDebugFlags; }

Float_t RawDcsChillerMonitorBlock::GetDetReturnCwt ( Int_t  indx  )  const

Definition at line 173 of file RawDcsChillerMonitorBlock.cxx.

References ChillerArray, and FillChillerArray().

Referenced by DcsWriter::ProcessRawRecord().

00174 {
00175         FillChillerArray();
00176         Float_t fValue = 0.0;
00177         memcpy(&fValue,&ChillerArray[(indx*21)+9],4);
00178         return fValue;
00179 }

Float_t RawDcsChillerMonitorBlock::GetDetSupplyCwt ( Int_t  indx  )  const

Definition at line 181 of file RawDcsChillerMonitorBlock.cxx.

References ChillerArray, and FillChillerArray().

Referenced by DcsWriter::ProcessRawRecord().

00182 {
00183         FillChillerArray();
00184         Float_t fValue = 0.0;
00185         memcpy(&fValue,&ChillerArray[(indx*21)+10],4);
00186         return fValue;
00187 }

Float_t RawDcsChillerMonitorBlock::GetDischargeCwt ( Int_t  indx  )  const

Definition at line 165 of file RawDcsChillerMonitorBlock.cxx.

References ChillerArray, and FillChillerArray().

Referenced by DcsWriter::ProcessRawRecord().

00166 {
00167         FillChillerArray();
00168         Float_t fValue = 0.0;
00169         memcpy(&fValue,&ChillerArray[(indx*21)+4],4);
00170         return fValue;
00171 }

Float_t RawDcsChillerMonitorBlock::GetDischargeFct ( Int_t  indx  )  const

Definition at line 149 of file RawDcsChillerMonitorBlock.cxx.

References ChillerArray, and FillChillerArray().

Referenced by DcsWriter::ProcessRawRecord().

00150 {
00151         FillChillerArray();
00152         Float_t fValue = 0.0;
00153         memcpy(&fValue,&ChillerArray[(indx*21)+2],4);
00154         return fValue;
00155 }

Float_t RawDcsChillerMonitorBlock::GetFcu1RmTemp ( Int_t  indx  )  const

Definition at line 213 of file RawDcsChillerMonitorBlock.cxx.

References ChillerArray, and FillChillerArray().

Referenced by DcsWriter::ProcessRawRecord().

00214 {
00215         FillChillerArray();
00216         Float_t fValue = 0.0;
00217         memcpy(&fValue,&ChillerArray[(indx*21)+17],4);
00218         return fValue;
00219 }

Float_t RawDcsChillerMonitorBlock::GetFcu2RmTemp ( Int_t  indx  )  const

Definition at line 221 of file RawDcsChillerMonitorBlock.cxx.

References ChillerArray, and FillChillerArray().

Referenced by DcsWriter::ProcessRawRecord().

00222 {
00223         FillChillerArray();
00224         Float_t fValue = 0.0;
00225         memcpy(&fValue,&ChillerArray[(indx*21)+18],4);
00226         return fValue;
00227 }

Float_t RawDcsChillerMonitorBlock::GetHx3ColdRetWt ( Int_t  indx  )  const

Definition at line 197 of file RawDcsChillerMonitorBlock.cxx.

References ChillerArray, and FillChillerArray().

Referenced by DcsWriter::ProcessRawRecord().

00198 {
00199         FillChillerArray();
00200         Float_t fValue = 0.0;
00201         memcpy(&fValue,&ChillerArray[(indx*21)+14],4);
00202         return fValue;
00203 }

Float_t RawDcsChillerMonitorBlock::GetHx3WarmDischWt ( Int_t  indx  )  const

Definition at line 205 of file RawDcsChillerMonitorBlock.cxx.

References ChillerArray, and FillChillerArray().

Referenced by DcsWriter::ProcessRawRecord().

00206 {
00207         FillChillerArray();
00208         Float_t fValue = 0.0;
00209         memcpy(&fValue,&ChillerArray[(indx*21)+15],4);
00210         return fValue;
00211 }

Int_t RawDcsChillerMonitorBlock::GetNumEntries (  )  const

Definition at line 105 of file RawDcsChillerMonitorBlock.cxx.

References RawDataBlock::fSize, Msg::kError, and MSG.

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

00106 {
00107 // remember, all versions
00108 // have offset of 3 due to first 3 longs)
00109         if((fSize-3)%21)
00110         {
00111                 MSG("RawData",Msg::kError)
00112                 << " Size of Chiller Block screwed up.  Have: "
00113                 << (fSize-3)%21 << " left over from modulo 20."
00114                 << endl;
00115                 return -1;
00116         }
00117         return ((fSize-3)/21);
00118 }

Int_t RawDcsChillerMonitorBlock::GetNumEvents (  )  const

Definition at line 120 of file RawDcsChillerMonitorBlock.cxx.

References FillChillerArray(), and GetNumEntries().

00121 {
00122         Int_t numEvents = 1;
00123         Int_t numEntries = GetNumEntries();
00124         FillChillerArray();
00125 
00126         //seek throughout for the number of events (not entries)
00127         //so look for entries where
00128         // FOR CHILLER THERE IS ONLY ONE EVENT PER BLOCK
00129 
00130         numEvents=numEntries;
00131         return numEvents;
00132 }

Float_t RawDcsChillerMonitorBlock::GetReturnCwt ( Int_t  indx  )  const

Definition at line 157 of file RawDcsChillerMonitorBlock.cxx.

References ChillerArray, and FillChillerArray().

Referenced by DcsWriter::ProcessRawRecord().

00158 {
00159         FillChillerArray();
00160         Float_t fValue = 0.0;
00161         memcpy(&fValue,&ChillerArray[(indx*21)+3],4);
00162         return fValue;
00163 }

Float_t RawDcsChillerMonitorBlock::GetReturnWt ( Int_t  indx  )  const

Definition at line 141 of file RawDcsChillerMonitorBlock.cxx.

References ChillerArray, and FillChillerArray().

Referenced by DcsWriter::ProcessRawRecord().

00142 {
00143         FillChillerArray();
00144         Float_t fValue = 0.0;
00145         memcpy(&fValue,&ChillerArray[(indx*21)+1],4);
00146         return fValue;
00147 }

Float_t RawDcsChillerMonitorBlock::GetS1RmTemp ( Int_t  indx  )  const

Definition at line 229 of file RawDcsChillerMonitorBlock.cxx.

References ChillerArray, and FillChillerArray().

Referenced by DcsWriter::ProcessRawRecord().

00230 {
00231         FillChillerArray();
00232         Float_t fValue = 0.0;
00233         memcpy(&fValue,&ChillerArray[(indx*21)+19],4);
00234         return fValue;
00235 }

Int_t RawDcsChillerMonitorBlock::GetStateChiller1 ( Int_t  indx  )  const [inline]

Definition at line 84 of file RawDcsChillerMonitorBlock.h.

References ChillerArray, and FillChillerArray().

Referenced by DcsWriter::ProcessRawRecord().

00085 { FillChillerArray(); return ChillerArray[(indx*20)+7]; }

Int_t RawDcsChillerMonitorBlock::GetStateChiller2 ( Int_t  indx  )  const [inline]

Definition at line 87 of file RawDcsChillerMonitorBlock.h.

References ChillerArray, and FillChillerArray().

Referenced by DcsWriter::ProcessRawRecord().

00088 { FillChillerArray(); return ChillerArray[(indx*20)+8]; }

Int_t RawDcsChillerMonitorBlock::GetStateDetAlarm ( Int_t  indx  )  const [inline]

Definition at line 93 of file RawDcsChillerMonitorBlock.h.

References ChillerArray, and FillChillerArray().

Referenced by DcsWriter::ProcessRawRecord().

00094 { FillChillerArray(); return ChillerArray[(indx*20)+12]; }

Int_t RawDcsChillerMonitorBlock::GetStateFluidCooler ( Int_t  indx  )  const [inline]

Definition at line 78 of file RawDcsChillerMonitorBlock.h.

References ChillerArray, and FillChillerArray().

Referenced by DcsWriter::ProcessRawRecord().

00079 { FillChillerArray(); return ChillerArray[(indx*20)+5]; }

Int_t RawDcsChillerMonitorBlock::GetStatePumpP1 ( Int_t  indx  )  const [inline]

Definition at line 96 of file RawDcsChillerMonitorBlock.h.

References ChillerArray, and FillChillerArray().

Referenced by DcsWriter::ProcessRawRecord().

00097 { FillChillerArray(); return ChillerArray[(indx*20)+16]; }

Int_t RawDcsChillerMonitorBlock::GetStatePumpP4 ( Int_t  indx  )  const [inline]

Definition at line 81 of file RawDcsChillerMonitorBlock.h.

References ChillerArray, and FillChillerArray().

Referenced by DcsWriter::ProcessRawRecord().

00082 { FillChillerArray(); return ChillerArray[(indx*20)+6]; }

Int_t RawDcsChillerMonitorBlock::GetStatePumpP5 ( Int_t  indx  )  const [inline]

Definition at line 90 of file RawDcsChillerMonitorBlock.h.

References ChillerArray, and FillChillerArray().

Referenced by DcsWriter::ProcessRawRecord().

00091 { FillChillerArray(); return ChillerArray[(indx*20)+11]; }

Float_t RawDcsChillerMonitorBlock::GetSurfaceTemp ( Int_t  indx  )  const

Definition at line 237 of file RawDcsChillerMonitorBlock.cxx.

References ChillerArray, and FillChillerArray().

Referenced by DcsWriter::ProcessRawRecord().

00238 {
00239         FillChillerArray();
00240         Float_t fValue = 0.0;
00241         memcpy(&fValue,&ChillerArray[(indx*21)+20],4);
00242         return fValue;
00243 }

VldTimeStamp RawDcsChillerMonitorBlock::GetTimeStamp ( Int_t  indx  )  const [inline]

Definition at line 75 of file RawDcsChillerMonitorBlock.h.

References ChillerArray, and FillChillerArray().

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

00076 { FillChillerArray(); return VldTimeStamp(ChillerArray[(indx*20)],0); }

VldContext RawDcsChillerMonitorBlock::GetVldContext (  )  const

Definition at line 134 of file RawDcsChillerMonitorBlock.cxx.

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

Referenced by DcsWriter::ProcessRawRecord().

00135 {
00136 // build validity context
00137         RawBlockId rbid = GetBlockId();
00138         return VldContext(rbid.GetDetector(),rbid.GetSimFlag(),GetTimeStamp(0));
00139 }

static void RawDcsChillerMonitorBlock::SetDebugFlags ( const UInt_t  dbgflgs  )  [inline, static]

Definition at line 54 of file RawDcsChillerMonitorBlock.h.

References fgDebugFlags.

00054 {fgDebugFlags=dbgflgs;}


Member Data Documentation

const Int_t* RawDcsChillerMonitorBlock::ChillerArray [mutable, protected]
UInt_t RawDcsChillerMonitorBlock::fgDebugFlags = 0 [static, private]

Definition at line 70 of file RawDcsChillerMonitorBlock.h.

Referenced by GetDebugFlags(), and SetDebugFlags().


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

Generated on 2 Nov 2017 for loon by  doxygen 1.6.1