Separating run-dependent mapping data from data, which are not
[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;
20
21class AliMUONTriggerDisplay: public TObject {
22
23public:
24 AliMUONTriggerDisplay();
25 virtual ~AliMUONTriggerDisplay();
98dff241 26
27 /// Display element inidices (strip,board,slat)
aef183f7 28 enum EDisplayType {
29 kDisplayStrips, ///< Draw strips
30 kDisplayBoards, ///< Draw boards
31 kDisplaySlats ///< Draw slats
32 };
33
98dff241 34 /// Display options inidices
aef183f7 35 enum EDisplayOption {
36 kDefaultDisplay, ///< Default display
37 kNumbered, ///< Histogram filled with board numbers
38 kShowZeroes ///< Displays strip/board/slat content even if it is 0
39 };
40
41 TH2* GetEmptyDisplayHisto(TString displayHistoName, EDisplayType displayType,
42 Int_t cathode, Int_t chamber=11,
43 TString displayHistoTitle="");
44
45 TH2* GetBoardNumberHisto(TString displayHistoName,
46 Int_t chamber=11,TString displayHistoTitle="");
47
48 TH2* GetDisplayHistogram(TH1* inputHisto, TString displayHistoName,
49 EDisplayType displayType, Int_t cathode,
50 Int_t chamber=11, TString displayHistoTitle="",
51 EDisplayOption displayOpt=kDefaultDisplay);
52
53 Bool_t FillDisplayHistogram(TH1* inputHisto, TH2* displayHisto,
54 EDisplayType displayType, Int_t cathode,
55 Int_t chamber=11,EDisplayOption displayOpt=kDefaultDisplay);
56
57private:
58 Bool_t AddSortedPoint(Float_t currVal, TArrayD& position, const Float_t kResetValue);
59 /// Return index
60 Int_t GetIndex(Int_t chamber, Int_t cathode) { return 2*chamber + cathode;}
61
62 Bool_t InitOrDisplayTriggerInfo(TH1* inoutHisto, TH2* displayHisto,
63 EDisplayType displayType,
64 Int_t cathode, Int_t chamber,
65 TString displayHistoName, TString displayHistoTitle,
66 EDisplayOption displayOpt=kDefaultDisplay);
67
68 void FillBins(TH1* inputHisto, TH2* displayHisto,
69 Int_t iElement1, Int_t iElement2,
70 Float_t x1, Float_t x2, Float_t y1, Float_t y2,
71 const Float_t kShiftX, const Float_t kShiftY,
72 EDisplayOption displayOpt);
73
74 ClassDef(AliMUONTriggerDisplay,0) // Class for converting trigger histograms
75
76};
77#endif