RawDcsEnvMonitorBlock Class Reference

#include <RawDcsEnvMonitorBlock.h>

Inheritance diagram for RawDcsEnvMonitorBlock:
RawDataBlock

List of all members.

Public Member Functions

 RawDcsEnvMonitorBlock ()
 RawDcsEnvMonitorBlock (const Int_t *block)
virtual ~RawDcsEnvMonitorBlock ()
Int_t GetNumEvents () const
Int_t GetNumEntries () const
VldContext GetVldContext () const
VldTimeStamp GetTimeStamp (Int_t indx) const
Float_t GetFarTemperature1 (Int_t indx) const
Float_t GetFarHumid1 (Int_t indx) const
Float_t GetFarRadon1 (Int_t indx) const
Float_t GetFarPressure1 (Int_t indx) const
Float_t GetFarTemperature2 (Int_t indx) const
Float_t GetFarHumid2 (Int_t indx) const
Float_t GetFarRadon2 (Int_t indx) const
Float_t GetFarPressure2 (Int_t indx) const
Float_t GetFarRadonFactor1 (Int_t indx) const
Float_t GetFarRadonFactor2 (Int_t indx) const
Int_t GetEnvDetector () const
Float_t GetCalTemperature (Int_t indx) const
Float_t GetCalHumid (Int_t indx) const
Float_t GetCalPressure (Int_t indx) const
void GetCalEnvThermArray (Int_t indx, Int_t iArray[30]) const
Int_t GetCalEnvIsTriggerEvent (Int_t indx) const
Int_t GetCalEnvTriggerRate (Int_t indx) const
Float_t GetCalCerPressure1 (Int_t indx) const
Float_t GetCalCerPressure2 (Int_t indx) const
Float_t GetCalCerPressure3 (Int_t indx) const
Float_t GetCalCerPressure4 (Int_t indx) const
Float_t GetCalCerPressure5 (Int_t indx) const
Int_t GetCalCounter1 (Int_t indx) const
Int_t GetCalCounter2 (Int_t indx) const
Int_t GetCalCounter3 (Int_t indx) const
Int_t GetCalCounter4 (Int_t indx) const
Int_t GetCalCounter5 (Int_t indx) const
Int_t GetCalCounter6 (Int_t indx) const
Int_t GetCalCounter7 (Int_t indx) const
Int_t GetCalCounter8 (Int_t indx) const
Float_t GetNearTemperature (Int_t indx) const
Float_t GetNearHumid (Int_t indx) const
Float_t GetNearPressure (Int_t indx) const
Int_t GetNearRadonCounts (Int_t indx) const
void GetNearEnvThermArray (Int_t indx, Int_t iArray[56]) const
virtual std::ostream & FormatToOStream (std::ostream &os, Option_t *option="") const
 RawDcsEnvMonitorBlock (const RawDcsEnvMonitorBlock &rhs)

Static Public Member Functions

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

Protected Member Functions

void FillEnvArray () const

Protected Attributes

const Int_t * EnvArray

Static Private Attributes

static UInt_t fgDebugFlags = 0

Detailed Description

Definition at line 18 of file RawDcsEnvMonitorBlock.h.


Constructor & Destructor Documentation

RawDcsEnvMonitorBlock::RawDcsEnvMonitorBlock (  ) 

Definition at line 34 of file RawDcsEnvMonitorBlock.cxx.

00035   : EnvArray(0)
00036 {
00037    // Default constructor
00038 }

RawDcsEnvMonitorBlock::RawDcsEnvMonitorBlock ( const Int_t *  block  ) 

Definition at line 41 of file RawDcsEnvMonitorBlock.cxx.

00042   : RawDataBlock(block), EnvArray(0)
00043 {
00044    //  stored block format is:
00045    //---------------------
00046    //  0   # words in block
00047    //  1   checksum
00048    //  2   Block Id
00049    //-----
00050    /*
00051     *  The data has the following repeating structure from here
00052     *  Int_t n = ((i-3)/8) = num blocks (test modulo for errors);
00053     *  Int_t d[n*8];  d = block+3;
00054     *  Int_t indx;
00055     *  d[(indx*8)+0] = timestamp (long sec)
00056     *  d[(indx*8)+1] = temp1
00057     *  d[(indx*8)+2] = hum1
00058     *  d[(indx*8)+3] = radon1
00059     *  d[(indx*8)+4] = pres     all these are floats
00060     *  d[(indx*8)+5] = temp2
00061     *  d[(indx*8)+6] = hum2
00062     *  d[(indx*8)+7] = radon2
00063     *  indx++;(test if indx is greater than n, if so, finito)
00064     */
00065 }

RawDcsEnvMonitorBlock::~RawDcsEnvMonitorBlock (  )  [virtual]

Definition at line 68 of file RawDcsEnvMonitorBlock.cxx.

00069 {
00070    // dtor
00071 }

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

Definition at line 75 of file RawDcsEnvMonitorBlock.h.

