er  dev
cls_RootHit.cxx
1 #include "cls_RootHit.h"
2 
3 ClassImp(cls_RootHit)
4 
5 // Default constructor should not be used
7  fTimestamp(0),
8  fChannel(0),
9  fRawAdcVal(0),
10  fAdcVal(0),
11  fAdcCalibrated(0.)
12 {
13 }
14 
15 cls_RootHit::cls_RootHit(ULong64_t p_ts, UChar_t p_ch, UShort_t p_rawAdc, Int_t p_adc, Float_t p_adcCalib) :
16  fTimestamp(p_ts),
17  fChannel(p_ch),
18  fRawAdcVal(p_rawAdc),
19  fAdcVal(p_adc),
20  fAdcCalibrated(p_adcCalib)
21 {
22 }
23 
24 cls_RootHit::cls_RootHit(cls_RootHit* p_sourceHit) :
25  fTimestamp(p_sourceHit->fTimestamp),
26  fChannel(p_sourceHit->fChannel),
27  fRawAdcVal(p_sourceHit->fRawAdcVal),
28  fAdcVal(p_sourceHit->fAdcVal),
29  fAdcCalibrated(p_sourceHit->fAdcCalibrated)
30 {
31 }
32 
33 cls_RootHit::~cls_RootHit()
34 {
35  Clear();
36 }
37 
38 void cls_RootHit::Clear(Option_t * /*option*/)
39 {
40  TObject::Clear();
41 }
42 
43 cls_RootHit &cls_RootHit::operator=(const cls_RootHit &orig)
44 {
45  TObject::operator=(orig);
46 
47  fTimestamp = orig.fTimestamp;
48  fChannel = orig.fChannel;
49  fRawAdcVal = orig.fRawAdcVal;
50  fAdcVal = orig.fAdcVal;
51  fAdcCalibrated = orig.fAdcCalibrated;
52 
53  return *this;
54 }