Hall A ROOT/C++ Analyzer (podd)
Decoder::GenScaler Class Reference

Public Member Functions

 GenScaler ()
 
 GenScaler (UInt_t crate, UInt_t slot)
 
virtual void Clear (Option_t *opt="")
 
virtual Int_t Decode (const UInt_t *evbuffer)
 
virtual UInt_t GetData (UInt_t chan) const
 
virtual Bool_t IsSlot (UInt_t rdata)
 
virtual void DoPrint () const
 
void GenInit ()
 
Int_t SetClock (Double_t deltaT, UInt_t clockchan=0, Double_t clockrate=0)
 
Double_t GetRate (UInt_t chan) const
 
Double_t GetTimeSincePrev () const
 
Bool_t IsDecoded () const
 
void LoadNormScaler (GenScaler *scal)
 
void DebugPrint (std::ofstream *file=nullptr) const
 
virtual UInt_t LoadSlot (THaSlotData *sldat, const UInt_t *evbuffer, const UInt_t *pstop)
 
virtual UInt_t LoadSlot (THaSlotData *sldat, const UInt_t *evbuffer, UInt_t pos, UInt_t len)
 
virtual void SetBank (Int_t bank)
 
- Public Member Functions inherited from Decoder::VmeModule
 VmeModule (UInt_t crate, UInt_t slot)
 
 VmeModule ()=default
 
virtual ~VmeModule ()=default
 
- Public Member Functions inherited from Decoder::Module
 Module ()
 
 Module (UInt_t crate, UInt_t slot)
 
virtual ~Module ()=default
 
Bool_t IsMultiBlockMode () const
 
Bool_t BlockIsDone () const
 
virtual void SetFirmware (Int_t fw)
 
UInt_t GetBlockSize () const
 
virtual UInt_t GetData (UInt_t, UInt_t) const
 
virtual UInt_t GetData (UInt_t, UInt_t, UInt_t) const
 
virtual UInt_t GetData (Decoder::EModuleType, UInt_t, UInt_t) const
 
virtual UInt_t GetData (Decoder::EModuleType, UInt_t, UInt_t, UInt_t) const
 
virtual UInt_t GetOpt (UInt_t) const
 
virtual UInt_t GetOpt (UInt_t, UInt_t) const
 
virtual UInt_t LoadNextEvBuffer (THaSlotData *)
 
virtual UInt_t GetNumChan () const
 
virtual UInt_t GetNumEvents (Decoder::EModuleType, UInt_t) const
 
virtual UInt_t GetNumEvents (UInt_t) const
 
virtual UInt_t GetNumEvents () const
 
virtual UInt_t GetNumSamples (UInt_t) const
 
virtual Int_t GetMode () const
 
virtual void SetSlot (UInt_t crate, UInt_t slot, UInt_t header=0, UInt_t mask=0, Int_t modelnum=0)
 
virtual void SetMode (Int_t mode)
 
virtual void Init ()
 
virtual void Init (const char *configstr)
 
virtual UInt_t GetCrate () const
 
virtual UInt_t GetSlot () const
 
virtual void SetDebugFile (std::ofstream *file)
 
virtual void SetHeader (UInt_t header, UInt_t mask)
 
virtual Bool_t IsMultiFunction ()
 
virtual Bool_t HasCapability (Decoder::EModuleType)
 

Protected Member Functions

void LoadRates ()
 
Bool_t checkchan (UInt_t chan) const
 

Protected Attributes

Bool_t fIsDecoded
 
Bool_t fFirstTime
 
Double_t fDeltaT
 
std::vector< UInt_t > fDataArray
 
std::vector< UInt_t > fPrevData
 
std::vector< Double_t > fRate
 
UInt_t fClockChan
 
UInt_t fNumChanMask
 
UInt_t fNumChanShift
 
Bool_t fHasClock
 
Double_t fClockRate
 
GenScalerfNormScaler
 
Bool_t firsttime
 
Bool_t firstwarn
 
- Protected Attributes inherited from Decoder::Module
std::vector< UInt_t > fData
 
UInt_t fCrate
 
UInt_t fSlot
 
UInt_t fHeader
 
UInt_t fHeaderMask
 
Int_t fBank
 
UInt_t fWordsExpect
 
UInt_t fWordsSeen
 
UInt_t fWdcntMask
 
UInt_t fWdcntShift
 
Int_t fModelNum
 
UInt_t fNumChan
 
Int_t fMode
 
UInt_t block_size
 
Bool_t IsInit
 