00076      : RawDataBlock(rhs) { ; }


Member Function Documentation

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

Reimplemented from RawDataBlock.

Float_t RawDcsEnvMonitorBlock::GetCalCerPressure1 ( Int_t  indx  )  const

Definition at line 580 of file RawDcsEnvMonitorBlock.cxx.

References EnvArray, FillEnvArray(), GetEnvDetector(), RawDataBlock::GetMinorId(), and Detector::kCalDet.

Referenced by DcsWriter::ProcessRawRecord().

00581 {
00582         if (GetEnvDetector()!=Detector::kCalDet)
00583                 return 0.0;
00584         FillEnvArray();
00585         Float_t fValue=0.0;
00586         if (GetMinorId()==1)
00587                 return fValue;
00588         if (GetMinorId()==2)
00589                 memcpy(&fValue,&EnvArray[(indx*43)+38],4);
00590         if (GetMinorId()==3)
00591                 memcpy(&fValue,&EnvArray[(indx*51)+38],4);
00592         return fValue;;
00593 }

Float_t RawDcsEnvMonitorBlock::GetCalCerPressure2 ( Int_t  indx  )  const

Definition at line 595 of file RawDcsEnvMonitorBlock.cxx.

References EnvArray, FillEnvArray(), GetEnvDetector(), RawDataBlock::GetMinorId(), and Detector::kCalDet.

Referenced by DcsWriter::ProcessRawRecord().

00596 {
00597         if (GetEnvDetector()!=Detector::kCalDet)
00598                 return 0.0;
00599         FillEnvArray();
00600         Float_t fValue=0.0;
00601         if (GetMinorId()==1)
00602                 return 0.0;
00603         if (GetMinorId()==2)
00604                 memcpy(&fValue,&EnvArray[(indx*43)+39],4);
00605         if (GetMinorId()==3)
00606                 memcpy(&fValue,&EnvArray[(indx*51)+39],4);
00607         return fValue;
00608 }

Float_t RawDcsEnvMonitorBlock::GetCalCerPressure3 ( Int_t  indx  )  const

Definition at line 610 of file RawDcsEnvMonitorBlock.cxx.

References EnvArray, FillEnvArray(), GetEnvDetector(), RawDataBlock::GetMinorId(), and Detector::kCalDet.

Referenced by DcsWriter::ProcessRawRecord().

00611 {
00612         if (GetEnvDetector()!=Detector::kCalDet)
00613                 return 0;
00614         FillEnvArray();
00615         Float_t fValue=0.0;
00616         if (GetMinorId()==1)
00617                 return 0;
00618         if (GetMinorId()==2)
00619                 memcpy(&fValue,&EnvArray[(indx*43)+40],4);
00620         if (GetMinorId()==3)
00621                 memcpy(&fValue,&EnvArray[(indx*51)+40],4);
00622         return fValue;
00623 }

Float_t RawDcsEnvMonitorBlock::GetCalCerPressure4 ( Int_t  indx  )  const

Definition at line 625 of file RawDcsEnvMonitorBlock.cxx.

References EnvArray, FillEnvArray(), GetEnvDetector(), RawDataBlock::GetMinorId(), and Detector::kCalDet.

Referenced by DcsWriter::ProcessRawRecord().

00626 {
00627         if (GetEnvDetector()!=Detector::kCalDet)
00628                 return 0;
00629         FillEnvArray();
00630         Float_t fValue=0.0;
00631         if (GetMinorId()==1)
00632                 return 0;
00633         if (GetMinorId()==2)
00634                 memcpy(&fValue,&EnvArray[(indx*43)+41],4);
00635         if (GetMinorId()==3)
00636                 memcpy(&fValue,&EnvArray[(indx*51)+41],4);
00637         return fValue;
00638 }

Float_t RawDcsEnvMonitorBlock::GetCalCerPressure5 ( Int_t  indx  )  const

Definition at line 640 of file RawDcsEnvMonitorBlock.cxx.

References EnvArray, FillEnvArray(), GetEnvDetector(), RawDataBlock::GetMinorId(), and Detector::kCalDet.

Referenced by DcsWriter::ProcessRawRecord().

00641 {
00642         if (GetEnvDetector()!=Detector::kCalDet)
00643                 return 0;
00644         FillEnvArray();
00645         Float_t fValue=0.0;
00646         if (GetMinorId()==1)
00647                 return 0;
00648         if (GetMinorId()==2)
00649                 memcpy(&fValue,&EnvArray[(indx*43)+42],4);
00650         if (GetMinorId()==3)
00651                 memcpy(&fValue,&EnvArray[(indx*51)+42],4);
00652         return fValue;
00653 }

Int_t RawDcsEnvMonitorBlock::GetCalCounter1 ( Int_t  indx  )  const

Definition at line 655 of file RawDcsEnvMonitorBlock.cxx.

