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

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

void SetDebugFlags (const UInt_t dbgflgs)
UInt_t GetDebugFlags ()

Protected Member Functions

void FillChillerArray () const

Protected Attributes

const Int_t * ChillerArray

Static Private Attributes

UInt_t fgDebugFlags = 0

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]
 

Definition at line 98 of file RawDcsChillerMonitorBlock.cxx.

References ChillerArray, and RawDataBlock::GetData().

Referenced by GetAhuS1RmTemp(), GetDetReturnCwt(), GetDetSupplyCwt(), GetDischargeCwt(), GetDischargeFct(), GetFcu1RmTemp(), GetFcu2RmTemp(), GetHx3ColdRetWt(), GetHx3WarmDischWt(), GetNumEvents(), GetReturnCwt(), GetReturnWt(), GetS1RmTemp(), GetStateChiller1(), GetStateChiller2(), GetStateDetAlarm(), GetStateFluidCooler(), GetStatePumpP1(), GetStatePumpP4(), GetStatePumpP5(), GetSurfaceTemp(), and GetTimeStamp().

00099 {
00100 //off by 3 since the first three are 1:num words, 2: checksum
00101 // and 3:block ID
00102         ChillerArray = 3 + GetData();
00103 }

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

Reimplemented from RawDataBlock.

Definition at line 62 of file RawDcsChillerMonitorBlock.cxx.

References VldTimeStamp::AsString(), RawDataBlock::FormatToOStream(), GetAhuS1RmTemp(), GetDetReturnCwt(), GetDetSupplyCwt(), GetDischargeCwt(), GetDischargeFct(), GetFcu1RmTemp(), GetFcu2RmTemp(), GetHx3ColdRetWt(), GetHx3WarmDischWt(), GetNumEntries(), GetNumEvents(), GetReturnCwt(), GetReturnWt(), GetS1RmTemp(), GetStateChiller1(), GetStateChiller2(), GetStateDetAlarm(), GetStateFluidCooler(), GetStatePumpP1(), GetStatePumpP4(), GetStatePumpP5(), GetSurfaceTemp(), GetTimeStamp(), and option.

00064 {
00065     RawDataBlock::FormatToOStream(os,option);
00066     if (option[0] == 'X') return os;
00067     
00068     Int_t numEntries=GetNumEntries();
00069     os << " Number of Entries " << numEntries
00070        << ", Number of Events " << GetNumEvents() << endl;
00071     for(Int_t i = 0; i < numEntries; i++) {
00072        os << "  [" << i << "]"
00073           << " Timestamp " << GetTimeStamp(i).AsString("c") << endl
00074           << "      ReturnWt         " << setw(15) << GetReturnWt(i)
00075           << "      DischargeFct     " << setw(15) << GetDischargeFct(i) << endl
00076           << "      ReturnCwt        " << setw(15) << GetReturnCwt(i)
00077           << "      DischargeCwt     " << setw(15) << GetDischargeCwt(i) << endl
00078           << "      StateFluidCooler " << setw(15) << GetStateFluidCooler(i)
00079           << "      StatePumpP4      " << setw(15) << GetStatePumpP4(i) << endl
00080           << "      StateChiller1    " << setw(15) << GetStateChiller1(i)
00081           << "      StateChiller2    " << setw(15) << GetStateChiller2(i) << endl
00082           << "      DetReturnCwt     " << setw(15) << GetDetReturnCwt(i)
00083           << "      DetSupplyCwt     " << setw(15) << GetDetSupplyCwt(i) << endl
00084           << "      StatePumpP5      " << setw(15) << GetStatePumpP5(i)
00085           << "      StateDetAlarm    " << setw(15) << GetStateDetAlarm(i) << endl
00086           << "      AhuS1RmTemp      " << setw(15) << GetAhuS1RmTemp(i)
00087           << "      Hx3ColdRetWt     " << setw(15) << GetHx3ColdRetWt(i) << endl
00088           << "      Hx3WarmDischWt   " << setw(15) << GetHx3WarmDischWt(i)
00089           << "      StatePumpP1      " << setw(15) << GetStatePumpP1(i) << endl
00090           << "      Fcu1RmTemp       " << setw(15) << GetFcu1RmTemp(i)
00091           << "      Fcu2RmTemp       " << setw(15) << GetFcu2RmTemp(i) << endl
00092           << "      S1RmTemp         " << setw(15) << GetS1RmTemp(i)
00093           << "      SurfaceTemp      " << setw(15) << GetSurfaceTemp(i) << endl;
00094     }
00095    return os;
00096 }

Float_t RawDcsChillerMonitorBlock::GetAhuS1RmTemp Int_t  indx  )  const
 

Definition at line 189 of file RawDcsChillerMonitorBlock.cxx.

References ChillerArray, and FillChillerArray().

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

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

UInt_t RawDcsChillerMonitorBlock::GetDebugFlags  )  [inline, static]
 

Definition at line 55 of file RawDcsChillerMonitorBlock.h.

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

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

Referenced by FormatToOStream().

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

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]
 

Definition at line 65 of file RawDcsChillerMonitorBlock.h.

Referenced by FillChillerArray(), GetAhuS1RmTemp(), GetDetReturnCwt(), GetDetSupplyCwt(), GetDischargeCwt(), GetDischargeFct(), GetFcu1RmTemp(), GetFcu2RmTemp(), GetHx3ColdRetWt(), GetHx3WarmDischWt(), GetReturnCwt(), GetReturnWt(), GetS1RmTemp(), GetStateChiller1(), GetStateChiller2(), GetStateDetAlarm(), GetStateFluidCooler(), GetStatePumpP1(), GetStatePumpP4(), GetStatePumpP5(), GetSurfaceTemp(), and GetTimeStamp().

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

Definition at line 14 of file RawDcsChillerMonitorBlock.cxx.

Referenced by SetDebugFlags().


The documentation for this class was generated from the following files:
Generated on Mon Feb 15 11:10:09 2010 for loon by  doxygen 1.3.9.1