1 #ifndef ALIFMDCALIBDRAWER_H
2 #define ALIFMDCALIBDRAWER_H
8 class AliFMDCalibDrawer : public TObject
24 AliFMDCalibDrawer() {}
26 * Initialize the drawer
28 * @param runNo Run number
29 * @param ocdb Source of parameters (if 0, do not set)
31 void Init(Int_t runNo, const char* ocdb=0);
33 * Draw pedestals for the selected region.
35 ] * @param d Detector number (if 0 or negative, draw all)
36 * @param r Ring id (if null, draw all rings)
37 * @param s Sector number (if negative, draw all sectors)
38 * @param t Strip number (if negative, draw all strips)
40 void DrawPedestals(Short_t d=-1, Char_t r='\0',
41 Short_t s=-1, Short_t t=-1) const
43 DrawOne(kPedestal, d, r, s, t);
46 * Draw noise for the selected region.
48 * @param d Detector number (if 0 or negative, draw all)
49 * @param r Ring id (if null, draw all rings)
50 * @param s Sector number (if negative, draw all sectors)
51 * @param t Strip number (if negative, draw all strips)
53 void DrawNoise(Short_t d=-1, Char_t r='\0',
54 Short_t s=-1, Short_t t=-1) const
56 DrawOne(kNoise, d, r, s, t);
59 * Draw gains for the selected region.
61 * @param d Detector number (if 0 or negative, draw all)
62 * @param r Ring id (if null, draw all rings)
63 * @param s Sector number (if negative, draw all sectors)
64 * @param t Strip number (if negative, draw all strips)
66 void DrawGains(Short_t d=-1, Char_t r='\0',
67 Short_t s=-1, Short_t t=-1) const
69 DrawOne(kGain, d, r, s, t);
72 * Draw dead for the selected region.
74 * @param d Detector number (if 0 or negative, draw all)
75 * @param r Ring id (if null, draw all rings)
76 * @param s Sector number (if negative, draw all sectors)
77 * @param t Strip number (if negative, draw all strips)
79 void DrawDead(Short_t d=-1, Char_t r='\0', Short_t s=-1, Short_t t=-1) const
81 DrawOne(kDead, d, r, s, t);
84 void DrawRates(Short_t d=-1, Char_t r='\0', Short_t s=-1, Short_t t=-1) const
86 DrawOne(kRate, d, r, s, t);
88 void DrawRanges(Short_t d=-1, Char_t r='\0', Short_t s=-1, Short_t t=-1) const
90 DrawOne(kRange, d, r, s, t);
92 void DrawThresholds(Short_t d=-1, Char_t r='\0', Short_t s=-1,
95 DrawOne(kZeroSuppression, d, r, s, t);
100 * @param what What to draw
101 * @param d Detector number (if 0 or negative, draw all)
102 * @param r Ring id (if null, draw all rings)
103 * @param s Sector number (if negative, draw all sectors)
104 * @param t Strip number (if negative, draw all strips)
106 void DrawOne(EWhat what, Short_t d=-1, Char_t r='\0',
107 Short_t s=-1, Short_t t=-1) const;
109 void SetAttributes(TH1* ret, EWhat what, UShort_t d, Char_t r) const;
110 Double_t GetHistMax(EWhat what) const;
111 Double_t GetHistMin(EWhat what) const;
113 * Get the base histogram name
115 * @param what What is drawn
117 * @return Histogram base name
119 const char* GetHistName(EWhat what) const;
121 * Get the base histogram title
123 * @param what What is drawn
125 * @return Histogram base title
127 const char* GetHistTitle(EWhat what) const;
131 * @param what What to get
132 * @param d Detector number
134 * @param s Sector number
135 * @param t Strip number
136 * @param val On return, the value
137 * @param err On return, the error on value (or negative if no error)
139 void GetNumber(EWhat what, UShort_t d, Char_t r, UShort_t s, UShort_t t,
140 Double_t& val, Double_t& err) const;
142 * Make a 1D histogram
144 * @param what What to make the histogram for
149 * @return Newly allocated histogram
151 TH1D* Make1D(EWhat what, UShort_t d, Char_t r, UShort_t s) const;
153 * Make a 2D histogram
155 * @param what What to make the histogram for
159 * @return Newly allocated histogram
161 TH2D* Make2D(EWhat what, UShort_t d, Char_t r) const;
163 * Fill a per-ring 2D histogram
165 * @param what What to fill in
169 * @return Filled histogram
171 TH1* FillRing(EWhat what, UShort_t d, Char_t r) const;
173 * Fill a per-sector 1D histogram
175 * @param what What to fill in
180 * @return Filled histogram
182 TH1* FillSector(EWhat what, UShort_t d, Char_t r, UShort_t s) const;
184 Int_t GetRingColor(UShort_t d, Char_t r) const;
185 ClassDef(AliFMDCalibDrawer,0); // Draw calibrations