References EnvArray, FillEnvArray(), GetEnvDetector(), RawDataBlock::GetMinorId(), and Detector::kCalDet.

Referenced by DcsWriter::ProcessRawRecord().

00656 {
00657         if (GetEnvDetector()!=Detector::kCalDet)
00658                 return 0;
00659         FillEnvArray();
00660         if (GetMinorId()<3)
00661                 return 0;
00662         return EnvArray[(indx*51)+43];
00663 }

Int_t RawDcsEnvMonitorBlock::GetCalCounter2 ( Int_t  indx  )  const

Definition at line 665 of file RawDcsEnvMonitorBlock.cxx.

References EnvArray, FillEnvArray(), GetEnvDetector(), RawDataBlock::GetMinorId(), and Detector::kCalDet.

Referenced by DcsWriter::ProcessRawRecord().

00666 {
00667         if (GetEnvDetector()!=Detector::kCalDet)
00668                 return 0;
00669         FillEnvArray();
00670         if (GetMinorId()<3)
00671                 return 0;
00672         return EnvArray[(indx*51)+44];
00673 }

Int_t RawDcsEnvMonitorBlock::GetCalCounter3 ( Int_t  indx  )  const

Definition at line 675 of file RawDcsEnvMonitorBlock.cxx.

References EnvArray, FillEnvArray(), GetEnvDetector(), RawDataBlock::GetMinorId(), and Detector::kCalDet.

Referenced by DcsWriter::ProcessRawRecord().

00676 {
00677         if (GetEnvDetector()!=Detector::kCalDet)
00678                 return 0;
00679         FillEnvArray();
00680         if (GetMinorId()<3)
00681                 return 0;
00682         return EnvArray[(indx*51)+45];
00683 }

Int_t RawDcsEnvMonitorBlock::GetCalCounter4 ( Int_t  indx  )  const

Definition at line 685 of file RawDcsEnvMonitorBlock.cxx.

References EnvArray, FillEnvArray(), GetEnvDetector(), RawDataBlock::GetMinorId(), and Detector::kCalDet.

Referenced by DcsWriter::ProcessRawRecord().

00686 {
00687         if (GetEnvDetector()!=Detector::kCalDet)
00688                 return 0;
00689         FillEnvArray();
00690         if (GetMinorId()<3)
00691                 return 0;
00692         return EnvArray[(indx*51)+46];
00693 }

Int_t RawDcsEnvMonitorBlock::GetCalCounter5 ( Int_t  indx  )  const

Definition at line 695 of file RawDcsEnvMonitorBlock.cxx.

References EnvArray, FillEnvArray(), GetEnvDetector(), RawDataBlock::GetMinorId(), and Detector::kCalDet.

Referenced by DcsWriter::ProcessRawRecord().

00696 {
00697         if (GetEnvDetector()!=Detector::kCalDet)
00698                 return 0;
00699         FillEnvArray();
00700         if (GetMinorId()<3)
00701                 return 0;
00702         return EnvArray[(indx*51)+47];
00703 }

Int_t RawDcsEnvMonitorBlock::GetCalCounter6 ( Int_t  indx  )  const

Definition at line 705 of file RawDcsEnvMonitorBlock.cxx.

References EnvArray, FillEnvArray(), GetEnvDetector(), RawDataBlock::GetMinorId(), and Detector::kCalDet.

Referenced by DcsWriter::ProcessRawRecord().

00706 {
00707         if (GetEnvDetector()!=Detector::kCalDet)
00708                 return 0;
00709         FillEnvArray();
00710         if (GetMinorId()<3)
00711                 return 0;
00712         return EnvArray[(indx*51)+48];
00713 }

Int_t RawDcsEnvMonitorBlock::GetCalCounter7 ( Int_t  indx  )  const

Definition at line 715 of file RawDcsEnvMonitorBlock.cxx.

References EnvArray, FillEnvArray(), GetEnvDetector(), RawDataBlock::GetMinorId(), and Detector::kCalDet.

Referenced by DcsWriter::ProcessRawRecord().

00716 {
00717         if (GetEnvDetector()!=Detector::kCalDet)
00718                 return 0;
00719         FillEnvArray();
00720         if (GetMinorId()<3)
00721                 return 0;
00722         return EnvArray[(indx*51)+49];
00723 }

Int_t RawDcsEnvMonitorBlock::GetCalCounter8 ( Int_t  indx  )  const

Definition at line 725 of file RawDcsEnvMonitorBlock.cxx.

References EnvArray, FillEnvArray(), GetEnvDetector(), RawDataBlock::GetMinorId(), and Detector::kCalDet.

Referenced by DcsWriter::ProcessRawRecord().

00726 {
00727         if (GetEnvDetector()!=Detector::kCalDet)
00728                 return 0;
00729         FillEnvArray();
00730         if (GetMinorId()<3)
00731                 return 0;
00732         return EnvArray[(indx*51)+50];
00733 }

