]>
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 | ||
2f2b84d5 | 9 | /// \ingroup graphics |
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 | |
22 | #ifndef ROOT_RQ_OBJECT | |
23 | # include <RQ_OBJECT.h> | |
24 | #endif | |
25 | ||
10eb3d17 | 26 | class AliMUONSparseHisto; |
0145e89a | 27 | class AliMUONVStore; |
28 | ||
29 | class AliMUONVTrackerData : public TNamed | |
30 | { | |
31 | RQ_OBJECT("AliMUONVTrackerData") | |
32 | ||
33 | public: | |
34 | ||
35 | AliMUONVTrackerData(const char* name="",const char* title="", Bool_t runnable=kTRUE); | |
36 | virtual ~AliMUONVTrackerData(); | |
37 | ||
38 | /// Add values for one full store | |
39 | virtual Bool_t Add(const AliMUONVStore& store) = 0; | |
40 | ||
9016a84e | 41 | /// Get the value for a given buspatch and given dimension |
0145e89a | 42 | virtual Double_t BusPatch(Int_t busPatchId, Int_t dim=0) const = 0; |
43 | ||
9016a84e | 44 | /// Get the value for a given chamber and given dimension |
0145e89a | 45 | virtual Double_t Chamber(Int_t chamberId, Int_t dim=0) const = 0; |
46 | ||
9016a84e | 47 | /// Get the value for a given channel and given dimension |
0145e89a | 48 | virtual Double_t Channel(Int_t detElemId, Int_t manuId, Int_t manuChannel, |
49 | Int_t dim=0) const = 0; | |
50 | ||
9016a84e | 51 | /// Reset the data |
0145e89a | 52 | virtual void Clear(Option_t* opt="") = 0; |
53 | ||
9016a84e | 54 | /// Get the number of times a given channel was hit |
0145e89a | 55 | virtual Double_t Count(Int_t detElemId, Int_t manuId, Int_t manuChannel) const = 0; |
56 | ||
9016a84e | 57 | /// Get the value for a given DE and given dimension |
0145e89a | 58 | virtual Double_t DetectionElement(Int_t detElemId, Int_t dim=0) const = 0; |
59 | ||
10eb3d17 | 60 | /// Get the name of a given (internal) dimension |
0145e89a | 61 | virtual TString DimensionName(Int_t dim) const = 0; |
62 | ||
10eb3d17 | 63 | /// Get the name of a given (external) dimension |
64 | virtual TString ExternalDimensionName(Int_t dim) const = 0; | |
65 | ||
9016a84e | 66 | /// Whether we have data for a given buspath |
0145e89a | 67 | virtual Bool_t HasBusPatch(Int_t busPatchId) const = 0; |
68 | ||
8741815f | 69 | /// Whether we have a given channel or not |
70 | virtual Bool_t HasChannel(Int_t detElemId, Int_t manuId, Int_t manuChannel) const; | |
71 | ||
9016a84e | 72 | /// Whether we have data for a given chamber |
0145e89a | 73 | virtual Bool_t HasChamber(Int_t chamberId) const = 0; |
74 | ||
9016a84e | 75 | /// Whether we have data for a given detection element |
0145e89a | 76 | virtual Bool_t HasDetectionElement(Int_t detElemId) const = 0; |
77 | ||
9016a84e | 78 | /// Whether we have data for a given manu |
0145e89a | 79 | virtual Bool_t HasManu(Int_t detElemId, Int_t manuId) const = 0; |
80 | ||
9016a84e | 81 | /// Whether we have data for a given PCB |
0145e89a | 82 | virtual Bool_t HasPCB(Int_t detElemId, Int_t pcbIndex) const = 0; |
83 | ||
9016a84e | 84 | /// Whether we are runnable (e.g. can handle several events) |
0145e89a | 85 | virtual Bool_t IsRunnable() const = 0; |
86 | ||
9016a84e | 87 | /// Get the value for a given manu and given dimension |
0145e89a | 88 | virtual Double_t Manu(Int_t detElemId, Int_t manuId, Int_t dim=0) const = 0; |
89 | ||
9016a84e | 90 | /// The number of dimensions we are handling |
0145e89a | 91 | virtual Int_t NumberOfDimensions() const = 0; |
92 | ||
10eb3d17 | 93 | /// Convert from internal to external dimension |
94 | virtual Int_t InternalToExternal(Int_t dim) const = 0; | |
95 | ||
96 | /// The number of dimensions we are inputting | |
97 | virtual Int_t ExternalDimension() const = 0; | |
98 | ||
9016a84e | 99 | /// The number of events we've seen so far |
0145e89a | 100 | virtual Int_t NumberOfEvents() const = 0; |
101 | ||
9016a84e | 102 | /// Signal to indicate that the number of events changed |
0145e89a | 103 | virtual void NumberOfEventsChanged(); // *SIGNAL* |
104 | ||
9016a84e | 105 | /// Get our name |
0145e89a | 106 | const char* Name() const { return GetName(); } |
107 | ||
9016a84e | 108 | /// Get the value for a given PCDB and given dimension |
0145e89a | 109 | virtual Double_t PCB(Int_t detElemId, Int_t pcbIndex, Int_t dim=0) const = 0; |
110 | ||
111 | /// Print all objects whose name matches wildcard | |
112 | virtual void Print(Option_t* wildcard="") const; | |
113 | ||
114 | /// Print, with option, all objects whose name matches wildcard | |
115 | virtual void Print(Option_t* wildcard, Option_t* opt) const = 0; | |
116 | ||
9016a84e | 117 | /// Set the name of a given dimension |
0145e89a | 118 | virtual void SetDimensionName(Int_t index, const char* value) = 0; |
8741815f | 119 | |
120 | /// Whether or not we can make histograms. | |
121 | virtual Bool_t CanHistogram() const { return kFALSE; } | |
122 | ||
123 | /// Select a dimension to be histogrammed (if CanHistogram==kTRUE) only | |
10eb3d17 | 124 | virtual void MakeHistogramForDimension(Int_t /* index */, Bool_t /* value */, |
125 | Double_t /*xmin*/=0.0, Double_t /*xmax*/=4096.0) { } | |
126 | ||
127 | /// Get histogram range | |
128 | virtual void HistogramRange(Double_t& xmin, Double_t& xmax) const { xmin=xmax=0.0; } | |
129 | ||
130 | /// Whether we have histograms for a given dimension, or not | |
131 | virtual Bool_t IsHistogrammed(Int_t /*dim*/) const { return kFALSE; } | |
132 | ||
133 | /// Get sparse histogram for a given channel | |
134 | virtual AliMUONSparseHisto* GetChannelSparseHisto(Int_t detElemId, Int_t manuId, | |
135 | Int_t manuChannel, Int_t dim=0) const = 0; | |
8741815f | 136 | |
0145e89a | 137 | private: |
138 | /// not implemented | |
139 | AliMUONVTrackerData(const AliMUONVTrackerData& rhs); | |
140 | /// not implemented | |
141 | AliMUONVTrackerData& operator=(const AliMUONVTrackerData& rhs); | |
142 | ||
143 | ClassDef(AliMUONVTrackerData,1) // Base class of MUON data that can be represented graphically | |
144 | }; | |
145 | ||
146 | #endif |