]>
Commit | Line | Data |
---|---|---|
0145e89a | 1 | #ifndef ALIMUONVTRACKERDATA_H |
2 | #define ALIMUONVTRACKERDATA_H | |
3 | ||
4 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
5 | * See cxx source for full Copyright notice */ | |
6 | ||
7 | // $Id$ | |
8 | ||
e41c38cf | 9 | /// \ingroup calib |
0145e89a | 10 | /// \class AliMUONVTrackerData |
11 | /// \brief Base class for MUON data that can be presented at different levels | |
12 | /// in the hierarchy of the MUON system. | |
13 | /// | |
14 | // Author Laurent Aphecetche, Subatech | |
15 | ||
16 | #ifndef ROOT_TNamed | |
17 | # include "TNamed.h" | |
18 | #endif | |
19 | #ifndef ROOT_TString | |
20 | # include "TString.h" | |
21 | #endif | |
4a3224ff | 22 | #ifndef ROOT_TQObject |
23 | # include <TQObject.h> | |
0145e89a | 24 | #endif |
25 | ||
10eb3d17 | 26 | class AliMUONSparseHisto; |
0145e89a | 27 | class AliMUONVStore; |
7b6684fe | 28 | class TCollection; |
e83120bd | 29 | class TArrayI; |
0145e89a | 30 | |
4a3224ff | 31 | class AliMUONVTrackerData : public TNamed, public TQObject |
0145e89a | 32 | { |
0145e89a | 33 | public: |
34 | ||
49419555 | 35 | AliMUONVTrackerData(const char* name="",const char* title="", |
36 | Bool_t issingleevent=kFALSE); | |
0145e89a | 37 | virtual ~AliMUONVTrackerData(); |
38 | ||
49419555 | 39 | /// Add values for one event from one full store |
e83120bd | 40 | virtual Bool_t Add(const AliMUONVStore& store, TArrayI* arrayOfNofEventsPerDDL=0x0) = 0; |
0145e89a | 41 | |
1ffbeb9d | 42 | /// Replace values |
43 | virtual Bool_t Replace(const AliMUONVStore& store) = 0; | |
44 | ||
9016a84e | 45 | /// Get the value for a given buspatch and given dimension |
0145e89a | 46 | virtual Double_t BusPatch(Int_t busPatchId, Int_t dim=0) const = 0; |
47 | ||
9016a84e | 48 | /// Get the value for a given chamber and given dimension |
0145e89a | 49 | virtual Double_t Chamber(Int_t chamberId, Int_t dim=0) const = 0; |
50 | ||
9016a84e | 51 | /// Get the value for a given channel and given dimension |
0145e89a | 52 | virtual Double_t Channel(Int_t detElemId, Int_t manuId, Int_t manuChannel, |
53 | Int_t dim=0) const = 0; | |
54 | ||
9016a84e | 55 | /// Reset the data |
0145e89a | 56 | virtual void Clear(Option_t* opt="") = 0; |
57 | ||
9016a84e | 58 | /// Get the number of times a given channel was hit |
0145e89a | 59 | virtual Double_t Count(Int_t detElemId, Int_t manuId, Int_t manuChannel) const = 0; |
60 | ||
9016a84e | 61 | /// Get the value for a given DE and given dimension |
0145e89a | 62 | virtual Double_t DetectionElement(Int_t detElemId, Int_t dim=0) const = 0; |
63 | ||
10eb3d17 | 64 | /// Get the name of a given (internal) dimension |
0145e89a | 65 | virtual TString DimensionName(Int_t dim) const = 0; |
66 | ||
10eb3d17 | 67 | /// Get the name of a given (external) dimension |
68 | virtual TString ExternalDimensionName(Int_t dim) const = 0; | |
69 | ||
9016a84e | 70 | /// Whether we have data for a given buspath |
0145e89a | 71 | virtual Bool_t HasBusPatch(Int_t busPatchId) const = 0; |
72 | ||
8741815f | 73 | /// Whether we have a given channel or not |
74 | virtual Bool_t HasChannel(Int_t detElemId, Int_t manuId, Int_t manuChannel) const; | |
75 | ||
9016a84e | 76 | /// Whether we have data for a given chamber |
0145e89a | 77 | virtual Bool_t HasChamber(Int_t chamberId) const = 0; |
78 | ||
9016a84e | 79 | /// Whether we have data for a given detection element |
0145e89a | 80 | virtual Bool_t HasDetectionElement(Int_t detElemId) const = 0; |
81 | ||
9016a84e | 82 | /// Whether we have data for a given manu |
0145e89a | 83 | virtual Bool_t HasManu(Int_t detElemId, Int_t manuId) const = 0; |
84 | ||
9016a84e | 85 | /// Whether we have data for a given PCB |
0145e89a | 86 | virtual Bool_t HasPCB(Int_t detElemId, Int_t pcbIndex) const = 0; |
87 | ||
49419555 | 88 | /// Whether we deal with only one event at a time |
89 | virtual Bool_t IsSingleEvent() const = 0; | |
0145e89a | 90 | |
9016a84e | 91 | /// Get the value for a given manu and given dimension |
0145e89a | 92 | virtual Double_t Manu(Int_t detElemId, Int_t manuId, Int_t dim=0) const = 0; |
93 | ||
9016a84e | 94 | /// The number of dimensions we are handling |
0145e89a | 95 | virtual Int_t NumberOfDimensions() const = 0; |
96 | ||
10eb3d17 | 97 | /// Convert from internal to external dimension |
98 | virtual Int_t InternalToExternal(Int_t dim) const = 0; | |
99 | ||
100 | /// The number of dimensions we are inputting | |
101 | virtual Int_t ExternalDimension() const = 0; | |
102 | ||
e83120bd | 103 | /** The number of events we've seen so far in a given DDL (or any DDL if param<0) |
104 | ddlNumber is 0..19 | |
105 | */ | |
106 | virtual Int_t NumberOfEvents(Int_t ddlNumber) const = 0; | |
0145e89a | 107 | |
9016a84e | 108 | /// Signal to indicate that the number of events changed |
0145e89a | 109 | virtual void NumberOfEventsChanged(); // *SIGNAL* |
110 | ||
9016a84e | 111 | /// Get our name |
0145e89a | 112 | const char* Name() const { return GetName(); } |
113 | ||
9016a84e | 114 | /// Get the value for a given PCDB and given dimension |
0145e89a | 115 | virtual Double_t PCB(Int_t detElemId, Int_t pcbIndex, Int_t dim=0) const = 0; |
116 | ||
117 | /// Print all objects whose name matches wildcard | |
118 | virtual void Print(Option_t* wildcard="") const; | |
119 | ||
120 | /// Print, with option, all objects whose name matches wildcard | |
121 | virtual void Print(Option_t* wildcard, Option_t* opt) const = 0; | |
122 | ||
9016a84e | 123 | /// Set the name of a given dimension |
0145e89a | 124 | virtual void SetDimensionName(Int_t index, const char* value) = 0; |
8741815f | 125 | |
126 | /// Whether or not we can make histograms. | |
127 | virtual Bool_t CanHistogram() const { return kFALSE; } | |
128 | ||
129 | /// Select a dimension to be histogrammed (if CanHistogram==kTRUE) only | |
10eb3d17 | 130 | virtual void MakeHistogramForDimension(Int_t /* index */, Bool_t /* value */, |
131 | Double_t /*xmin*/=0.0, Double_t /*xmax*/=4096.0) { } | |
132 | ||
133 | /// Get histogram range | |
134 | virtual void HistogramRange(Double_t& xmin, Double_t& xmax) const { xmin=xmax=0.0; } | |
135 | ||
136 | /// Whether we have histograms for a given dimension, or not | |
137 | virtual Bool_t IsHistogrammed(Int_t /*dim*/) const { return kFALSE; } | |
138 | ||
139 | /// Get sparse histogram for a given channel | |
140 | virtual AliMUONSparseHisto* GetChannelSparseHisto(Int_t detElemId, Int_t manuId, | |
141 | Int_t manuChannel, Int_t dim=0) const = 0; | |
8741815f | 142 | |
0edb62c4 | 143 | /// Get sparse histogram for a given manu (valid only if IsChannelLevelEnabled()==kFALSE and IsManuLevelEnabled()==kTRUE) |
144 | virtual AliMUONSparseHisto* GetManuSparseHisto(Int_t detElemId, Int_t manuId, | |
145 | Int_t dim=0) const = 0; | |
146 | ||
7b6684fe | 147 | /// To allow merging of different objects |
148 | virtual Long64_t Merge(TCollection* list) = 0; | |
149 | ||
e13620cd | 150 | /// Disable recording of information at the channel level |
151 | virtual void DisableChannelLevel() = 0; | |
152 | ||
153 | /// Whether we store values at the channel level | |
154 | virtual Bool_t IsChannelLevelEnabled() const = 0; | |
0edb62c4 | 155 | |
156 | /// Disable recording of information at the manu level (and below) | |
157 | virtual void DisableManuLevel() = 0; | |
e13620cd | 158 | |
0edb62c4 | 159 | /// Whether we store values at the channel level |
160 | virtual Bool_t IsManuLevelEnabled() const = 0; | |
161 | ||
06bc44ee | 162 | /// Whether we store values at the bus patch level or not |
163 | virtual Bool_t IsBusPatchLevelEnabled() const = 0; | |
164 | ||
165 | /// Whether we store values at the PCB level or not | |
166 | virtual Bool_t IsPCBLevelEnabled() const = 0; | |
167 | ||
0145e89a | 168 | private: |
169 | /// not implemented | |
170 | AliMUONVTrackerData(const AliMUONVTrackerData& rhs); | |
171 | /// not implemented | |
172 | AliMUONVTrackerData& operator=(const AliMUONVTrackerData& rhs); | |
173 | ||
4a3224ff | 174 | ClassDef(AliMUONVTrackerData,2) // Base class of MUON data that can be represented graphically |
0145e89a | 175 | }; |
176 | ||
177 | #endif |