Line data Source code
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 :
9 : /// \ingroup calib
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_TQObject
23 : # include <TQObject.h>
24 : #endif
25 :
26 : class AliMUONSparseHisto;
27 : class AliMUONVStore;
28 : class TCollection;
29 : class TArrayI;
30 :
31 : class AliMUONVTrackerData : public TNamed, public TQObject
32 : {
33 : public:
34 :
35 : AliMUONVTrackerData(const char* name="",const char* title="",
36 : Bool_t issingleevent=kFALSE);
37 : virtual ~AliMUONVTrackerData();
38 :
39 : /// Add values for one event from one full store
40 : virtual Bool_t Add(const AliMUONVStore& store, TArrayI* arrayOfNofEventsPerDDL=0x0) = 0;
41 :
42 : /// Replace values
43 : virtual Bool_t Replace(const AliMUONVStore& store) = 0;
44 :
45 : /// Get the value for a given buspatch and given dimension
46 : virtual Double_t BusPatch(Int_t busPatchId, Int_t dim=0) const = 0;
47 :
48 : /// Get the value for a given chamber and given dimension
49 : virtual Double_t Chamber(Int_t chamberId, Int_t dim=0) const = 0;
50 :
51 : /// Get the value for a given channel and given dimension
52 : virtual Double_t Channel(Int_t detElemId, Int_t manuId, Int_t manuChannel,
53 : Int_t dim=0) const = 0;
54 :
55 : /// Reset the data
56 : virtual void Clear(Option_t* opt="") = 0;
57 :
58 : /// Get the number of times a given channel was hit
59 : virtual Double_t Count(Int_t detElemId, Int_t manuId, Int_t manuChannel) const = 0;
60 :
61 : /// Get the value for a given DE and given dimension
62 : virtual Double_t DetectionElement(Int_t detElemId, Int_t dim=0) const = 0;
63 :
64 : /// Get the name of a given (internal) dimension
65 : virtual TString DimensionName(Int_t dim) const = 0;
66 :
67 : /// Get the name of a given (external) dimension
68 : virtual TString ExternalDimensionName(Int_t dim) const = 0;
69 :
70 : /// Whether we have data for a given buspath
71 : virtual Bool_t HasBusPatch(Int_t busPatchId) const = 0;
72 :
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 :
76 : /// Whether we have data for a given chamber
77 : virtual Bool_t HasChamber(Int_t chamberId) const = 0;
78 :
79 : /// Whether we have data for a given detection element
80 : virtual Bool_t HasDetectionElement(Int_t detElemId) const = 0;
81 :
82 : /// Whether we have data for a given manu
83 : virtual Bool_t HasManu(Int_t detElemId, Int_t manuId) const = 0;
84 :
85 : /// Whether we have data for a given PCB
86 : virtual Bool_t HasPCB(Int_t detElemId, Int_t pcbIndex) const = 0;
87 :
88 : /// Whether we deal with only one event at a time
89 : virtual Bool_t IsSingleEvent() const = 0;
90 :
91 : /// Get the value for a given manu and given dimension
92 : virtual Double_t Manu(Int_t detElemId, Int_t manuId, Int_t dim=0) const = 0;
93 :
94 : /// The number of dimensions we are handling
95 : virtual Int_t NumberOfDimensions() const = 0;
96 :
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 :
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;
107 :
108 : /// Signal to indicate that the number of events changed
109 : virtual void NumberOfEventsChanged(); // *SIGNAL*
110 :
111 : /// Get our name
112 0 : const char* Name() const { return GetName(); }
113 :
114 : /// Get the value for a given PCDB and given dimension
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 :
123 : /// Set the name of a given dimension
124 : virtual void SetDimensionName(Int_t index, const char* value) = 0;
125 :
126 : /// Whether or not we can make histograms.
127 0 : virtual Bool_t CanHistogram() const { return kFALSE; }
128 :
129 : /// Select a dimension to be histogrammed (if CanHistogram==kTRUE) only
130 : virtual void MakeHistogramForDimension(Int_t /* index */, Bool_t /* value */,
131 0 : Double_t /*xmin*/=0.0, Double_t /*xmax*/=4096.0) { }
132 :
133 : /// Get histogram range
134 0 : 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 0 : 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;
142 :
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 :
147 : /// To allow merging of different objects
148 : virtual Long64_t Merge(TCollection* list) = 0;
149 :
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;
155 :
156 : /// Disable recording of information at the manu level (and below)
157 : virtual void DisableManuLevel() = 0;
158 :
159 : /// Whether we store values at the channel level
160 : virtual Bool_t IsManuLevelEnabled() const = 0;
161 :
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 :
168 : private:
169 : /// not implemented
170 : AliMUONVTrackerData(const AliMUONVTrackerData& rhs);
171 : /// not implemented
172 : AliMUONVTrackerData& operator=(const AliMUONVTrackerData& rhs);
173 :
174 18 : ClassDef(AliMUONVTrackerData,2) // Base class of MUON data that can be represented graphically
175 : };
176 :
177 : #endif
|