Bool_t fMultiBlockMode
 
Bool_t fBlockIsDone
 
Int_t fFirmwareVers
 
Int_t fDebug
 
std::ofstream * fDebugFile
 
TObject * fExtra
 

Static Protected Attributes

static const UInt_t fgNumChanDefault =32
 

Additional Inherited Members

- Public Types inherited from Decoder::Module
using TypeSet_t = std::set< ModuleType >
 
using TypeIter_t = TypeSet_t::iterator
 
- Static Public Member Functions inherited from Decoder::Module
static TypeSet_tfgModuleTypes ()
 
static TypeIter_t DoRegister (const ModuleType &registration_info)
 
- Static Protected Member Functions inherited from Decoder::Module
static void ParseConfigStr (const char *configstr, const std::vector< ConfigStrReq > &req)
 

#include <GenScaler.h>

Inheritance diagram for Decoder::GenScaler:

Constructor & Destructor Documentation

Decoder::GenScaler::GenScaler ( )
inline
Decoder::GenScaler::GenScaler ( UInt_t  crate,
UInt_t  slot 
)

Member Function Documentation

Bool_t Decoder::GenScaler::checkchan ( UInt_t  chan) const
inlineprotected
void Decoder::GenScaler::Clear ( Option_t *  opt = "")
virtual

Reimplemented from Decoder::Module.

void Decoder::GenScaler::DebugPrint ( std::ofstream *  file = nullptr) const
Int_t Decoder::GenScaler::Decode ( const UInt_t *  evbuffer)
virtual

Implements Decoder::Module.

void Decoder::GenScaler::DoPrint ( ) const
virtual

Reimplemented from Decoder::Module.

void Decoder::GenScaler::GenInit ( )
UInt_t Decoder::GenScaler::GetData ( UInt_t  chan) const
virtual

Reimplemented from Decoder::Module.

Double_t Decoder::GenScaler::GetRate ( UInt_t  chan) const
Double_t Decoder::GenScaler::GetTimeSincePrev ( ) const
Bool_t Decoder::GenScaler::IsDecoded ( ) const
inline
Bool_t Decoder::GenScaler::IsSlot ( UInt_t  rdata)
virtual

Check if this word is the header for the slot we are looking for Get the number of channels in this module from the header and save so that bank version of LoadSlot can skip over this module if it is not the correct one.

Reimplemented from Decoder::VmeModule.

void Decoder::GenScaler::LoadNormScaler ( GenScaler scal)
void Decoder::GenScaler::LoadRates ( )
protected
UInt_t Decoder::GenScaler::LoadSlot ( THaSlotData sldat,
const UInt_t *  evbuffer,
const UInt_t *  pstop 
)
virtual

Reimplemented from Decoder::VmeModule.

UInt_t Decoder::GenScaler::LoadSlot ( THaSlotData sldat,
const UInt_t *  evbuffer,
UInt_t  pos,
UInt_t  len 
)
virtual

Fill data structures of this class, utilizing bank structure Read until out of data or until decode says that the slot is finished len = ndata in event, pos = word number for block header in event

Reimplemented from Decoder::Module.

void Decoder::GenScaler::SetBank ( Int_t  bank)
virtual

Define scaler header format for modules in banks

Reimplemented from Decoder::Module.

Int_t Decoder::GenScaler::SetClock ( Double_t  deltaT,
UInt_t  clockchan = 0,
Double_t  clockrate = 0 
)

Member Data Documentation

UInt_t Decoder::GenScaler::fClockChan
protected
Double_t Decoder::GenScaler::fClockRate
protected
std::vector<UInt_t> Decoder::GenScaler::fDataArray
protected
Double_t Decoder::GenScaler::fDeltaT
protected
Bool_t Decoder::GenScaler::fFirstTime
protected
const UInt_t Decoder::GenScaler::fgNumChanDefault =32
staticprotected
Bool_t Decoder::GenScaler::fHasClock
protected
Bool_t Decoder::GenScaler::firsttime
protected
Bool_t Decoder::GenScaler::firstwarn
protected
Bool_t Decoder::GenScaler::fIsDecoded
protected
GenScaler* Decoder::GenScaler::fNormScaler
protected
UInt_t Decoder::GenScaler::fNumChanMask
protected
UInt_t Decoder::GenScaler::fNumChanShift
protected
std::vector<UInt_t> Decoder::GenScaler::fPrevData
protected
std::vector<Double_t> Decoder::GenScaler::fRate
protected
Collaboration diagram for Decoder::GenScaler:

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