Int_t RawDcsEnvMonitorBlock::GetCalEnvIsTriggerEvent ( Int_t  indx  )  const

Definition at line 566 of file RawDcsEnvMonitorBlock.cxx.

References EnvArray, FillEnvArray(), GetEnvDetector(), RawDataBlock::GetMinorId(), and Detector::kCalDet.

Referenced by DcsWriter::ProcessRawRecord().

00567 {
00568         if (GetEnvDetector()!=Detector::kCalDet)
00569                 return 0;
00570         FillEnvArray();
00571         if (GetMinorId()==1)
00572                 return EnvArray[(indx*38)+2];
00573         if (GetMinorId()==2)
00574                 return EnvArray[(indx*43)+2];
00575         if (GetMinorId()==3)
00576                 return EnvArray[(indx*51)+2];
00577         return 0;
00578 }

void RawDcsEnvMonitorBlock::GetCalEnvThermArray ( Int_t  indx,
Int_t  iArray[30] 
) const

Definition at line 524 of file RawDcsEnvMonitorBlock.cxx.

References EnvArray, FillEnvArray(), GetEnvDetector(), RawDataBlock::GetMinorId(), and Detector::kCalDet.

Referenced by DcsWriter::ProcessRawRecord().

00525 {
00526         FillEnvArray();
00527         if (GetEnvDetector()!=Detector::kCalDet)
00528                 return;
00529         if (GetMinorId()==1)
00530         {
00531                 for (Int_t i=0; i < 32; i++)
00532                 {
00533                         iArray[i] = EnvArray[(indx*38)+i+6];
00534                 }
00535         }
00536         if (GetMinorId()==2)
00537         {
00538                 for (Int_t i=0; i < 32; i++)
00539                 {
00540                         iArray[i] = EnvArray[(indx*43)+i+6];
00541                 }
00542         }
00543         if (GetMinorId()==3)
00544         {
00545                 for (Int_t i=0;i<32;i++)
00546                 {
00547                         iArray[i]=EnvArray[(indx*51)+i+6];
00548                 }
00549         }
00550 }

Int_t RawDcsEnvMonitorBlock::GetCalEnvTriggerRate ( Int_t  indx  )  const

Definition at line 552 of file RawDcsEnvMonitorBlock.cxx.

References EnvArray, FillEnvArray(), GetEnvDetector(), RawDataBlock::GetMinorId(), and Detector::kCalDet.

Referenced by DcsWriter::ProcessRawRecord().

00553 {
00554         if (GetEnvDetector()!=Detector::kCalDet)
00555                 return 0;
00556         FillEnvArray();
00557         if (GetMinorId()==1)
00558                 return EnvArray[(indx*38)+1];
00559         if (GetMinorId()==2)
00560                 return EnvArray[(indx*43)+1];
00561         if (GetMinorId()==3)
00562                 return EnvArray[(indx*51)+1];
00563         return 0;
00564 }

Float_t RawDcsEnvMonitorBlock::GetCalHumid ( Int_t  indx  )  const

Definition at line 374 of file RawDcsEnvMonitorBlock.cxx.

References GetFarHumid1().

Referenced by DcsWriter::ProcessRawRecord().

00375 {
00376         return GetFarHumid1(indx);
00377 }

Float_t RawDcsEnvMonitorBlock::GetCalPressure ( Int_t  indx  )  const

Definition at line 426 of file RawDcsEnvMonitorBlock.cxx.

References GetFarPressure1().

Referenced by DcsWriter::ProcessRawRecord().

00427 {
00428         return GetFarPressure1(indx);
00429 }

Float_t RawDcsEnvMonitorBlock::GetCalTemperature ( Int_t  indx  )  const

Definition at line 342 of file RawDcsEnvMonitorBlock.cxx.

References GetFarTemperature1().

Referenced by DcsWriter::ProcessRawRecord().

00343 {
00344         return GetFarTemperature1(indx);
00345 }

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

Definition at line 72 of file RawDcsEnvMonitorBlock.h.

References fgDebugFlags.

00072 { return fgDebugFlags; }

Int_t RawDcsEnvMonitorBlock::GetEnvDetector (  )  const
Float_t RawDcsEnvMonitorBlock::GetFarHumid1 ( Int_t  indx  )  const

Definition at line 347 of file RawDcsEnvMonitorBlock.cxx.

References EnvArray, FillEnvArray(), GetEnvDetector(), RawDataBlock::GetMinorId(), Detector::kCalDet, and Detector::kFar.

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

