12#include <framework/dataobjects/EventMetaData.h>
13#include <mdst/dataobjects/TRGSummary.h>
14#include <trg/gdl/TrgBitInput.h>
16const int N_INPUT_ARRAY = 5;
17const int N_OUTPUT_ARRAY = 5;
18const int N_PSNM_ARRAY = 10;
19const int N_BITS_RESERVED = 200;
40#include <trg/gdl/TrgBitOutput.h>
56 void set(
unsigned pattern,
unsigned wordPosition);
59 bool isFired(
unsigned bit)
const;
88 void set(
unsigned pattern,
unsigned wordPosition);
91 bool isFired(
unsigned bit)
const;
116 unsigned nconf_input;
129 std::string
version(
void)
const;
141 bool isFired(output bitname)
const;
143 bool isFired(
const char* bitname)
const;
145 bool isFired(input bitname)
const;
146 bool isFiredInput(
unsigned ith_bit)
const;
147 bool isFiredInput(input bitname)
const;
148 bool isFiredInput(
const char* bitname)
const;
149 bool isFiredFtdl(
unsigned ith_bit)
const;
150 bool isFiredFtdl(output bitname)
const;
151 bool isFiredFtdl(
const char* bitname)
const;
152 bool isFiredPsnm(
unsigned ith_bit)
const;
153 bool isFiredPsnm(output bitname)
const;
154 bool isFiredPsnm(
const char* bitname)
const;
158 unsigned getNumOfOutputs(
void) {
return n_output;}
166 unsigned getInputBitNum(input a) {
return _inputMap[nconf_input][a];}
171 int getBitNum(
const char* bitname)
const;
177 bool isUsed(input a)
const;
178 bool isUsed(output a)
const;
179 bool isUsed(
const char* bitname)
const;
183 const char* getOutputBitName(
unsigned ith_bit)
const;
190 std::vector<unsigned> getFtdlVector(
void) {
return _ftdVector;}
191 std::vector<unsigned> getPsnmVector(
void) {
return _psnVector;}
202 void mapNumber(
unsigned exp,
unsigned run);
206 static const std::string _ftdlVersion[2];
207 static const unsigned _inputMap[N_INPUT_ARRAY][N_BITS_RESERVED];
208 static const unsigned _outputMap[N_OUTPUT_ARRAY][N_BITS_RESERVED];
209 static const unsigned _psnmValues[N_PSNM_ARRAY][N_BITS_RESERVED];
210 static const char* _inputBitNames[N_BITS_RESERVED];
211 static const char* _outputBitNames[N_BITS_RESERVED];
215 InputBitPattern _input;
216 OutputBitPattern _ftdl;
217 OutputBitPattern _psnm;
221 std::vector<unsigned> _ftdVector;
222 std::vector<unsigned> _psnVector;
ETimingType
types of trigger timing source defined in b2tt firmware
Output bit pattern class.
int operator[](unsigned)
Bit.
int operator==(OutputBitPattern &)
Comparison.
bool isFired(unsigned bit) const
get fired or not
OutputBitPattern()
Constructor.
unsigned _pattern[6]
hit pattern
virtual ~OutputBitPattern()
Destructor.
void set(unsigned pattern, unsigned wordPosition)
reads/sets a bit.
A general interface to get a trigger response.
const char * getInputBitName(unsigned ith_bit) const
returns bit name
std::vector< unsigned > _itdVector
hit information in vector
std::vector< unsigned > getInputVector(void)
return hit information in vector
bool isFired(output bitname) const
returns true if the psnm bit is fired.
bool isFiredFilled(void)
Whether hit information is available or not.
bool isUsed(input a) const
Whether the bit exists for the run.
std::string version(void) const
returns TrgBit version;
unsigned getNumOfInputs(void)
return number of used bits
std::string versionFTDL(void) const
returns FTDL version;
int getBitNum(const char *bitname) const
returns bit number for the exprun, if >=0 it is input_bitnum if <0 it is -output_bitnum-1
unsigned getOutputBitNum(const char *bitname) const
returns bit number
virtual ~TrgBit()
Destructor.
unsigned getInputBitNum(const char *bitname) const
returns bit number
void printConf(void) const
print configuration values
unsigned preScaleValue(output A) const
returns pre-scale value.
void printPreScaleValues(void) const
print prescale values
TRGSummary::ETimingType getTimingSource(void) const
returns timing source
Abstract base class for different kinds of events.