RawChargeInjectInfoBlock Class Reference

#include <RawChargeInjectInfoBlock.h>

Inheritance diagram for RawChargeInjectInfoBlock:
RawDataBlock

List of all members.

Public Member Functions

 RawChargeInjectInfoBlock ()
 RawChargeInjectInfoBlock (const Int_t *block)
virtual ~RawChargeInjectInfoBlock ()
Int_t GetRun () const
Short_t GetSubRun () const
Short_t GetRunType () const
Int_t GetCrateId () const
Int_t GetNumberOfValues () const
Int_t GetTimeFrameStart (Int_t indx) const
Int_t GetTimeFrameEnd (Int_t indx) const
Int_t GetCharge (Int_t indx) const
virtual std::ostream & FormatToOStream (std::ostream &os, Option_t *option="") const
 RawChargeInjectInfoBlock (const RawChargeInjectInfoBlock &rhs)
Int_t GetTrigFrameStart (Int_t indx) const
Int_t GetTrigFrameEnd (Int_t indx) const

Static Public Member Functions

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

Static Private Attributes

static UInt_t fgDebugFlags = 0

Detailed Description

Definition at line 19 of file RawChargeInjectInfoBlock.h.


Constructor & Destructor Documentation

RawChargeInjectInfoBlock::RawChargeInjectInfoBlock (  ) 

Definition at line 37 of file RawChargeInjectInfoBlock.cxx.

00038 {
00039    // Default constructor
00040 }

RawChargeInjectInfoBlock::RawChargeInjectInfoBlock ( const Int_t *  block  ) 

Definition at line 43 of file RawChargeInjectInfoBlock.cxx.

00044    : RawDataBlock(block)
00045 {
00046    //  stored block format is:
00047    //---------------------
00048    //  0   # words in block
00049    //  1   checksum
00050    //  2   Block Id
00051    //-----
00052    //  3   run #
00053    //  4   {subrun#| run type}
00054    //  5   crate identifier
00055    //  6   # of charge values
00056    //  ..  { TF # start, TF # end, charge} triplets
00057 }

RawChargeInjectInfoBlock::~RawChargeInjectInfoBlock (  )  [virtual]

Definition at line 60 of file RawChargeInjectInfoBlock.cxx.

00061 {
00062    // dtor
00063 }

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

Definition at line 45 of file RawChargeInjectInfoBlock.h.

00046      : RawDataBlock(rhs) { ; }


Member Function Documentation

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

Reimplemented from RawDataBlock.

Definition at line 133 of file RawChargeInjectInfoBlock.cxx.

References GetCharge(), GetCrateId(), GetNumberOfValues(), GetRun(), GetRunType(), GetSubRun(), GetTimeFrameEnd(), and GetTimeFrameStart().

00135 {
00136    RawDataBlock::FormatToOStream(os,option);
00137    if (option[0] == 'X') return os;
00138 
00139    // additional block specific formatted output is done here
00140 
00141    os << " Run " << GetRun() 
00142       << " SubRun " << GetSubRun() 
00143       << " RunType " << GetRunType() << endl; 
00144    int crateid = GetCrateId();
00145    os << " Crate " << (crateid&0x3f)
00146       << " (0x" << hex << crateid << dec << ") had "
00147       << GetNumberOfValues() << " triplets: " << endl;
00148    for (int i = 0; i<GetNumberOfValues(); i++) {
00149       os << "   TimeFrame " << GetTimeFrameStart(i)
00150          << " - " << GetTimeFrameEnd(i) 
00151          << " : charge " << GetCharge(i) << endl;
00152    }
00153    return os;
00154 }

Int_t RawChargeInjectInfoBlock::GetCharge ( Int_t  indx  )  const

Definition at line 124 of file RawChargeInjectInfoBlock.cxx.

References RawDataBlock::fRawBlock, RawDataBlock::fSize, and zzzz_last.

Referenced by FormatToOStream().

00125 {
00126    // get the "indx"-th charge from the list
00127    Int_t ioff = zzzz_last + 3*indx + 2;
00128    if (fSize >= ioff) return fRawBlock[ioff];
00129    return -1;
00130 }

Int_t RawChargeInjectInfoBlock::GetCrateId (  )  const