00348 {
00349         FillEnvArray();
00350         Float_t fValue=0.0;
00351         if (GetEnvDetector()==Detector::kCalDet)
00352         {
00353                 if (GetMinorId()==1)
00354                         memcpy(&fValue,&EnvArray[(indx*38)+4],4);
00355                 if (GetMinorId()==2)
00356                         memcpy(&fValue,&EnvArray[(indx*43)+4],4);
00357                 if (GetMinorId()==3)
00358                         memcpy(&fValue, &EnvArray[(indx*51)+4],4);
00359                 return fValue;
00360         }
00361         if (GetEnvDetector()==Detector::kFar)
00362         {
00363                 if (GetMinorId()==1)
00364                         memcpy(&fValue,&EnvArray[(indx*8)+2],4);
00365                 if (GetMinorId()==2)
00366                         memcpy(&fValue,&EnvArray[(indx*9)+2],4);
00367                 if (GetMinorId()==3)
00368                         memcpy(&fValue,&EnvArray[(indx*11)+2],4);
00369                 return fValue;
00370         }
00371         return 0;
00372 }

Float_t RawDcsEnvMonitorBlock::GetFarHumid2 ( Int_t  indx  )  const

Definition at line 451 of file RawDcsEnvMonitorBlock.cxx.

References EnvArray, FillEnvArray(), GetEnvDetector(), RawDataBlock::GetMinorId(), Detector::kCalDet, and Detector::kFar.

Referenced by DcsWriter::ProcessRawRecord().

00452 {
00453         FillEnvArray();
00454         Float_t fValue=0.0;
00455         if (GetEnvDetector()==Detector::kCalDet)
00456         {
00457                 return fValue;
00458         }
00459         if (GetEnvDetector()==Detector::kFar)
00460         {
00461                 if (GetMinorId()==1)
00462                         memcpy(&fValue,&EnvArray[(indx*8)+6],4);
00463                 if (GetMinorId()==2)
00464                         memcpy(&fValue,&EnvArray[(indx*9)+6],4);
00465                 if (GetMinorId()==3)
00466                         memcpy(&fValue,&EnvArray[(indx*11)+6],4);
00467         }
00468         return fValue;
00469 }

Float_t RawDcsEnvMonitorBlock::GetFarPressure1 ( Int_t  indx  )  const

Definition at line 399 of file RawDcsEnvMonitorBlock.cxx.

References EnvArray, FillEnvArray(), GetEnvDetector(), RawDataBlock::GetMinorId(), Detector::kCalDet, and Detector::kFar.

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

00400 {
00401         FillEnvArray();
00402         Float_t fValue=0.0;
00403         if (GetEnvDetector()==Detector::kCalDet)
00404         {
00405                 if (GetMinorId()==1)
00406                         memcpy(&fValue,&EnvArray[(indx*38)+5],4);
00407                 if (GetMinorId()==2)
00408                         memcpy(&fValue,&EnvArray[(indx*43)+5],4);
00409                 if (GetMinorId()==3)
00410                         memcpy(&fValue, &EnvArray[(indx*51)+5],4);
00411                 return fValue;
00412         }
00413         if (GetEnvDetector()==Detector::kFar)
00414         {
00415                 if (GetMinorId()==1)
00416                         memcpy(&fValue,&EnvArray[(indx*8)+4],4);
00417                 if (GetMinorId()==2)
00418                         memcpy(&fValue,&EnvArray[(indx*9)+4],4);
00419                 if (GetMinorId()==3)
00420                         memcpy(&fValue,&EnvArray[(indx*11)+4],4);
00421                 return fValue;
00422         }
00423         return fValue;
00424 }

Float_t RawDcsEnvMonitorBlock::GetFarPressure2 ( Int_t  indx  )  const

Definition at line 491 of file RawDcsEnvMonitorBlock.cxx.

References EnvArray, FillEnvArray(), GetEnvDetector(), RawDataBlock::GetMinorId(), Detector::kCalDet, and Detector::kFar.

Referenced by DcsWriter::ProcessRawRecord().

00492 {
00493         if ( (GetMinorId()==1) || (GetEnvDetector()==Detector::kCalDet) )
00494                 return 0.0;
00495         FillEnvArray();
00496         Float_t fValue=0.0;
00497         if (GetEnvDetector()==Detector::kFar)
00498                 memcpy(&fValue,&EnvArray[(indx*9)+8],4);
00499         if (GetMinorId()==3)
00500                 memcpy(&fValue,&EnvArray[(indx*11)+8],4);
00501         return fValue;
00502 }

Float_t RawDcsEnvMonitorBlock::GetFarRadon1 ( Int_t  indx  )  const

Definition at line 379 of file RawDcsEnvMonitorBlock.cxx.

References EnvArray, FillEnvArray(), GetEnvDetector(), RawDataBlock::GetMinorId(), Detector::kCalDet, and Detector::kFar.

Referenced by DcsWriter::ProcessRawRecord().

00380 {
00381         FillEnvArray();
00382         Float_t fValue=0.0;
00383         if (GetEnvDetector()==Detector::kCalDet)
00384         {
00385                 return fValue;
00386         }
00387         if (GetEnvDetector()==Detector::kFar)
00388         {
00389                 if (GetMinorId()==1)
00390                         memcpy(&fValue,&EnvArray[(indx*8)+3],4);
00391                 if (GetMinorId()==2)
00392                         memcpy(&fValue,&EnvArray[(indx*9)+3],4);
00393                 if (GetMinorId()==3)
00394                         memcpy(&fValue,&EnvArray[(indx*11)+3],4);
00395         }
00396         return fValue;
00397 }

