ATLAS Offline Software
Loading...
Searching...
No Matches
TilePaterMonTool.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
5// ********************************************************************
6//
7// NAME: TilePaterMonTool.h
8// PACKAGE: TileMonitoring
9//
10// AUTHOR: Luca Fiorini (Luca.Fiorini@cern.ch)
11//
12// July 2006
13// ********************************************************************
14#ifndef TILEPATERMONTOOL_H
15#define TILEPATERMONTOOL_H
16
17#include <cstdint> //for uint32_t
19
20class TH1C;
21class TH2C;
22class TH1I;
23class TH2I;
24class TH1S;
25class TH2S;
26class TH1F;
27class TH2F;
28class TH1D;
29class TH2D;
30class TTree;
31class TGraph;
32class TProfile;
33class TProfile2D;
34class TGraphErrors;
35class TGraphAsymmErrors;
36class TMultiGraph;
37class TAxis;
38class StoreGateSvc;
39class TileID;
40class TileTBID;
41class TileHWID;
43
44
48
50{
51
52 public:
53
54 TilePaterMonTool(const std::string & type, const std::string & name,
55 const IInterface* parent);
56
57
58 virtual ~TilePaterMonTool();
59
60 virtual StatusCode initialize() override;
61
62 enum TileFragStatus {ALL_OK=0, CRC_ERR=1, ALL_FF=0x10, ALL_00=0x20, NO_FRAG=0x40, NO_ROB=0x80};
63
64protected:
66 TH1D* book1D(const std::string& nam, const std::string& tit,
67 int nx, double xmin, double xmax)
68 {
69 return book1D(m_path, nam, tit, nx, xmin, xmax);
70 }
71
73 TH2D* book2D(const std::string& nam, const std::string& tit,
74 int nx, double xmin, double xmax,
75 int ny, double ymin, double ymax)
76 {
77 return book2D(m_path, nam, tit, nx, xmin, xmax, ny, ymin, ymax);
78 }
79
80 TH1D* book1D(const std::string & dir, const std::string & nam, const std::string & tit,
81 int nx, double xmin, double xmax,
82 Interval_t interval = run, MgmtAttr_t attribute = ATTRIB_MANAGED,
83 const std::string & trigChain = "", const std::string & mergeAlgo = "");
84
85 TH1F* book1F(const std::string & dir, const std::string & nam, const std::string & tit,
86 int nx, double xmin, double xmax,
87 Interval_t interval = run, MgmtAttr_t attribute = ATTRIB_MANAGED,
88 const std::string & trigChain = "", const std::string & mergeAlgo = "");
89
90 TH1I* book1I(const std::string & dir, const std::string & nam, const std::string & tit,
91 int nx, double xmin, double xmax,
92 Interval_t interval = run, MgmtAttr_t attribute = ATTRIB_MANAGED,
93 const std::string & trigChain = "", const std::string & mergeAlgo = "");
94
95 TH1S* book1S(const std::string & dir, const std::string & nam, const std::string & tit,
96 int nx, double xmin, double xmax,
97 Interval_t interval = run, MgmtAttr_t attribute = ATTRIB_MANAGED,
98 const std::string & trigChain = "", const std::string & mergeAlgo = "");
99
100 TH1S* book1Sx(const std::string & dir, const std::string & nam, const std::string & tit,
101 int nx, const Double_t *xlgbins,
102 Interval_t interval = run, MgmtAttr_t attribute = ATTRIB_MANAGED,
103 const std::string & trigChain = "", const std::string & mergeAlgo = "");
104
105 TH1C* book1C(const std::string & dir, const std::string & nam, const std::string & tit,
106 int nx, double xmin, double xmax,
107 Interval_t interval = run, MgmtAttr_t attribute = ATTRIB_MANAGED,
108 const std::string & trigChain = "", const std::string & mergeAlgo = "");
109
110 TH2D* book2D(const std::string & dir, const std::string & nam, const std::string & tit,
111 int nx, double xmin, double xmax,
112 int ny, double ymin, double ymax,
113 Interval_t interval = run, MgmtAttr_t attribute = ATTRIB_MANAGED,
114 const std::string & trigChain = "", const std::string & mergeAlgo = "");
115
116 TH2F* book2F(const std::string & dir, const std::string & nam, const std::string & tit,
117 int nx, double xmin, double xmax,
118 int ny, double ymin, double ymax,
119 Interval_t interval = run, MgmtAttr_t attribute = ATTRIB_MANAGED,
120 const std::string & trigChain = "", const std::string & mergeAlgo = "");
121
122 TH2F* book2F(const std::string & dir, const std::string & nam, const std::string & tit,
123 int nx, double xmin, double xmax,
124 int ny, const double* ybins,
125 Interval_t interval = run, MgmtAttr_t attribute = ATTRIB_MANAGED,
126 const std::string & trigChain = "", const std::string & mergeAlgo = "");
127
128 TH2I* book2I(const std::string & dir, const std::string & nam, const std::string & tit,
129 int nx, double xmin, double xmax,
130 int ny, double ymin, double ymax,
131 Interval_t interval = run, MgmtAttr_t attribute = ATTRIB_MANAGED,
132 const std::string & trigChain = "", const std::string & mergeAlgo = "");
133
134
135
136 TH2S* book2S(const std::string & dir, const std::string & nam, const std::string & tit,
137 int nx, double xmin, double xmax,
138 int ny, double ymin, double ymax,
139 Interval_t interval = run, MgmtAttr_t attribute = ATTRIB_MANAGED,
140 const std::string & trigChain = "", const std::string & mergeAlgo = "");
141
142 TH2C* book2C(const std::string & dir, const std::string & nam, const std::string & tit,
143 int nx, double xmin, double xmax,
144 int ny, double ymin, double ymax,
145 Interval_t interval = run, MgmtAttr_t attribute = ATTRIB_MANAGED,
146 const std::string & trigChain = "", const std::string & mergeAlgo = "");
147
148
149 TProfile* bookProfile(const std::string & dir, const std::string & nam, const std::string & tit,
150 int nx, double xmin, double xmax,
151 Interval_t interval = run, MgmtAttr_t attribute = ATTRIB_MANAGED,
152 const std::string & trigChain = "", const std::string & mergeAlgo = "");
153
154 TProfile* bookProfile(const std::string & dir, const std::string & nam, const std::string & tit,
155 int nx, double xmin, double xmax,
156 double ymin, double ymax,
157 Interval_t interval = run, MgmtAttr_t attribute = ATTRIB_MANAGED,
158 const std::string & trigChain = "", const std::string & mergeAlgo = "");
159
160 TProfile* bookProfile(const std::string & dir, const std::string & nam, const std::string & tit,
161 int nx, const float* xbins,
162 Interval_t interval = run, MgmtAttr_t attribute = ATTRIB_MANAGED,
163 const std::string & trigChain = "", const std::string & mergeAlgo = "");
164 TProfile2D* bookProfile2D(const std::string & dir, const std::string & nam, const std::string & tit,
165 int nx, double xmin, double xmax,
166 int ny, double ymin, double ymax,
167 double zmin, double zmax,
168 Interval_t interval = run, MgmtAttr_t attribute = ATTRIB_MANAGED,
169 const std::string & trigChain = "", const std::string & mergeAlgo = "");
170
171 // TTree* bookTree (const std::string & dir, const std::string & nam, std::string tit);
172
173 TGraph* bookGraph (const std::string& dir, const std::string& nam, const std::string& tit, int N, float* X, float* Y);
174
175 TGraphErrors* bookGraphErrors (const std::string& dir, const std::string& nam, const std::string& tit,
176 int N, float* X, float* Y, float* X_errors, float* Y_errors);
177
178 TGraphAsymmErrors* bookGraphAsymmErrors (const std::string& dir, const std::string& nam, const std::string& tit,
179 int N, float* X, float* Y, float* X_errors1,
180 float* X_errors2, float* Y_errors1, float* Y_errors2);
181
182 StatusCode removeTObj(TObject* obj);
183
186
187 template <typename T>
188 void regHist(const std::string& subDir, T* hist,
189 Interval_t interval = run, MgmtAttr_t attribute = ATTRIB_MANAGED,
190 const std::string &trigChain = "", const std::string & mergeAlgo = "" );
191
192 template <typename T>
193 void regGraph(const std::string& subDir, T* graph,
194 Interval_t interval = run, MgmtAttr_t attribute = ATTRIB_MANAGED,
195 const std::string & trigChain = "", const std::string & mergeAlgo = "" );
196
197
198 const TileID* m_tileID{};
202
203 bool m_savePng{};
204 bool m_savePs{};
205 bool m_saveSvg{};
206
208 std::vector<int> m_fragIDsDemonstrators;
209
210 std::string m_EBcellName[48] = { "E3", "E4", "D4", "D4", "C10", "C10", "A12", "A12", "B11", "B11", "A13", "A13"
211 , "E1", "E2", "B12", "B12", "D5", "D5", "E3*", "E4*", "A14", "A14", "B13", "B13"
212 , "", "", "", "", "", "", "B14", "A15", "A15", "", "", "B14"
213 , "B15", "D6", "D6", "B15", "A16", "A16", "", "", "", "", "", "" };
214
215 std::string m_LBcellName[48] = { "D0", "A1", "B1", "B1", "A1", "A2", "B2", "B2", "A2", "A3", "A3", "B3"
216 , "B3", "D1", "D1", "A4", "B4", "B4", "A4", "A5", "A5", "B5", "B5", "A6"
217 , "D2", "D2", "A6", "B6", "B6", "A7", "", "", "A7", "B7", "B7", "A8"
218 , "A9", "A9", "A8", "B8", "B8", "D3", "B9", "", "D3", "A10", "A10", "B9" };
219
220
221 inline std::string getCellName(unsigned int ros, unsigned int channel) {
222 if (ros < 3) return m_LBcellName[channel];
223 else return m_EBcellName[channel];
224 };
225
226
227 std::string m_TMDB_LB_cell_names[8] = {"D0", "D1L", "D1R", "D2R", "D2L", "D3L", "D3R", ""}; // should be corrected at some time
228 std::string m_TMDB_EB_cell_names[4] = {"D5L", "D5R", "D6L", "D6R"};
229
230 inline std::string getTMDBCellName(unsigned int ros, unsigned int channel) {
231 if (ros < 3) return m_TMDB_LB_cell_names[channel];
232 else return m_TMDB_EB_cell_names[channel];
233 };
234
235
236 // Tells if a channel is disconnected or not
237 // Special modules are considered too.
238 // NB Input is channel number (0-47)
239 // BEWARE: ugly code below this line!
240 int m_chMapLB[48] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
241 , 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
242 , 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0
243 , 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0 };
244
245 int m_chMapEB[48] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
246 , 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0
247 , 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 0
248 , 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1 };
249
250 int m_chMapEBsp[48] = { 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0
251 , 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
252 , 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 0
253 , 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1 };
254
255
256 inline bool isDisconnected(int ros, int drawer, int ch) {
257
258 if (ros < 3) { //LB, all standard. Channels 30,31,43 are disconnected
259 return m_chMapLB[ch];
260 } else {
261 if (((ros == 3) && (drawer == 14)) || ((ros == 4) && (drawer == 17))) {//EB, EBA15 and EBC18 are special
262 return m_chMapEBsp[ch];
263 } else {//EB standard module
264 return m_chMapEB[ch];
265 }
266 } //end if LB else EB
267
268 }
269
270
271};
272
273#endif
virtual StatusCode regHist(TH1 *h, const std::string &system, Interval_t interval, MgmtAttr_t histo_mgmt=ATTRIB_MANAGED, const std::string &chain="", const std::string &merge="")
Registers a TH1 (including TH2, TH3, and TProfile) to be included in the output stream using logical ...
Interval_t
An enumeration describing how detailed a particular monitoring object is.
ManagedMonitorToolBase(const std::string &type, const std::string &name, const IInterface *parent)
MgmtAttr_t
An enumeration describing how the class handles the histogram.
virtual StatusCode regGraph(TGraph *g, const std::string &system, Interval_t interval, MgmtAttr_t histo_mgmt=ATTRIB_MANAGED, const std::string &chain="", const std::string &merge="")
Registers a TGraph to be included in the output stream using logical parameters that describe the gra...
The Athena Transient Store API.
Helper class for TileCal online (hardware) identifiers.
Definition TileHWID.h:49
Helper class for TileCal offline identifiers.
Definition TileID.h:67
bool isDisconnected(int ros, int drawer, int ch)
TProfile2D * bookProfile2D(const std::string &dir, const std::string &nam, const std::string &tit, int nx, double xmin, double xmax, int ny, double ymin, double ymax, double zmin, double zmax, Interval_t interval=run, MgmtAttr_t attribute=ATTRIB_MANAGED, const std::string &trigChain="", const std::string &mergeAlgo="")
const TileTBID * m_tileTBID
TH2F * book2F(const std::string &dir, const std::string &nam, const std::string &tit, int nx, double xmin, double xmax, int ny, double ymin, double ymax, Interval_t interval=run, MgmtAttr_t attribute=ATTRIB_MANAGED, const std::string &trigChain="", const std::string &mergeAlgo="")
std::string getTMDBCellName(unsigned int ros, unsigned int channel)
std::vector< int > m_fragIDsToIgnoreDMUerrors
TGraphAsymmErrors * bookGraphAsymmErrors(const std::string &dir, const std::string &nam, const std::string &tit, int N, float *X, float *Y, float *X_errors1, float *X_errors2, float *Y_errors1, float *Y_errors2)
TGraphErrors * bookGraphErrors(const std::string &dir, const std::string &nam, const std::string &tit, int N, float *X, float *Y, float *X_errors, float *Y_errors)
TProfile * bookProfile(const std::string &dir, const std::string &nam, const std::string &tit, int nx, double xmin, double xmax, Interval_t interval=run, MgmtAttr_t attribute=ATTRIB_MANAGED, const std::string &trigChain="", const std::string &mergeAlgo="")
std::string m_TMDB_LB_cell_names[8]
const TileID * m_tileID
std::string m_EBcellName[48]
virtual StatusCode initialize() override
StatusCode removeTObj(TObject *obj)
TH1S * book1S(const std::string &dir, const std::string &nam, const std::string &tit, int nx, double xmin, double xmax, Interval_t interval=run, MgmtAttr_t attribute=ATTRIB_MANAGED, const std::string &trigChain="", const std::string &mergeAlgo="")
std::string getCellName(unsigned int ros, unsigned int channel)
std::string m_LBcellName[48]
TH1F * book1F(const std::string &dir, const std::string &nam, const std::string &tit, int nx, double xmin, double xmax, Interval_t interval=run, MgmtAttr_t attribute=ATTRIB_MANAGED, const std::string &trigChain="", const std::string &mergeAlgo="")
const TileHWID * m_tileHWID
const TileCablingService * m_cabling
TH1D * book1D(const std::string &nam, const std::string &tit, int nx, double xmin, double xmax)
Implicit version of book1D.
void regHist(const std::string &subDir, T *hist, Interval_t interval=run, MgmtAttr_t attribute=ATTRIB_MANAGED, const std::string &trigChain="", const std::string &mergeAlgo="")
TH2I * book2I(const std::string &dir, const std::string &nam, const std::string &tit, int nx, double xmin, double xmax, int ny, double ymin, double ymax, Interval_t interval=run, MgmtAttr_t attribute=ATTRIB_MANAGED, const std::string &trigChain="", const std::string &mergeAlgo="")
TilePaterMonTool(const std::string &type, const std::string &name, const IInterface *parent)
std::vector< int > m_fragIDsDemonstrators
TH1C * book1C(const std::string &dir, const std::string &nam, const std::string &tit, int nx, double xmin, double xmax, Interval_t interval=run, MgmtAttr_t attribute=ATTRIB_MANAGED, const std::string &trigChain="", const std::string &mergeAlgo="")
TH2D * book2D(const std::string &nam, const std::string &tit, int nx, double xmin, double xmax, int ny, double ymin, double ymax)
Implicit version of book2D.
TH2S * book2S(const std::string &dir, const std::string &nam, const std::string &tit, int nx, double xmin, double xmax, int ny, double ymin, double ymax, Interval_t interval=run, MgmtAttr_t attribute=ATTRIB_MANAGED, const std::string &trigChain="", const std::string &mergeAlgo="")
TH2C * book2C(const std::string &dir, const std::string &nam, const std::string &tit, int nx, double xmin, double xmax, int ny, double ymin, double ymax, Interval_t interval=run, MgmtAttr_t attribute=ATTRIB_MANAGED, const std::string &trigChain="", const std::string &mergeAlgo="")
void regGraph(const std::string &subDir, T *graph, Interval_t interval=run, MgmtAttr_t attribute=ATTRIB_MANAGED, const std::string &trigChain="", const std::string &mergeAlgo="")
TH1I * book1I(const std::string &dir, const std::string &nam, const std::string &tit, int nx, double xmin, double xmax, Interval_t interval=run, MgmtAttr_t attribute=ATTRIB_MANAGED, const std::string &trigChain="", const std::string &mergeAlgo="")
std::string m_TMDB_EB_cell_names[4]
TGraph * bookGraph(const std::string &dir, const std::string &nam, const std::string &tit, int N, float *X, float *Y)
TH1S * book1Sx(const std::string &dir, const std::string &nam, const std::string &tit, int nx, const Double_t *xlgbins, Interval_t interval=run, MgmtAttr_t attribute=ATTRIB_MANAGED, const std::string &trigChain="", const std::string &mergeAlgo="")
Helper class for TileCal offline identifiers of ancillary testbeam detectors and MBTS.
double xmax
Definition listroot.cxx:61
double ymin
Definition listroot.cxx:63
double xmin
Definition listroot.cxx:60
double ymax
Definition listroot.cxx:64
TH1F(name, title, nxbins, bins_par2, bins_par3=None, path='', **kwargs)
Definition run.py:1