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