Float_t RawDcsEnvMonitorBlock::GetFarRadon2 ( Int_t  indx  )  const

Definition at line 471 of file RawDcsEnvMonitorBlock.cxx.

References EnvArray, FillEnvArray(), GetEnvDetector(), RawDataBlock::GetMinorId(), Detector::kCalDet, and Detector::kFar.

Referenced by DcsWriter::ProcessRawRecord().

00472 {
00473         FillEnvArray();
00474         Float_t fValue=0.0;
00475         if (GetEnvDetector()==Detector::kCalDet)
00476         {
00477                 return fValue;
00478         }
00479         if (GetEnvDetector()==Detector::kFar)
00480         {
00481                 if (GetMinorId()==1)
00482                         memcpy(&fValue,&EnvArray[(indx*8)+7],4);
00483                 if (GetMinorId()==2)
00484                         memcpy(&fValue,&EnvArray[(indx*9)+7],4);
00485                 if (GetMinorId()==3)
00486                         memcpy(&fValue,&EnvArray[(indx*11)+7],4);
00487         }
00488         return fValue;
00489 }

Float_t RawDcsEnvMonitorBlock::GetFarRadonFactor1 ( Int_t  indx  )  const

Definition at line 504 of file RawDcsEnvMonitorBlock.cxx.

References EnvArray, FillEnvArray(), GetEnvDetector(), RawDataBlock::GetMinorId(), and Detector::kCalDet.

Referenced by DcsWriter::ProcessRawRecord().

00505 {
00506         if ( (GetMinorId()<3) || (GetEnvDetector()==Detector::kCalDet) )
00507                 return 0.0;
00508         FillEnvArray();
00509         Float_t fValue=0.0;
00510         memcpy(&fValue,&EnvArray[(indx*11)+9],4);
00511         return fValue;
00512 }

Float_t RawDcsEnvMonitorBlock::GetFarRadonFactor2 ( Int_t  indx  )  const

Definition at line 514 of file RawDcsEnvMonitorBlock.cxx.

References EnvArray, FillEnvArray(), GetEnvDetector(), RawDataBlock::GetMinorId(), and Detector::kCalDet.

Referenced by DcsWriter::ProcessRawRecord().

00515 {
00516         if ( (GetMinorId()<3) || (GetEnvDetector()==Detector::kCalDet) )
00517                 return 0.0;
00518         FillEnvArray();
00519         Float_t fValue=0.0;
00520         memcpy(&fValue,&EnvArray[(indx*11)+10],4);
00521         return fValue;
00522 }

Float_t RawDcsEnvMonitorBlock::GetFarTemperature1 ( Int_t  indx  )  const

Definition at line 315 of file RawDcsEnvMonitorBlock.cxx.

References EnvArray, FillEnvArray(), GetEnvDetector(), RawDataBlock::GetMinorId(), Detector::kCalDet, and Detector::kFar.

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

00316 {
00317         FillEnvArray();
00318         Float_t fValue=0.0;
00319         if (GetEnvDetector()==Detector::kCalDet)
00320         {
00321                 if (GetMinorId()==1)
00322                         memcpy(&fValue,&EnvArray[(indx*38)+3],4);
00323                 if (GetMinorId()==2)
00324                         memcpy(&fValue,&EnvArray[(indx*43)+3],4);
00325                 if (GetMinorId()==3)
00326                         memcpy(&fValue, &EnvArray[(indx*51)+3],4);
00327                 return fValue;
00328         }
00329         if (GetEnvDetector()==Detector::kFar)
00330         {
00331                 if (GetMinorId()==1)
00332                         memcpy(&fValue,&EnvArray[(indx*8)+1],4);
00333                 if (GetMinorId()==2)
00334                         memcpy(&fValue,&EnvArray[(indx*9)+1],4);
00335                 if (GetMinorId()==3)
00336                         memcpy(&fValue,&EnvArray[(indx*11)+1],4);
00337                 return fValue;
00338         }
00339         return 0;
00340 }

Float_t RawDcsEnvMonitorBlock::GetFarTemperature2 ( Int_t  indx  )  const

Definition at line 431 of file RawDcsEnvMonitorBlock.cxx.

References EnvArray, FillEnvArray(), GetEnvDetector(), RawDataBlock::GetMinorId(), Detector::kCalDet, and Detector::kFar.

Referenced by DcsWriter::ProcessRawRecord().

