Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
///////////////////////////////////////////////////////////////////////////////
// //
// THcRawShowerHit //
// //
// Class representing a single raw hit for a hodoscope paddle //
// //
// Contains plane, counter and pos/neg adc and tdc values //
// //
///////////////////////////////////////////////////////////////////////////////
#include "THcRawShowerHit.h"
using namespace std;
void THcRawShowerHit::SetData(Int_t signal, Int_t data) {
if(signal==0) {
fADC_pos = data;
} else if (signal==1) {
fADC_neg = data;
}
}
Int_t THcRawShowerHit::GetData(Int_t signal) {
if(signal==0) {
return(fADC_pos);
} else if (signal==1) {
return(fADC_neg);
}
return(-1); // Actually should throw exception
}
//_____________________________________________________________________________
THcRawShowerHit& THcRawShowerHit::operator=( const THcRawShowerHit& rhs )
{
// Assignment operator.
THcRawHit::operator=(rhs);
if ( this != &rhs ) {
fPlane = rhs.fPlane;
fCounter = rhs.fCounter;
fADC_pos = rhs.fADC_pos;
fADC_neg = rhs.fADC_neg;
}
return *this;
}
//////////////////////////////////////////////////////////////////////////
ClassImp(THcRawShowerHit)