1 | // ESAF : Euso Simulation and Analysis Framework |
---|
2 | // $Id: EMacroCell.cc 2968 2011-07-20 00:43:14Z fenu $ |
---|
3 | // created May, 23 2004 |
---|
4 | |
---|
5 | #include "EMacroCell.hh" |
---|
6 | |
---|
7 | ClassImp(EMacroCell) |
---|
8 | |
---|
9 | //_____________________________________________________________________________ |
---|
10 | EMacroCell::EMacroCell() { |
---|
11 | // ctor |
---|
12 | |
---|
13 | Clear(); |
---|
14 | } |
---|
15 | |
---|
16 | //_____________________________________________________________________________ |
---|
17 | EMacroCell::EMacroCell(const EMacroCell& other) : TObject() { |
---|
18 | // copy ctor |
---|
19 | |
---|
20 | other.Copy( *this ); |
---|
21 | } |
---|
22 | |
---|
23 | //_____________________________________________________________________________ |
---|
24 | EMacroCell::~EMacroCell() { |
---|
25 | // dtor |
---|
26 | |
---|
27 | //Clear(); |
---|
28 | } |
---|
29 | |
---|
30 | //_____________________________________________________________________________ |
---|
31 | void EMacroCell::Copy( TObject& other) const { |
---|
32 | // copy |
---|
33 | |
---|
34 | TObject::Copy( other ); |
---|
35 | |
---|
36 | ((EMacroCell&)other).fMCId = fMCId; |
---|
37 | ((EMacroCell&)other).fNumChips = fNumChips; |
---|
38 | ((EMacroCell&)other).fNumPixels = fNumPixels; |
---|
39 | ((EMacroCell&)other).fNumCounts = fNumCounts; |
---|
40 | ((EMacroCell&)other).fNumFastOrs = fNumFastOrs; |
---|
41 | ((EMacroCell&)other).fHasTriggered = fHasTriggered; |
---|
42 | ((EMacroCell&)other).fGtuTrigger = fGtuTrigger; |
---|
43 | ((EMacroCell&)other).fTriggerWord = fTriggerWord; |
---|
44 | ((EMacroCell&)other).fTrgWords = fTrgWords; |
---|
45 | ((EMacroCell&)other).fTrgIds = fTrgIds; |
---|
46 | ((EMacroCell&)other).fGtuTriggerCCB = fGtuTriggerCCB; |
---|
47 | ((EMacroCell&)other).fTrigDirCCB = fTrigDirCCB; |
---|
48 | ((EMacroCell&)other).fTrigECRowCCB = fTrigECRowCCB; |
---|
49 | ((EMacroCell&)other).fTrigECColCCB = fTrigECColCCB; |
---|
50 | ((EMacroCell&)other).fTrigChipIDCCB = fTrigChipIDCCB; |
---|
51 | ((EMacroCell&)other).fTrigPDMIDCCB = fTrigPDMIDCCB; |
---|
52 | ((EMacroCell&)other).fTrigMaxCTSCCB = fTrigMaxCTSCCB; |
---|
53 | |
---|
54 | |
---|
55 | } |
---|
56 | |
---|
57 | //_____________________________________________________________________________ |
---|
58 | void EMacroCell::Clear( Option_t* opt ) { |
---|
59 | //clear |
---|
60 | fMCId = 0; |
---|
61 | fNumChips = 0; |
---|
62 | fNumPixels = 0; |
---|
63 | fNumCounts = 0; |
---|
64 | fNumFastOrs = 0; |
---|
65 | fHasTriggered = 0; |
---|
66 | fGtuTrigger = 0; |
---|
67 | fTriggerWord = 0; |
---|
68 | fGtuTriggerCCB = -10; |
---|
69 | fTrigDirCCB =-10; |
---|
70 | fTrigECRowCCB=-10; |
---|
71 | fTrigECColCCB=-10; |
---|
72 | fTrigChipIDCCB=-10; |
---|
73 | fTrigPDMIDCCB=-10; |
---|
74 | fTrigMaxCTSCCB=-10; |
---|
75 | fTrgWords.Set(0); |
---|
76 | fTrgIds.Set(0); |
---|
77 | } |
---|
78 | |
---|
79 | //_____________________________________________________________________________ |
---|
80 | Int_t EMacroCell::GetWord(ETriggerTypeIdentifier id) const { |
---|
81 | // get the word of a specific trigger |
---|
82 | if ( fTrgIds.GetSize()==0 ) return 0; |
---|
83 | for(Int_t i(0); i<fTrgIds.GetSize(); i++) { |
---|
84 | if ( fTrgIds.At(i) == (Int_t)id ) { |
---|
85 | return fTrgWords.At(i); |
---|
86 | } |
---|
87 | } |
---|
88 | return 0; |
---|
89 | } |
---|