source: JEM-EUSO/esaf_lal/tags/v1_r0/esaf/packages/common/root/src/EMacroCell.cc @ 117

Last change on this file since 117 was 117, checked in by moretto, 11 years ago

ESAF version compilable on mac OS

File size: 2.6 KB
Line 
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
7ClassImp(EMacroCell)
8
9//_____________________________________________________________________________
10EMacroCell::EMacroCell() {
11    // ctor
12
13    Clear();
14}
15
16//_____________________________________________________________________________
17EMacroCell::EMacroCell(const EMacroCell& other) : TObject() {
18    // copy ctor
19
20    other.Copy( *this );
21}
22
23//_____________________________________________________________________________
24EMacroCell::~EMacroCell() {
25    // dtor
26
27    //Clear();
28}
29
30//_____________________________________________________________________________
31void 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//_____________________________________________________________________________
58void 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//_____________________________________________________________________________
80Int_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}
Note: See TracBrowser for help on using the repository browser.