00432 {
00433         FillEnvArray();
00434         Float_t fValue=0.0;
00435         if (GetEnvDetector()==Detector::kCalDet)
00436         {
00437                 return fValue;
00438         }
00439         if (GetEnvDetector()==Detector::kFar)
00440         {
00441                 if (GetMinorId()==1)
00442                         memcpy(&fValue,&EnvArray[(indx*8)+5],4);
00443                 if (GetMinorId()==2)
00444                         memcpy(&fValue,&EnvArray[(indx*9)+5],4);
00445                 if (GetMinorId()==3)
00446                         memcpy(&fValue,&EnvArray[(indx*11)+5],4);
00447         }
00448         return fValue;
00449 }

void RawDcsEnvMonitorBlock::GetNearEnvThermArray ( Int_t  indx,
Int_t  iArray[56] 
) const

Definition at line 773 of file RawDcsEnvMonitorBlock.cxx.

References EnvArray, FillEnvArray(), GetEnvDetector(), and Detector::kNear.

Referenced by DcsWriter::ProcessRawRecord().

00774 {
00775         FillEnvArray();
00776         if (GetEnvDetector()!=Detector::kNear)
00777                 return;
00778         for (Int_t i=0;i<56;i++)
00779         {
00780                 iArray[i]=EnvArray[(indx*61)+i+5];
00781         }
00782 }

Float_t RawDcsEnvMonitorBlock::GetNearHumid ( Int_t  indx  )  const

Definition at line 745 of file RawDcsEnvMonitorBlock.cxx.

References EnvArray, FillEnvArray(), GetEnvDetector(), and Detector::kNear.

Referenced by DcsWriter::ProcessRawRecord().

00746 {
00747         FillEnvArray();
00748         if (GetEnvDetector()!=Detector::kNear)
00749                 return 0.0;
00750         Float_t fValue=0.0;
00751         memcpy(&fValue,&EnvArray[(indx*61)+2],4);
00752         return fValue;
00753 }

Float_t RawDcsEnvMonitorBlock::GetNearPressure ( Int_t  indx  )  const

Definition at line 755 of file RawDcsEnvMonitorBlock.cxx.

References EnvArray, FillEnvArray(), GetEnvDetector(), and Detector::kNear.

Referenced by DcsWriter::ProcessRawRecord().

00756 {
00757         FillEnvArray();
00758         if (GetEnvDetector()!=Detector::kNear)
00759                 return 0.0;
00760         Float_t fValue=0.0;
00761         memcpy(&fValue,&EnvArray[(indx*61)+3],4);
00762         return fValue;
00763 }

Int_t RawDcsEnvMonitorBlock::GetNearRadonCounts ( Int_t  indx  )  const

Definition at line 765 of file RawDcsEnvMonitorBlock.cxx.

References EnvArray, FillEnvArray(), GetEnvDetector(), and Detector::kNear.

Referenced by DcsWriter::ProcessRawRecord().

00766 {
00767         FillEnvArray();
00768         if (GetEnvDetector()!=Detector::kNear)
00769                 return 0;
00770         return EnvArray[(indx*61)+4];
00771 }

Float_t RawDcsEnvMonitorBlock::GetNearTemperature ( Int_t  indx  )  const

Definition at line 735 of file RawDcsEnvMonitorBlock.cxx.

References EnvArray, FillEnvArray(), GetEnvDetector(), and Detector::kNear.

Referenced by DcsWriter::ProcessRawRecord().

00736 {
00737         FillEnvArray();
00738         if (GetEnvDetector()!=Detector::kNear)
00739                 return 0.0;
00740         Float_t fValue=0.0;
00741         memcpy(&fValue,&EnvArray[(indx*61)+1],4);
00742         return fValue;
00743 }

Int_t RawDcsEnvMonitorBlock::GetNumEntries (  )  const

Definition at line 202 of file RawDcsEnvMonitorBlock.cxx.

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

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

