]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/AliMUONVTrackerData.h
Merging THbtp and HBTP in one library. Comiplation on Windows/Cygwin
[u/mrichter/AliRoot.git] / MUON / AliMUONVTrackerData.h
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 graphics
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
30 class AliMUONVTrackerData : public TNamed, public TQObject
31 {
32 public:
33   
34   AliMUONVTrackerData(const char* name="",const char* title="", 
35                       Bool_t issingleevent=kFALSE);
36   virtual ~AliMUONVTrackerData();
37   
38   /// Add values for one event from one full store
39   virtual Bool_t Add(const AliMUONVStore& store) = 0;
40
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;
43   
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;
46   
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;
50   
51   /// Reset the data
52   virtual void Clear(Option_t* opt="") = 0;
53   
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;
56
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;
59   
60   /// Get the name of a given (internal) dimension
61   virtual TString DimensionName(Int_t dim) const = 0;
62
63   /// Get the name of a given (external) dimension
64   virtual TString ExternalDimensionName(Int_t dim) const = 0;
65
66   /// Whether we have data for a given buspath
67   virtual Bool_t HasBusPatch(Int_t busPatchId) const = 0;
68
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   
72   /// Whether we have data for a given chamber
73   virtual Bool_t HasChamber(Int_t chamberId) const = 0;
74   
75   /// Whether we have data for a given detection element
76   virtual Bool_t HasDetectionElement(Int_t detElemId) const = 0;
77   
78   /// Whether we have data for a given manu
79   virtual Bool_t HasManu(Int_t detElemId, Int_t manuId) const = 0;
80
81   /// Whether we have data for a given PCB
82   virtual Bool_t HasPCB(Int_t detElemId, Int_t pcbIndex) const = 0;
83   
84   /// Whether we deal with only one event at a time
85   virtual Bool_t IsSingleEvent() const = 0;
86   
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;
89   
90   /// The number of dimensions we are handling
91   virtual Int_t NumberOfDimensions() const = 0;
92
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
99   /// The number of events we've seen so far
100   virtual Int_t NumberOfEvents() const = 0;
101
102   /// Signal to indicate that the number of events changed
103   virtual void NumberOfEventsChanged(); // *SIGNAL*
104   
105   /// Get our name
106   const char* Name() const { return GetName(); }
107   
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;
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
117   /// Set the name of a given dimension
118   virtual void SetDimensionName(Int_t index, const char* value) = 0;
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
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;
136
137   /// To allow merging of different objects
138   virtual Long64_t Merge(TCollection* list) = 0;
139
140 private:
141   /// not implemented
142   AliMUONVTrackerData(const AliMUONVTrackerData& rhs);
143   /// not implemented
144   AliMUONVTrackerData& operator=(const AliMUONVTrackerData& rhs);
145   
146   ClassDef(AliMUONVTrackerData,2) // Base class of MUON data that can be represented graphically
147 };
148
149 #endif