Hall A ROOT/C++ Analyzer (podd)
Loading...
Searching...
No Matches
FastbusModule.h
Go to the documentation of this file.
1#ifndef Podd_FastbusModule_h_
2#define Podd_FastbusModule_h_
3
5//
6// FastbusModule
7// fastbus module class.
8// author Robert Michaels (rom@jlab.org)
9//
11
12#include "Module.h"
13
14namespace Decoder {
15
16class FastbusModule : public Module {
17
18public:
19
21 : fHasHeader(false),
23 fDataMask(0), fOptMask(0), fOptShift(0),
24 fChan(0), fData(0), fRawData(0) {}
25 FastbusModule( UInt_t crate, UInt_t slot );
26 virtual ~FastbusModule() = default;
27
28 using Module::LoadSlot;
29 using Module::Init;
30
31 virtual Int_t Decode(const UInt_t *evbuffer);
32 virtual Bool_t IsSlot(UInt_t rdata) { return (Slot(rdata)==fSlot); };
33 virtual UInt_t LoadSlot( THaSlotData *sldat, const UInt_t* evbuffer, const UInt_t *pstop);
34 void DoPrint() const;
35
36 UInt_t GetOpt( UInt_t rdata) const { return Opt(rdata); };
37
38 UInt_t Slot(UInt_t rdata) const { return (rdata>>fSlotShift); };
39 UInt_t Chan(UInt_t rdata) const { return (rdata&fChanMask)>>fChanShift; };
40 UInt_t Data(UInt_t rdata) const { return (rdata&fDataMask); };
41 UInt_t Opt(UInt_t rdata) const { return (rdata&fOptMask)>>fOptShift; };
42
43 virtual void SetSlot( UInt_t crate, UInt_t slot, UInt_t header = 0,
44 UInt_t mask = 0, Int_t modelnum = 0 );
45
46protected:
47
54
55 virtual void Init();
56
57private:
58
60
61 ClassDef(FastbusModule,0) // Fastbus module
62
63};
64
65}
66
67#endif
int Int_t
unsigned int UInt_t
bool Bool_t
#define ClassDef(name, id)
UInt_t Opt(UInt_t rdata) const
UInt_t Chan(UInt_t rdata) const
UInt_t Slot(UInt_t rdata) const
virtual void SetSlot(UInt_t crate, UInt_t slot, UInt_t header=0, UInt_t mask=0, Int_t modelnum=0)
virtual UInt_t LoadSlot(THaSlotData *sldat, const UInt_t *evbuffer, const UInt_t *pstop)
UInt_t GetOpt(UInt_t rdata) const
virtual ~FastbusModule()=default
virtual Bool_t IsSlot(UInt_t rdata)
virtual Int_t Decode(const UInt_t *evbuffer)
UInt_t Data(UInt_t rdata) const
static TypeIter_t fgThisType
virtual void Init()
Definition Module.cxx:51
virtual UInt_t LoadSlot(THaSlotData *sldat, const UInt_t *evbuffer, const UInt_t *pstop)=0
UInt_t fSlot
Definition Module.h:142
TypeSet_t::iterator TypeIter_t
Definition Module.h:40