00203 {
00204         // remember, all versions
00205         // have offset of 3 due to first 3 longs)
00206         if (GetEnvDetector()==Detector::kCalDet)
00207         {
00208                 if (GetMinorId()==1)
00209                 {
00210                         if ((fSize-3)%38)
00211                         {
00212                                 MSG("RawData",Msg::kError)
00213                                 << " Size of Env Block screwed up.  Have: "
00214                                 << (fSize-3)%38 << " left over from modulo 38. "
00215                                 << endl;
00216                                 return -1;
00217                         }
00218                         return ((fSize-3)/38);
00219                 }
00220                 if (GetMinorId()==2)
00221                 {
00222                         if ((fSize-3)%43)
00223                         {
00224                                 MSG("RawData",Msg::kError)
00225                                 << " Size of Env Block screwed up.  Have: "
00226                                 << (fSize-3)%43 << " left over from modulo 43. "
00227                                 << endl;
00228                                 return -1;
00229                         }
00230                         return ((fSize-3)/43);
00231                 }
00232                 if (GetMinorId()==3)
00233                 {
00234                         if ((fSize-3)%51)
00235                         {
00236                                 MSG("RawData",Msg::kError)
00237                                 << " Size of Env Block screwed up.  Have: "
00238                                 << (fSize-3)%43 << " left over from modulo 43. "
00239                                 << endl;
00240                                 return -1;
00241                         }
00242                         return ((fSize-3)/51);
00243                 }
00244         }
00245         if (GetEnvDetector()==Detector::kFar)
00246         {
00247                 if (GetMinorId()==1)
00248                 {
00249                         if((fSize-3)%8)
00250                         {
00251                                 MSG("RawData",Msg::kError)
00252                                 << " Size of Env Block screwed up.  Have: "
00253                                 << (fSize-3)%8 << " left over from modulo 8. "
00254                                 << endl;
00255                                 return -1;
00256                         }
00257                         return ((fSize-3)/8);
00258                 }
00259                 if (GetMinorId()==2)
00260                 {
00261                         if((fSize-3)%9)
00262                         {
00263                                 MSG("RawData",Msg::kError)
00264                                 << " Size of Env Block screwed up.  Have: "
00265                                 << (fSize-3)%9 << " left over from modulo 9. "
00266                                 << endl;
00267                                 return -1;
00268                         }
00269                         return ((fSize-3)/9);
00270                 }
00271                 if (GetMinorId()==3)
00272                 {
00273                         if((fSize-3)%11)
00274                         {
00275                                 MSG("RawData",Msg::kError)
00276                                 << " Size of Env Block screwed up.  Have: "
00277                                 << (fSize-3)%11 << " left over from modulo 11. "
00278                                 << endl;
00279                                 return -1;
00280                         }
00281                         return ((fSize-3)/11);
00282                 }
00283         }
00284         if (GetEnvDetector()==Detector::kNear)
00285         {
00286                 if((fSize-3)%61)
00287                 {
00288                         MSG("RawData",Msg::kError)
00289                         << " Size of Env Block screwed up.  Have: "
00290                         << (fSize-3)%61 << " left over from modulo 61. "
00291                         << endl;
00292                         return -1;                        
00293                 }
00294                 return ((fSize-3)/61);
00295         }
00296         MSG("RawData",Msg::kError)
00297         << " Version number wrong/not implemented." << endl;
00298         return -1;
00299 }

Int_t RawDcsEnvMonitorBlock::GetNumEvents (  )  const

Definition at line 301 of file RawDcsEnvMonitorBlock.cxx.

References GetNumEntries().

00302 {
00303         return GetNumEntries();
00304 }

VldTimeStamp RawDcsEnvMonitorBlock::GetTimeStamp ( Int_t  indx  )  const

Definition at line 161 of file RawDcsEnvMonitorBlock.cxx.

References EnvArray, FillEnvArray(), GetEnvDetector(), RawDataBlock::GetMinorId(), Detector::kCalDet, Detector::kFar, and Detector::kNear.

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

00162 {
00163         FillEnvArray();
00164         if(GetEnvDetector()==Detector::kCalDet)
00165         {
00166                 if (GetMinorId()==1)
00167                         return VldTimeStamp(EnvArray[indx*38],0);
00168                 if (GetMinorId()==2)
00169                         return VldTimeStamp(EnvArray[indx*43],0);
00170                 if (GetMinorId()==3)
00171                         return VldTimeStamp(EnvArray[indx*51],0);
00172         }
00173         if (GetEnvDetector()==Detector::kFar)
00174         {
00175                 if(GetMinorId()==1)
00176                         return VldTimeStamp(EnvArray[indx*8],0);
00177                 if(GetMinorId()==2)
00178                         return VldTimeStamp(EnvArray[indx*9],0);
00179                 if(GetMinorId()==3)
00180                         return VldTimeStamp(EnvArray[indx*11],0);
00181         }
00182         if (GetEnvDetector()==Detector::kNear)
00183         {
00184                 return VldTimeStamp(EnvArray[indx*61],0);
00185         }
00186         return VldTimeStamp(EnvArray[0],0);
00187 }

VldContext RawDcsEnvMonitorBlock::GetVldContext (  )  const

Definition at line 306 of file RawDcsEnvMonitorBlock.cxx.

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

Referenced by DcsWriter::ProcessRawRecord().

00307 {
00308                    // build validity context
00309         RawBlockId rbid = GetBlockId();
00310         return VldContext(rbid.GetDetector(),rbid.GetSimFlag(),GetTimeStamp(0));
00311 }

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

Definition at line 71 of file RawDcsEnvMonitorBlock.h.

References fgDebugFlags.

00071 {fgDebugFlags=dbgflgs;}


Member Data Documentation

const Int_t* RawDcsEnvMonitorBlock::EnvArray [mutable, protected]
UInt_t RawDcsEnvMonitorBlock::fgDebugFlags = 0 [static, private]

Definition at line 87 of file RawDcsEnvMonitorBlock.h.

Referenced by GetDebugFlags(), and SetDebugFlags().


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

Generated on 22 Nov 2017 for loon by  doxygen 1.6.1