#ifndef TFgdDccTrigBank_hxx_seen #define TFgdDccTrigBank_hxx_seen #include #define TFGDDCTRIGGER_BANK_TITLE "FGD DCC Trigger Bank" namespace COMET { class IFgdDccTrigBank; }; #define RAWFGDDCCTRIG_PL_TRIG_CONTROL_REG 0 #define RAWFGDDCCTRIG_PL_TRIG_STATUS_REG 1 #define RAWFGDDCCTRIG_PL_TRIG_LOW_WORD 2 #define RAWFGDDCCTRIG_PL_TRIG_HIGH_WORD 3 #define RAWFGDDCCTRIG_PL_TRIG_RECV_TIME 4 #define RAWFGDDCCTRIG_PL_TRIG_MASK 5 #define RAWFGDDCCTRIG_PL_TRIG_SENT_WORD 6 #define RAWFGDDCCTRIG_PL_TRIG_SENT_TIMER 7 #define RAWFGDDCCTRIG_PL_BUSY_SENT_WORD 8 #define RAWFGDDCCTRIG_PL_BUSY_SENT_TIMER 9 #define RAWFGDDCCTRIG_PL_TIMEWAITINGTRIGGER 10 #define RAWFGDDCCTRIG_PL_TIMEREADINGEVENT 11 #define RAWFGDDCCTRIG_PL_TIMEBUSYRELEASE 12 /// This is the Access Class for FGD DCC Trigger banks. /// The majority of the information stored in the bank is from the /// DCC register related to the SCM/MCM trigger. These definition of these /// registers have been specified here: /// /// http://www.nd280.org/tpc/wp/wp6/dcc/linux_dcc/DCC_trigger_word.pdf /// /// In addition the bank also stores some quantities calculated by the /// DCC front-end software. Namely: /// /// TimeWaitingTrigger: the time spent waiting for the trigger (uSec) /// TimeReadingEvent: the time spent reading this event (uSec) /// TimeBusyRelease: time from trigger to the release of busy (uSec) /// class COMET::IFgdDccTrigBank: public COMET::IMidasBank { public: IFgdDccTrigBank(); explicit IFgdDccTrigBank(const ULong64_t *bank, const char* title = TFGDDCTRIGGER_BANK_TITLE); virtual ~IFgdDccTrigBank(); /// Print contents to COMETLog void Print(const Option_t* opt = "") const; /// Get the crate number int GetDccNumber() const { TString name(GetName()); TString name2(name(2,2)); return name2.Atoi(); } /// Get the trigger control register UInt_t GetTrigControlReg() const { return this->GetData32()[RAWFGDDCCTRIG_PL_TRIG_CONTROL_REG]; } /// Get the trigger status register UInt_t GetTrigStatusReg() const { return this->GetData32()[RAWFGDDCCTRIG_PL_TRIG_STATUS_REG]; } /// Get the trigger low word UInt_t GetTrigLowWord() const { return this->GetData32()[RAWFGDDCCTRIG_PL_TRIG_LOW_WORD]; } /// Get the trigger high word UInt_t GetTrigHighWord() const { return this->GetData32()[RAWFGDDCCTRIG_PL_TRIG_HIGH_WORD]; } /// Get the trigger receive time UInt_t GetTrigRecvTime() const { return this->GetData32()[RAWFGDDCCTRIG_PL_TRIG_RECV_TIME]; } /// Get the trigger mask UInt_t GetTrigMask() const { return this->GetData32()[RAWFGDDCCTRIG_PL_TRIG_MASK]; } /// Get the trigger sent word UInt_t GetTrigSentWord() const { return this->GetData32()[RAWFGDDCCTRIG_PL_TRIG_SENT_WORD]; } /// Get the trigger sent timer UInt_t GetTrigSentTime() const { return this->GetData32()[RAWFGDDCCTRIG_PL_TRIG_SENT_TIMER]; } /// Get the busy sent word UInt_t GetBusySentWord() const { return this->GetData32()[RAWFGDDCCTRIG_PL_BUSY_SENT_WORD]; } /// Get the busy sent timer UInt_t GetBusySentTimer() const { return this->GetData32()[RAWFGDDCCTRIG_PL_BUSY_SENT_TIMER]; } /// Get the time spent waiting for the trigger (uSec) UInt_t GetTimeWaitingTrigger() const { return this->GetData32()[RAWFGDDCCTRIG_PL_TIMEWAITINGTRIGGER]; } /// Get the time spent reading this event (uSec) UInt_t GetTimeReadingEvent() const { return this->GetData32()[RAWFGDDCCTRIG_PL_TIMEREADINGEVENT]; } /// Get time from trigger to the release of busy (uSec) UInt_t GetTimeBusyRelease() const { return this->GetData32()[RAWFGDDCCTRIG_PL_TIMEBUSYRELEASE]; } private: }; #endif