Definition at line 90 of file RawChargeInjectInfoBlock.cxx.

References RawDataBlock::fRawBlock, RawDataBlock::fSize, and indx_crateid.

Referenced by FormatToOStream().

00091 {
00092    // get the crate id
00093    if (fSize > indx_crateid) return fRawBlock[indx_crateid];
00094    return -1;
00095 }

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

Definition at line 42 of file RawChargeInjectInfoBlock.h.

References fgDebugFlags.

00042 { return fgDebugFlags; }

Int_t RawChargeInjectInfoBlock::GetNumberOfValues (  )  const

Definition at line 98 of file RawChargeInjectInfoBlock.cxx.

References RawDataBlock::fRawBlock, RawDataBlock::fSize, and indx_nvalues.

Referenced by FormatToOStream().

00099 {
00100    // get the number of sources in the list
00101    if (fSize > indx_nvalues) return fRawBlock[indx_nvalues];
00102    return -1;
00103 }

Int_t RawChargeInjectInfoBlock::GetRun ( void   )  const

Definition at line 66 of file RawChargeInjectInfoBlock.cxx.

References RawDataBlock::fRawBlock, RawDataBlock::fSize, and indx_run.

Referenced by FormatToOStream().

00067 {
00068    // get the run number
00069    if (fSize > indx_run) return fRawBlock[indx_run];
00070    return -1;
00071 }

Short_t RawChargeInjectInfoBlock::GetRunType (  )  const

Definition at line 82 of file RawChargeInjectInfoBlock.cxx.

References RawDataBlock::fRawBlock, RawDataBlock::fSize, and indx_runtype.

Referenced by FormatToOStream().

00083 {
00084    // get the run type
00085    if (fSize > indx_runtype) return fRawBlock[indx_runtype]&0xffff;
00086    return -1;
00087 }

Short_t RawChargeInjectInfoBlock::GetSubRun (  )  const

Definition at line 74 of file RawChargeInjectInfoBlock.cxx.

References RawDataBlock::fRawBlock, RawDataBlock::fSize, and indx_subrun.

Referenced by FormatToOStream().

00075 {
00076    // get the subrun number
00077    if (fSize > indx_subrun) return (fRawBlock[indx_subrun]>>16)&0xffff;
00078    return -1;
00079 }

Int_t RawChargeInjectInfoBlock::GetTimeFrameEnd ( Int_t  indx  )  const

Definition at line 115 of file RawChargeInjectInfoBlock.cxx.

References RawDataBlock::fRawBlock, RawDataBlock::fSize, and zzzz_last.

Referenced by FormatToOStream(), and GetTrigFrameEnd().

00116 {
00117    // get the "indx"-th ending time frame # from the list
00118    Int_t ioff = zzzz_last + 3*indx + 1;
00119    if (fSize >= ioff) return fRawBlock[ioff];
00120    return -1;
00121 }

Int_t RawChargeInjectInfoBlock::GetTimeFrameStart ( Int_t  indx  )  const

Definition at line 106 of file RawChargeInjectInfoBlock.cxx.

References RawDataBlock::fRawBlock, RawDataBlock::fSize, and zzzz_last.

Referenced by FormatToOStream(), and GetTrigFrameStart().

00107 {
00108    // get the "indx"-th starting time frame # from the list
00109    Int_t ioff = zzzz_last + 3*indx + 0;
00110    if (fSize >= ioff) return fRawBlock[ioff];
00111    return -1;
00112 }

Int_t RawChargeInjectInfoBlock::GetTrigFrameEnd ( Int_t  indx  )  const [inline]

Definition at line 51 of file RawChargeInjectInfoBlock.h.

References GetTimeFrameEnd().

00052      { return   GetTimeFrameEnd(indx); }

Int_t RawChargeInjectInfoBlock::GetTrigFrameStart ( Int_t  indx  )  const [inline]

Definition at line 49 of file RawChargeInjectInfoBlock.h.

References GetTimeFrameStart().

00050      { return   GetTimeFrameStart(indx); }

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

Definition at line 41 of file RawChargeInjectInfoBlock.h.

References fgDebugFlags.

00041 {fgDebugFlags=dbgflgs;}


Member Data Documentation

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

Definition at line 59 of file RawChargeInjectInfoBlock.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