9 #include "StPicoMessMgr.h"
10 #include "StPicoEmcTrigger.h"
23 if (flag < 0 ||
id < 0 || adc < 0)
return;
24 mFlag = ( (flag > std::numeric_limits<unsigned char>::max()) ?
25 std::numeric_limits<unsigned char>::max() : (UChar_t)flag );
26 mId = ( (
id > std::numeric_limits<unsigned short>::max()) ?
27 std::numeric_limits<unsigned short>::max() : (UShort_t)
id );
28 mAdc = ( (adc > std::numeric_limits<unsigned short>::max()) ?
29 std::numeric_limits<unsigned short>::max() : (UShort_t)adc );
36 std::vector<unsigned short> smdE,
39 if (flag < 0 ||
id < 0 || adc < 0)
return;
40 mFlag = ( (flag > std::numeric_limits<unsigned char>::max()) ?
41 std::numeric_limits<unsigned char>::max() : (UChar_t)flag );
42 mId = ( (
id > std::numeric_limits<unsigned short>::max()) ?
43 std::numeric_limits<unsigned short>::max() : (UShort_t)
id );
44 mAdc = ( (adc > std::numeric_limits<unsigned short>::max()) ?
45 std::numeric_limits<unsigned short>::max() : (UShort_t)adc );
67 LOG_INFO <<
"flag: " <<
mFlag <<
" id: " <<
mId <<
" ADC: " <<
mAdc
68 <<
" SMDE hits num: " <<
mSmdE.size()
69 <<
" SMDP hits num: " <<
mSmdP.size() << endm;
78 mFlag = (flag > std::numeric_limits<unsigned char>::max()) ?
79 std::numeric_limits<unsigned char>::max() : (UChar_t)flag;
89 mId = (
id > std::numeric_limits<unsigned short>::max()) ?
90 std::numeric_limits<unsigned short>::max() : (UShort_t)
id;
100 mAdc = (adc > std::numeric_limits<unsigned short>::max()) ?
101 std::numeric_limits<unsigned short>::max() : (UShort_t)adc;
107 if (
mSmdE.empty() ) {
111 if ( i>=0 && i<=(Int_t)
mSmdE.size() ) {
112 return (Int_t)
mSmdE.at( i );
122 if (
mSmdP.empty() ) {
126 if ( i>=0 && i<=(Int_t)
mSmdP.size() ) {
127 return (Int_t)
mSmdP.at( i );
void setAdc(Int_t adc)
Set ADC.
UShort_t mId
SoftId. bjp: 1-18, ht: 1-4800.
void setFlag(Int_t flag)
Set trigger flag.
void setId(Int_t id)
Set ID.
Int_t smdPIndex(Int_t i) const
Return i-th BEmc SMDP hit index. -1 = no entries, -2 = out of range.
std::vector< unsigned short > mSmdP
Vector of associated BEmc SMD Phi hit indices.
StPicoEmcTrigger()
Default constructor.
Holds EMC trigger information.
std::vector< unsigned short > mSmdE
Vector of associated BEmc SMD Eta hit indices.
virtual ~StPicoEmcTrigger()
Destructor.
Int_t smdEIndex(Int_t i) const
Return i-th BEmc SMDE hit index. -1 = no entries, -2 = out of range.
virtual void Print(const Char_t *option="") const
Print EMC trigger information.