RawRopTdcRawDataBlock Class Reference

#include <RawRopTdcRawDataBlock.h>

Inheritance diagram for RawRopTdcRawDataBlock:
RawDataBlock

List of all members.

Public Member Functions

 RawRopTdcRawDataBlock ()
 RawRopTdcRawDataBlock (const Int_t *block)
virtual ~RawRopTdcRawDataBlock ()
Int_t GetRun () const
Short_t GetSubRun () const
Short_t GetRunType () const
VldTimeStamp GetTimeStamp () const
Int_t GetCrateId () const
Int_t GetTimeFrame () const
Int_t GetNumberOfTdcReadoutBytes () const
const Char_t * GetTdcData () const
virtual std::ostream & FormatToOStream (std::ostream &os, Option_t *option="") const
 RawRopTdcRawDataBlock (const RawRopTdcRawDataBlock &rhs)

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 20 of file RawRopTdcRawDataBlock.h.


Constructor & Destructor Documentation

RawRopTdcRawDataBlock::RawRopTdcRawDataBlock (  ) 

Definition at line 44 of file RawRopTdcRawDataBlock.cxx.

00045 {
00046    // Default constructor
00047 }

RawRopTdcRawDataBlock::RawRopTdcRawDataBlock ( const Int_t *  block  ) 

Definition at line 50 of file RawRopTdcRawDataBlock.cxx.

00051    : RawDataBlock(block)
00052 {
00053    //  stored block format is:
00054    //---------------------
00055    //  0   # words in block
00056    //  1   checksum
00057    //  2   Block Id
00058    //-----
00059    //  3   run #
00060    //  4   {subrun#| run type}
00061    //  5   time (sec)
00062    //  6   time (nsec)
00063    //  7   time frame #
00064    //  8   # of tdc readout bytes to follow
00065    // ..   <data> ... exact format to be clarified
00066 
00067 }

RawRopTdcRawDataBlock::~RawRopTdcRawDataBlock (  )  [virtual]

Definition at line 70 of file RawRopTdcRawDataBlock.cxx.

00071 {
00072    // dtor
00073 }

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

Definition at line 47 of file RawRopTdcRawDataBlock.h.

00048      : RawDataBlock(rhs) { ; }


Member Function Documentation

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

Reimplemented from RawDataBlock.

Definition at line 143 of file RawRopTdcRawDataBlock.cxx.

References VldTimeStamp::AsString(), GetCrateId(), GetNumberOfTdcReadoutBytes(), GetRun(), GetRunType(), GetSubRun(), GetTimeFrame(), and GetTimeStamp().

00145 {
00146    RawDataBlock::FormatToOStream(os,option);
00147    if (option[0] == 'X') return os;
00148 
00149    os << " TimeStamp " << GetTimeStamp().AsString("c") 
00150       << " TimeFrame " << GetTimeFrame() << endl;
00151    os << " Run " << GetRun() 
00152       << " SubRun " << GetSubRun() 
00153       << " RunType " << GetRunType() << endl; 
00154    int crateid = GetCrateId();
00155    os << " Crate " << (crateid&0x3f)
00156       << " (0x" << hex << crateid << dec << ") had "
00157       << GetNumberOfTdcReadoutBytes() << " bytes of data " 
00158       << endl;
00159 
00160    return os;
00161 }

Int_t RawRopTdcRawDataBlock::GetCrateId (  )  const

Definition at line 110 of file RawRopTdcRawDataBlock.cxx.

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

Referenced by RawTofConverter::ConstructTofBlocks(), and FormatToOStream().

00111 {
00112    // get the crate id
00113    if (fSize > indx_crateid) return fRawBlock[indx_crateid];
00114    return -1;
00115 }

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

Definition at line 44 of file RawRopTdcRawDataBlock.h.

References fgDebugFlags.

00044 { return fgDebugFlags; }

Int_t RawRopTdcRawDataBlock::GetNumberOfTdcReadoutBytes (  )  const

Definition at line 126 of file RawRopTdcRawDataBlock.cxx.

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

Referenced by RawTofConverter::ConstructTofBlocks(), and FormatToOStream().

00127 {
00128    // get the # of Etc errors
00129    if (fSize > indx_nbytes) return fRawBlock[indx_nbytes];
00130    return -1;
00131 }

Int_t RawRopTdcRawDataBlock::GetRun ( void   )  const

Definition at line 86 of file RawRopTdcRawDataBlock.cxx.

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

Referenced by FormatToOStream().

00087 {
00088    // get the run number
00089    if (fSize > indx_run) return fRawBlock[indx_run];
00090    return -1;
00091 }

Short_t RawRopTdcRawDataBlock::GetRunType (  )  const

Definition at line 102 of file RawRopTdcRawDataBlock.cxx.

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

Referenced by FormatToOStream().

00103 {
00104    // get the run type
00105    if (fSize > indx_runtype) return fRawBlock[indx_runtype]&0xffff;
00106    return -1;
00107 }

Short_t RawRopTdcRawDataBlock::GetSubRun (  )  const

Definition at line 94 of file RawRopTdcRawDataBlock.cxx.

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

Referenced by FormatToOStream().

00095 {
00096    // get the subrun number
00097    if (fSize > indx_subrun) return (fRawBlock[indx_subrun]>>16)&0xffff;
00098    return -1;
00099 }

const Char_t * RawRopTdcRawDataBlock::GetTdcData (  )  const

Definition at line 134 of file RawRopTdcRawDataBlock.cxx.

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

Referenced by RawTofConverter::ConstructTofBlocks().

00135 {
00136    // get ptr to the data
00137    Int_t* data_start = fRawBlock + zzzz_last;
00138    if (fSize >= zzzz_last) return (const Char_t*) data_start;
00139    return 0;
00140 }

Int_t RawRopTdcRawDataBlock::GetTimeFrame (  )  const

Definition at line 118 of file RawRopTdcRawDataBlock.cxx.

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

Referenced by FormatToOStream().

00119 {
00120    // get the time frame
00121    if (fSize > indx_tf) return fRawBlock[indx_tf];
00122    return -1;
00123 }

VldTimeStamp RawRopTdcRawDataBlock::GetTimeStamp (  )  const

Definition at line 76 of file RawRopTdcRawDataBlock.cxx.

References RawDataBlock::fRawBlock, RawDataBlock::fSize, indx_nsec, and indx_sec.

Referenced by RawTofConverter::ConstructTofBlocks(), and FormatToOStream().

00077 {
00078    // get the timestamp
00079    if (fSize > indx_nsec) 
00080       return VldTimeStamp(fRawBlock[indx_sec],fRawBlock[indx_nsec]);
00081 
00082    return VldTimeStamp((time_t)0,(Int_t)0);
00083 }

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

Definition at line 43 of file RawRopTdcRawDataBlock.h.

References fgDebugFlags.

00043 {fgDebugFlags=dbgflgs;}


Member Data Documentation

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

Definition at line 55 of file RawRopTdcRawDataBlock.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