RawCrateStatus Class Reference

#include <RawCrateStatus.h>

Inheritance diagram for RawCrateStatus:
RawDigitCrateStatus

List of all members.

Public Member Functions

 RawCrateStatus ()
 RawCrateStatus (RawBlockId rbid, Int_t crate, ElecType::Elec_t etype=ElecType::kUnknown, Bool_t pedMode=kFALSE, Bool_t sparseMode=kFALSE, Bool_t commonMode=kFALSE)
 RawCrateStatus (RawBlockId rbid, const Int_t *&p, Bool_t skipWord=false)
virtual ~RawCrateStatus ()
const RawBlockIdGetRawBlockId () const
Int_t GetCrate () const
Int_t GetEntries () const
ElecType::Elec_t GetElecType () const
Bool_t GetPedMode () const
Bool_t GetSparsMode () const
Bool_t GetCommonMode () const
virtual void Print (Option_t *option="") const
virtual std::ostream & FormatToOStream (std::ostream &os, Option_t *option="") const

Protected Attributes

RawBlockId fRawBlockId
Int_t fCrateId
Int_t fEntries

Detailed Description

Definition at line 25 of file RawCrateStatus.h.


Constructor & Destructor Documentation

RawCrateStatus::RawCrateStatus (  ) 

Definition at line 23 of file RawCrateStatus.cxx.

00024    : fCrateId(-1), fEntries(0)
00025 {
00026    // Default constructor
00027 }

RawCrateStatus::RawCrateStatus ( RawBlockId  rbid,
Int_t  crate,
ElecType::Elec_t  etype = ElecType::kUnknown,
Bool_t  pedMode = kFALSE,
Bool_t  sparseMode = kFALSE,
Bool_t  commonMode = kFALSE 
)

Definition at line 30 of file RawCrateStatus.cxx.

References fCrateId, rcsMaskCommonMode, rcsMaskElec, rcsMaskPedMode, rcsMaskSparsMode, and rcsShiftElec.

00034    : fRawBlockId(rbid), fCrateId(crate), fEntries(0)
00035 {
00036    fCrateId |= (etype&rcsMaskElec) << rcsShiftElec ;
00037    if (pedMode)    fCrateId |= rcsMaskPedMode;
00038    if (sparseMode) fCrateId |= rcsMaskSparsMode;
00039    if (commonMode) fCrateId |= rcsMaskCommonMode;
00040 }

RawCrateStatus::RawCrateStatus ( RawBlockId  rbid,
const Int_t *&  p,
Bool_t  skipWord = false 
)

Definition at line 43 of file RawCrateStatus.cxx.

References fCrateId, and fEntries.

00045    : fRawBlockId(rbid)
00046 {
00047    // assume pointer is at block that looks like:
00048    //------------------------
00049    //  01987654321098765432109876543210
00050    //                       cspeeCCCCCC
00051    //  [  skip word sometimes present ]
00052    //                      # of entries
00053    //             <=== ctor for RawCrateStatus leaves us here
00054 
00055    if ( skipWord ) {
00056      fCrateId = p[0];
00057      // skip intervening word
00058      fEntries = p[2];
00059      // advance the pointer
00060      p += 3;
00061    }
00062    else {
00063      fCrateId = p[0];
00064      fEntries = p[1];
00065      // advance the pointer
00066      p += 2;
00067    }
00068 }

RawCrateStatus::~RawCrateStatus (  )  [virtual]

Definition at line 71 of file RawCrateStatus.cxx.

00072 {
00073    // delete all owned sub-objects
00074 
00075 }


Member Function Documentation

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

Reimplemented in RawDigitCrateStatus.

Definition at line 84 of file RawCrateStatus.cxx.

References bfld::AsString(), fEntries, GetCommonMode(), GetCrate(), GetElecType(), Nav::GetName(), GetPedMode(), and GetSparsMode().

Referenced by Print().

00086 {
00087   os << GetName()
00088      << " # " << GetCrate()
00089      << " " << ElecType::AsString(GetElecType()) 
00090      << "(" << ( GetPedMode()    ? 'P' : '-' )
00091      << "," << ( GetSparsMode()  ? 'S' : '-' )
00092      << "," << ( GetCommonMode() ? 'C' : '-' )
00093      << ") " 
00094      << " N=" << fEntries
00095      << std::endl;
00096 
00097   return os;
00098 
00099 }

Bool_t RawCrateStatus::GetCommonMode (  )  const [inline]
Int_t RawCrateStatus::GetCrate (  )  const [inline]
ElecType::Elec_t RawCrateStatus::GetElecType (  )  const [inline]
Int_t RawCrateStatus::GetEntries (  )  const [inline]
Bool_t RawCrateStatus::GetPedMode (  )  const [inline]
const RawBlockId& RawCrateStatus::GetRawBlockId (  )  const [inline]
Bool_t RawCrateStatus::GetSparsMode (  )  const [inline]
void RawCrateStatus::Print ( Option_t *  option = ""  )  const [virtual]

Member Data Documentation

Int_t RawCrateStatus::fCrateId [protected]
Int_t RawCrateStatus::fEntries [protected]

Definition at line 54 of file RawCrateStatus.h.

Referenced by FormatToOStream(), GetEntries(), and RawCrateStatus().

Definition at line 52 of file RawCrateStatus.h.

Referenced by GetRawBlockId().


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

Generated on 2 Nov 2017 for loon by  doxygen 1.6.1