Adding code to patch St1 HV mapping
[u/mrichter/AliRoot.git] / MUON / AliMUONTriggerDisplay.h
CommitLineData
aef183f7 1#ifndef ALIMUONTRIGGERDISPLAY_H
2#define ALIMUONTRIGGERDISPLAY_H
3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
6// $Id$
7
d4002f80 8/// \ingroup calib
aef183f7 9/// \class AliMUONTriggerDisplay
10/// \brief Converts histograms as a function of strip/board/slat number in human readable histograms
11///
12// Author Diego Stocco
13
14// --- ROOT system ---
15
16#include "TH2.h"
17
18class TArrayD;
19class TString;
f3d288ab 20class TGraph;
aef183f7 21
22class AliMUONTriggerDisplay: public TObject {
23
24public:
25 AliMUONTriggerDisplay();
26 virtual ~AliMUONTriggerDisplay();
98dff241 27
28 /// Display element inidices (strip,board,slat)
aef183f7 29 enum EDisplayType {
30 kDisplayStrips, ///< Draw strips
31 kDisplayBoards, ///< Draw boards
32 kDisplaySlats ///< Draw slats
33 };
34
98dff241 35 /// Display options inidices
aef183f7 36 enum EDisplayOption {
37 kDefaultDisplay, ///< Default display
38 kNumbered, ///< Histogram filled with board numbers
719914e0 39 kShowZeroes, ///< Displays strip/board/slat content even if it is 0
40 kNormalizeToArea ///< Draw input histo divided by element area
aef183f7 41 };
42
43 TH2* GetEmptyDisplayHisto(TString displayHistoName, EDisplayType displayType,
44 Int_t cathode, Int_t chamber=11,
45 TString displayHistoTitle="");
46
47 TH2* GetBoardNumberHisto(TString displayHistoName,
48 Int_t chamber=11,TString displayHistoTitle="");
49
50 TH2* GetDisplayHistogram(TH1* inputHisto, TString displayHistoName,
51 EDisplayType displayType, Int_t cathode,
52 Int_t chamber=11, TString displayHistoTitle="",
53 EDisplayOption displayOpt=kDefaultDisplay);
f3d288ab 54
55 TH2* GetDisplayHistogram(TGraph* inputGraph, TString displayHistoName,
56 EDisplayType displayType, Int_t cathode,
57 Int_t chamber=11, TString displayHistoTitle="",
58 EDisplayOption displayOpt=kDefaultDisplay);
aef183f7 59
60 Bool_t FillDisplayHistogram(TH1* inputHisto, TH2* displayHisto,
61 EDisplayType displayType, Int_t cathode,
62 Int_t chamber=11,EDisplayOption displayOpt=kDefaultDisplay);
63
f3d288ab 64 Bool_t FillDisplayHistogram(TGraph* inputGraph, TH2* displayHisto,
65 EDisplayType displayType, Int_t cathode,
66 Int_t chamber=11,EDisplayOption displayOpt=kDefaultDisplay);
67
aef183f7 68private:
69 Bool_t AddSortedPoint(Float_t currVal, TArrayD& position, const Float_t kResetValue);
70 /// Return index
9ee1d6ff 71 Int_t GetIndex(Int_t chamber, Int_t cathode) const { return 2*chamber + cathode;}
aef183f7 72
f3d288ab 73 Bool_t InitOrDisplayTriggerInfo(TObject* inputHisto, TH2* displayHisto,
aef183f7 74 EDisplayType displayType,
75 Int_t cathode, Int_t chamber,
76 TString displayHistoName, TString displayHistoTitle,
77 EDisplayOption displayOpt=kDefaultDisplay);
78
f3d288ab 79 void FillBins(TObject* inputHisto, TH2* displayHisto,
aef183f7 80 Int_t iElement1, Int_t iElement2,
81 Float_t x1, Float_t x2, Float_t y1, Float_t y2,
82 const Float_t kShiftX, const Float_t kShiftY,
83 EDisplayOption displayOpt);
84
85 ClassDef(AliMUONTriggerDisplay,0) // Class for converting trigger histograms
86
87};
88#endif