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;
30 class AliMUONVTrackerData : public TNamed, public TQObject
34 AliMUONVTrackerData(const char* name="",const char* title="",
35 Bool_t issingleevent=kFALSE);
36 virtual ~AliMUONVTrackerData();
38 /// Add values for one event from one full store
39 virtual Bool_t Add(const AliMUONVStore& store) = 0;
41 /// Get the value for a given buspatch and given dimension
42 virtual Double_t BusPatch(Int_t busPatchId, Int_t dim=0) const = 0;
44 /// Get the value for a given chamber and given dimension
45 virtual Double_t Chamber(Int_t chamberId, Int_t dim=0) const = 0;
47 /// Get the value for a given channel and given dimension
48 virtual Double_t Channel(Int_t detElemId, Int_t manuId, Int_t manuChannel,
49 Int_t dim=0) const = 0;
52 virtual void Clear(Option_t* opt="") = 0;
54 /// Get the number of times a given channel was hit
55 virtual Double_t Count(Int_t detElemId, Int_t manuId, Int_t manuChannel) const = 0;
57 /// Get the value for a given DE and given dimension
58 virtual Double_t DetectionElement(Int_t detElemId, Int_t dim=0) const = 0;
60 /// Get the name of a given (internal) dimension
61 virtual TString DimensionName(Int_t dim) const = 0;
63 /// Get the name of a given (external) dimension
64 virtual TString ExternalDimensionName(Int_t dim) const = 0;
66 /// Whether we have data for a given buspath
67 virtual Bool_t HasBusPatch(Int_t busPatchId) const = 0;
69 /// Whether we have a given channel or not
70 virtual Bool_t HasChannel(Int_t detElemId, Int_t manuId, Int_t manuChannel) const;
72 /// Whether we have data for a given chamber
73 virtual Bool_t HasChamber(Int_t chamberId) const = 0;
75 /// Whether we have data for a given detection element
76 virtual Bool_t HasDetectionElement(Int_t detElemId) const = 0;
78 /// Whether we have data for a given manu
79 virtual Bool_t HasManu(Int_t detElemId, Int_t manuId) const = 0;
81 /// Whether we have data for a given PCB
82 virtual Bool_t HasPCB(Int_t detElemId, Int_t pcbIndex) const = 0;
84 /// Whether we deal with only one event at a time
85 virtual Bool_t IsSingleEvent() const = 0;
87 /// Get the value for a given manu and given dimension
88 virtual Double_t Manu(Int_t detElemId, Int_t manuId, Int_t dim=0) const = 0;
90 /// The number of dimensions we are handling
91 virtual Int_t NumberOfDimensions() const = 0;
93 /// Convert from internal to external dimension
94 virtual Int_t InternalToExternal(Int_t dim) const = 0;
96 /// The number of dimensions we are inputting
97 virtual Int_t ExternalDimension() const = 0;
99 /// The number of events we've seen so far
100 virtual Int_t NumberOfEvents() const = 0;
102 /// Signal to indicate that the number of events changed
103 virtual void NumberOfEventsChanged(); // *SIGNAL*
106 const char* Name() const { return GetName(); }
108 /// Get the value for a given PCDB and given dimension
109 virtual Double_t PCB(Int_t detElemId, Int_t pcbIndex, Int_t dim=0) const = 0;
111 /// Print all objects whose name matches wildcard
112 virtual void Print(Option_t* wildcard="") const;
114 /// Print, with option, all objects whose name matches wildcard
115 virtual void Print(Option_t* wildcard, Option_t* opt) const = 0;
117 /// Set the name of a given dimension
118 virtual void SetDimensionName(Int_t index, const char* value) = 0;
120 /// Whether or not we can make histograms.
121 virtual Bool_t CanHistogram() const { return kFALSE; }
123 /// Select a dimension to be histogrammed (if CanHistogram==kTRUE) only
124 virtual void MakeHistogramForDimension(Int_t /* index */, Bool_t /* value */,
125 Double_t /*xmin*/=0.0, Double_t /*xmax*/=4096.0) { }
127 /// Get histogram range
128 virtual void HistogramRange(Double_t& xmin, Double_t& xmax) const { xmin=xmax=0.0; }
130 /// Whether we have histograms for a given dimension, or not
131 virtual Bool_t IsHistogrammed(Int_t /*dim*/) const { return kFALSE; }
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;
137 /// To allow merging of different objects
138 virtual Long64_t Merge(TCollection* list) = 0;
142 AliMUONVTrackerData(const AliMUONVTrackerData& rhs);
144 AliMUONVTrackerData& operator=(const AliMUONVTrackerData& rhs);
146 ClassDef(AliMUONVTrackerData,2) // Base class of MUON data that can be represented graphically