1 #ifndef ALIMUONVTRACKERDATA_H
2 #define ALIMUONVTRACKERDATA_H
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
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.
14 // Author Laurent Aphecetche, Subatech
23 # include <TQObject.h>
26 class AliMUONSparseHisto;
31 class AliMUONVTrackerData : public TNamed, public TQObject
35 AliMUONVTrackerData(const char* name="",const char* title="",
36 Bool_t issingleevent=kFALSE);
37 virtual ~AliMUONVTrackerData();
39 /// Add values for one event from one full store
40 virtual Bool_t Add(const AliMUONVStore& store, TArrayI* arrayOfNofEventsPerDDL=0x0) = 0;
43 virtual Bool_t Replace(const AliMUONVStore& store) = 0;
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;
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;
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;
56 virtual void Clear(Option_t* opt="") = 0;
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;
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;
64 /// Get the name of a given (internal) dimension
65 virtual TString DimensionName(Int_t dim) const = 0;
67 /// Get the name of a given (external) dimension
68 virtual TString ExternalDimensionName(Int_t dim) const = 0;
70 /// Whether we have data for a given buspath
71 virtual Bool_t HasBusPatch(Int_t busPatchId) const = 0;
73 /// Whether we have a given channel or not
74 virtual Bool_t HasChannel(Int_t detElemId, Int_t manuId, Int_t manuChannel) const;
76 /// Whether we have data for a given chamber
77 virtual Bool_t HasChamber(Int_t chamberId) const = 0;
79 /// Whether we have data for a given detection element
80 virtual Bool_t HasDetectionElement(Int_t detElemId) const = 0;
82 /// Whether we have data for a given manu
83 virtual Bool_t HasManu(Int_t detElemId, Int_t manuId) const = 0;
85 /// Whether we have data for a given PCB
86 virtual Bool_t HasPCB(Int_t detElemId, Int_t pcbIndex) const = 0;
88 /// Whether we deal with only one event at a time
89 virtual Bool_t IsSingleEvent() const = 0;
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;
94 /// The number of dimensions we are handling
95 virtual Int_t NumberOfDimensions() const = 0;
97 /// Convert from internal to external dimension
98 virtual Int_t InternalToExternal(Int_t dim) const = 0;
100 /// The number of dimensions we are inputting
101 virtual Int_t ExternalDimension() const = 0;
103 /** The number of events we've seen so far in a given DDL (or any DDL if param<0)
106 virtual Int_t NumberOfEvents(Int_t ddlNumber) const = 0;
108 /// Signal to indicate that the number of events changed
109 virtual void NumberOfEventsChanged(); // *SIGNAL*
112 const char* Name() const { return GetName(); }
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;
117 /// Print all objects whose name matches wildcard
118 virtual void Print(Option_t* wildcard="") const;
120 /// Print, with option, all objects whose name matches wildcard
121 virtual void Print(Option_t* wildcard, Option_t* opt) const = 0;
123 /// Set the name of a given dimension
124 virtual void SetDimensionName(Int_t index, const char* value) = 0;
126 /// Whether or not we can make histograms.
127 virtual Bool_t CanHistogram() const { return kFALSE; }
129 /// Select a dimension to be histogrammed (if CanHistogram==kTRUE) only
130 virtual void MakeHistogramForDimension(Int_t /* index */, Bool_t /* value */,
131 Double_t /*xmin*/=0.0, Double_t /*xmax*/=4096.0) { }
133 /// Get histogram range
134 virtual void HistogramRange(Double_t& xmin, Double_t& xmax) const { xmin=xmax=0.0; }
136 /// Whether we have histograms for a given dimension, or not
137 virtual Bool_t IsHistogrammed(Int_t /*dim*/) const { return kFALSE; }
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;
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;
147 /// To allow merging of different objects
148 virtual Long64_t Merge(TCollection* list) = 0;
150 /// Disable recording of information at the channel level
151 virtual void DisableChannelLevel() = 0;
153 /// Whether we store values at the channel level
154 virtual Bool_t IsChannelLevelEnabled() const = 0;
156 /// Disable recording of information at the manu level (and below)
157 virtual void DisableManuLevel() = 0;
159 /// Whether we store values at the channel level
160 virtual Bool_t IsManuLevelEnabled() const = 0;
162 /// Whether we store values at the bus patch level or not
163 virtual Bool_t IsBusPatchLevelEnabled() const = 0;
165 /// Whether we store values at the PCB level or not
166 virtual Bool_t IsPCBLevelEnabled() const = 0;
170 AliMUONVTrackerData(const AliMUONVTrackerData& rhs);
172 AliMUONVTrackerData& operator=(const AliMUONVTrackerData& rhs);
174 ClassDef(AliMUONVTrackerData,2) // Base class of MUON data that can be represented graphically