Mapping files now reads from DAQ DB; output writes to FES
[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
8/// \ingroup rec
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();
26
27 enum EDisplayType {
28 kDisplayStrips, ///< Draw strips
29 kDisplayBoards, ///< Draw boards
30 kDisplaySlats ///< Draw slats
31 };
32
33 enum EDisplayOption {
34 kDefaultDisplay, ///< Default display
35 kNumbered, ///< Histogram filled with board numbers
36 kShowZeroes ///< Displays strip/board/slat content even if it is 0
37 };
38
39 TH2* GetEmptyDisplayHisto(TString displayHistoName, EDisplayType displayType,
40 Int_t cathode, Int_t chamber=11,
41 TString displayHistoTitle="");
42
43 TH2* GetBoardNumberHisto(TString displayHistoName,
44 Int_t chamber=11,TString displayHistoTitle="");
45
46 TH2* GetDisplayHistogram(TH1* inputHisto, TString displayHistoName,
47 EDisplayType displayType, Int_t cathode,
48 Int_t chamber=11, TString displayHistoTitle="",
49 EDisplayOption displayOpt=kDefaultDisplay);
50
51 Bool_t FillDisplayHistogram(TH1* inputHisto, TH2* displayHisto,
52 EDisplayType displayType, Int_t cathode,
53 Int_t chamber=11,EDisplayOption displayOpt=kDefaultDisplay);
54
55private:
56 Bool_t AddSortedPoint(Float_t currVal, TArrayD& position, const Float_t kResetValue);
57 /// Return index
58 Int_t GetIndex(Int_t chamber, Int_t cathode) { return 2*chamber + cathode;}
59
60 Bool_t InitOrDisplayTriggerInfo(TH1* inoutHisto, TH2* displayHisto,
61 EDisplayType displayType,
62 Int_t cathode, Int_t chamber,
63 TString displayHistoName, TString displayHistoTitle,
64 EDisplayOption displayOpt=kDefaultDisplay);
65
66 void FillBins(TH1* inputHisto, TH2* displayHisto,
67 Int_t iElement1, Int_t iElement2,
68 Float_t x1, Float_t x2, Float_t y1, Float_t y2,
69 const Float_t kShiftX, const Float_t kShiftY,
70 EDisplayOption displayOpt);
71
72 ClassDef(AliMUONTriggerDisplay,0) // Class for converting trigger histograms
73
74};
75#endif