First big commit of the mchview program and its accompanying library,
[u/mrichter/AliRoot.git] / MUON / AliMUONTrackerData.h
CommitLineData
0145e89a 1#ifndef ALIMUONTRACKERDATA_H
2#define ALIMUONTRACKERDATA_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 core
10/// \class AliMUONTrackerData
11/// \brief Implementation of AliMUONVTrackerData
12///
13// Author Laurent Aphecetche, Subatech
14
15#ifndef ALIMUONVTRACKERDATA_H
16# include "AliMUONVTrackerData.h"
17#endif
18
19class AliMUONVCalibParam;
20class AliMUONVStore;
21
22class AliMUONTrackerData : public AliMUONVTrackerData
23{
24public:
25 AliMUONTrackerData(const char* name="", const char* title="",
26 Int_t dimension=0,
27 Bool_t runnable=kTRUE);
28 virtual ~AliMUONTrackerData();
29
30 virtual Bool_t Add(const AliMUONVStore& channelValues);
31
32 virtual Double_t BusPatch(Int_t busPatchId, Int_t dim=0) const;
33
34 virtual Double_t Chamber(Int_t chamberId, Int_t dim=0) const;
35
36 virtual Double_t Channel(Int_t detElemId, Int_t manuId, Int_t manuChannel,
37 Int_t dim=0) const;
38
39 virtual void Clear(Option_t* opt="");
40
41 virtual Double_t Count(Int_t detElemId, Int_t manuId, Int_t manuChannel) const;
42
43 virtual Double_t DetectionElement(Int_t detElemId, Int_t dim=0) const;
44
45 virtual TString DimensionName(Int_t dim) const;
46
47 virtual Bool_t HasChamber(Int_t chamberId) const;
48
49 virtual Bool_t HasBusPatch(Int_t busPatchId) const;
50
51 virtual Bool_t HasDetectionElement(Int_t detElemId) const;
52
53 virtual Bool_t HasManu(Int_t detElemId, Int_t manuId) const;
54
55 virtual Bool_t HasPCB(Int_t detElemId, Int_t pcbIndex) const;
56
57 virtual Bool_t IsRunnable() const { return fIsRunnable; }
58
59 virtual Double_t Manu(Int_t detElemId, Int_t manuId, Int_t dim=0) const;
60
61 /// Returns the number of dimensions (i.e. the number of values) each element has
62 virtual Int_t NumberOfDimensions() const;
63
64 /// Returns the number of events we have seen so far
65 virtual Int_t NumberOfEvents() const { return fNevents; }
66
67 virtual Double_t PCB(Int_t detElemId, Int_t pcbIndex, Int_t dim=0) const;
68
69 using TObject::Print;
70
71 /// Print, with option, all objects whose name matches wildcard
72 virtual void Print(Option_t* wildcard, Option_t* opt) const;
73
74 virtual void SetDimensionName(Int_t index, const char* value);
75
76//protected: FIXME: uncomment when debug done
77
78 virtual AliMUONVCalibParam* BusPatchParam(Int_t busPatch) const;
79
80 virtual AliMUONVCalibParam* ChamberParam(Int_t chamberId) const;
81
82 virtual AliMUONVCalibParam* ChannelParam(Int_t detElemId, Int_t manuId) const;
83
84 virtual AliMUONVCalibParam* DetectionElementParam(Int_t detElemId) const;
85
86 virtual AliMUONVCalibParam* ManuParam(Int_t detElemId, Int_t manuId) const;
87
88 virtual AliMUONVCalibParam* PCBParam(Int_t detElemId, Int_t pcbIndex) const;
89
90 virtual Int_t IndexOfNumberDimension() const { return fDimension - 1; }
91
92 virtual Int_t IndexOfOccupancyDimension() const { return fDimension - 2; }
93
94private:
95 /// Not implemented
96 AliMUONTrackerData(const AliMUONTrackerData& rhs);
97 /// Not implemented
98 AliMUONTrackerData& operator=(const AliMUONTrackerData& rhs);
99
100 AliMUONVCalibParam* CreateDouble(const AliMUONVCalibParam& param) const;
101
102 /// Convert from external to internal index
103 Int_t External2Internal(Int_t index) const { return index*2; }
104
105 Bool_t InternalAdd(const AliMUONVStore& channelValues);
106
107 void SetInternalDimensionName(Int_t index, const char* value);
108
109 Double_t Value(const AliMUONVCalibParam& param, Int_t i, Int_t dim) const;
110
111private:
112
113 AliMUONVStore* fChannelValues; ///< the channel store
114 AliMUONVStore* fManuValues; ///< the manu store
115 AliMUONVStore* fBusPatchValues; ///< the bus patch store
116 AliMUONVStore* fDEValues; ///< the detection element store
117 AliMUONVStore* fChamberValues; ///< the chamber store
118 AliMUONVStore* fPCBValues; ///< the pcb store
119 Int_t fDimension; ///< the dimension of the data
120 Int_t fNevents; ///< the number of events treated
121 TObjArray* fDimensionNames; ///< the names of the dimensions
122 Int_t fExternalDimension; ///< number of interface values per item
123 Bool_t fIsRunnable; ///< whether we can deal with more than one event
124
125 static const Int_t fgkExtraDimension; ///< to hold extra information
126 static const Int_t fgkVirtualExtraDimension; ///< to give access to information not stored, but computed on the fly
127
128 ClassDef(AliMUONTrackerData,1) // Implementation of AliMUONVTrackerData
129};
130
131#endif