StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StPicoBEmcSmdEHit.cxx
1 //
2 // The StPicoBEmc SmdEta class holds SMDEta hits associated with an EMC trigger
3 //
4 
5 // C++ headers
6 #include <limits>
7 
8 // ROOT headers
9 #include "TMath.h"
10 
11 // PicoDst headers
12 #include "StPicoMessMgr.h"
13 #include "StPicoBEmcSmdEHit.h"
14 
15 ClassImp(StPicoBEmcSmdEHit)
16 
17 //_________________
19  mId(-9999),
20  mAdc(-9999),
21  mEnergy(-9999) {
22  /* emtpy */
23 }
24 
25 //_________________
26 StPicoBEmcSmdEHit::StPicoBEmcSmdEHit(Int_t id, Int_t adc, Float_t energy) : TObject() {
27  mId = (id > std::numeric_limits<short>::max()) ? -1 : (Short_t)id;
28  mAdc = ( adc > std::numeric_limits<unsigned short>::max() ) ?
29  std::numeric_limits<unsigned short>::max() : (UShort_t)adc;
30  mEnergy = energy;
31 }
32 
33 //_________________
35  mId = hit.mId;
36  mAdc = hit.mAdc;
37  mEnergy = hit.mEnergy;
38 }
39 
40 //_________________
42  /* empty */
43 }
44 
45 //_________________
46 void StPicoBEmcSmdEHit::Print(const Char_t* option __attribute__((unused)) ) const {
47  LOG_INFO << "id: " << id() << " ADC: " << adc() << " energy: " << energy() << endm;
48 }
virtual void Print(const Char_t *option="") const
Print BEMC SmdEta hit information.
Int_t adc() const
SMD Eta hit ADC.
Holds BEMC SmdEta hit information.
Float_t energy() const
SMD Eta hit energy.
StPicoBEmcSmdEHit()
Default constructor.
virtual ~StPicoBEmcSmdEHit()
Destructor.
Int_t id() const
SMD Eta hit id.