source: JEM-EUSO/esaf_lal/tags/v1_r0/esaf/packages/common/root/src/EDetStatus.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: 3.5 KB
Line 
1// $Id: EDetStatus.cc 2262 2005-10-24 10:42:29Z pesce $
2// Author: Roberto Pesce   2005/09/27
3
4/*****************************************************************************
5 * ESAF: Euso Simulation and Analysis Framework                              *
6 *                                                                           *
7 *  Id: EDetStatus                                                           *
8 *  Package: <packagename>                                                   *
9 *  Coordinator: <coordinator>                                               *
10 *                                                                           *
11 *****************************************************************************/
12
13//_____________________________________________________________________________
14//
15// EDetStatus
16//
17// <extensive class description>
18//
19//   Config file parameters
20//   ======================
21//
22//   <parameter name>: <parameter description>
23//   -Valid options: <available options>
24//
25
26#include "EDetStatus.hh"
27
28ClassImp(EDetStatus)
29
30//_____________________________________________________________________________
31EDetStatus::EDetStatus() {
32    //
33    // Constructor
34    //
35}
36
37//_____________________________________________________________________________
38EDetStatus::EDetStatus( const EDetStatus& other ) : TObject() {
39    //
40    // Copy Constructor
41    //
42
43    other.Copy(*this);
44}
45
46//_____________________________________________________________________________
47EDetStatus::~EDetStatus() {
48    //
49    // Destructor
50    //
51}
52
53//_____________________________________________________________________________
54void EDetStatus::Copy( TObject &other) const {
55    //
56    // Copy method
57    //
58
59    TObject::Copy(other);
60
61    ((EDetStatus&)other).fNumActivePixels = fNumActivePixels;
62    ((EDetStatus&)other).fNumSignals = fNumSignals;
63    ((EDetStatus&)other).fNumBkg = fNumBkg;
64    ((EDetStatus&)other).fNumHits = fNumHits;
65    ((EDetStatus&)other).fNumGtu = fNumGtu;
66    ((EDetStatus&)other).fNumPhotons = fNumPhotons;
67    ((EDetStatus&)other).fMaxSignals = fMaxSignals;
68    ((EDetStatus&)other).fMaxBkg = fMaxBkg;
69    ((EDetStatus&)other).fMaxSignals = fMaxSignals;
70    ((EDetStatus&)other).fPhotonHistory = fPhotonHistory;
71}
72
73//_____________________________________________________________________________
74void EDetStatus::Clear( Option_t *opt ) {
75    //
76    // Clear method
77    //
78
79    fNumActivePixels = 0;
80    fNumSignals = 0;
81    fNumBkg = 0;
82    fNumHits = 0;
83    fNumGtu = 0;
84    fNumPhotons = 0;
85    fMaxSignals.Set(0);
86    fMaxBkg.Set(0);
87    fMaxHits.Set(0);
88    fPhotonHistory.Set(0);
89}
90
91//_____________________________________________________________________________
92Int_t EDetStatus::GetMaxHits( Int_t gtu ) const {
93    //
94    // Get the maximum number of hits registered in a pixel
95    // in a given GTU
96    //
97   
98    if ( gtu >=0 && gtu < fMaxHits.GetSize() ) return fMaxHits.At(gtu);
99    else return 0;
100}
101//_____________________________________________________________________________
102Int_t EDetStatus::GetMaxSignals( Int_t gtu ) const {
103    //
104    // Get the maximum number of hits registered in a pixel
105    // in a given GTU
106    //
107   
108    if ( gtu >=0 && gtu < fMaxSignals.GetSize() ) return fMaxSignals.At(gtu);
109    else return 0;
110}
111
112//_____________________________________________________________________________
113Int_t EDetStatus::GetMaxBkg( Int_t gtu ) const {
114    //
115    // Get the maximum number of hits registered in a pixel
116    // in a given GTU
117    //
118   
119    if ( gtu >=0 && gtu < fMaxBkg.GetSize() ) return fMaxBkg.At(gtu);
120    else return 0;
121}
Note: See TracBrowser for help on using the repository browser.