ATLAS Offline Software
DataQualityFatherMonTool.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 // ********************************************************************
6 //
7 // NAME: DataQualityMonTool.cxx
8 // PACKAGE: DataQualityTools
9 //
10 // AUTHOR: Luca Fiorini (Luca.Fiorini@cern.ch)
11 //
12 // July 2006
13 // ********************************************************************
14 
16 
17 //----------------------------------------------------------------------------------
19  const std::string & name,
20  const IInterface* parent)
22  //----------------------------------------------------------------------------------
23 {
24  declareInterface<IMonitorToolBase>(this);
25 
26  //declareProperty("histoPathBase", m_path = "DataQuality");
27  declareProperty("doRunCosmics", m_doRunCosmics = 1);
28  declareProperty("doRunBeam", m_doRunBeam = 1);
29  declareProperty("doOfflineHists", m_doOfflineHists = 1);
30  declareProperty("doOnlineHists", m_doOnlineHists = 1);
31 
32  // property histoPathBase in MonitorToolBase
33  //m_stream = "/SHIFT";
34 }
35 
36 //----------------------------------------------------------------------------------
38 //----------------------------------------------------------------------------------
39 {
40 }
41 
42 /*---------------------------------------------------------*/
44 /*---------------------------------------------------------*/
45 {
46 
47  StatusCode sc;
49  if (sc.isFailure()) {
50  ATH_MSG_ERROR( "Unable to Initialize ManagedMonitoringToolBase::initialize" );
51  return sc;
52  }
53 
54  return StatusCode::SUCCESS;
55 }
56 
57 //----------------------------------------------------------------------------------
59 //----------------------------------------------------------------------------------
60 {
61 
62  if ( newLumiBlockFlag() || newRunFlag() ) {
63 
64  ATH_MSG_DEBUG( "in bookHists()" );
65  ATH_MSG_DEBUG( "Using base path " << m_path );
66  }
67  return StatusCode::SUCCESS;
68 }
69 
70 //----------------------------------------------------------------------------------
72 //----------------------------------------------------------------------------------
73 {
74 
75  ATH_MSG_DEBUG( "in bookHists()" );
76  ATH_MSG_DEBUG( "Using base path " << m_path );
77 
78  return StatusCode::SUCCESS;
79 }
80 
81 //----------------------------------------------------------------------------------
83 //----------------------------------------------------------------------------------
84 {
85 
86  ATH_MSG_DEBUG( "in fillHists()" );
87 
88  return StatusCode::SUCCESS;
89 }
90 
91 //----------------------------------------------------------------------------------
93 //----------------------------------------------------------------------------------
94 {
95 
96  ATH_MSG_DEBUG( "in procHistograms()" );
97  return StatusCode::SUCCESS;
98 }
99 
100 
101 //----------------------------------------------------------------------------------
103 //----------------------------------------------------------------------------------
104 
105 {
106  ATH_MSG_DEBUG( "in checkHists()" );
107 
108  return StatusCode::SUCCESS;
109 }
110 
111 
113 //StatusCode DataQualityFatherMonTool::registerHist(const std::string& path, TH1F_LW* h1, LevelOfDetail_t level, Interval_t interval, std::string dqmAlgorithm)
115 //{
116 // if(ManagedMonitorToolBase::regHist(h1, path, level, interval, dqmAlgorithm) != StatusCode::SUCCESS) {
117 // MsgStream log(msgSvc(), name());
118 // log << MSG::WARNING << "Could not register histogram : "
119 // << levelOfDetailEnumToString(level)+"/"+path+"/"+h1->GetName() << endmsg;
120 // return StatusCode::FAILURE;
121 // }
122 // return StatusCode::SUCCESS;
123 //}
124 //
126 //StatusCode DataQualityFatherMonTool::registerHist(const std::string& path, TH1I_LW* h1, LevelOfDetail_t level, Interval_t interval, std::string dqmAlgorithm)
128 //{
129 // if(ManagedMonitorToolBase::regHist(h1, path, level, interval, dqmAlgorithm) != StatusCode::SUCCESS) {
130 // MsgStream log(msgSvc(), name());
131 // log << MSG::WARNING << "Could not register histogram : "
132 // << levelOfDetailEnumToString(level)+"/"+path+"/"+h1->GetName() << endmsg;
133 // return StatusCode::FAILURE;
134 // }
135 // return StatusCode::SUCCESS;
136 //}
137 //
138 //
140 //StatusCode DataQualityFatherMonTool::registerHist(const std::string& path, TH2F_LW* h1, LevelOfDetail_t level, Interval_t interval, std::string dqmAlgorithm)
142 //{
143 // if(ManagedMonitorToolBase::regHist(h1, path, level, interval, dqmAlgorithm) != StatusCode::SUCCESS) {
144 // MsgStream log(msgSvc(), name());
145 // log << MSG::WARNING << "Could not register histogram : "
146 // << levelOfDetailEnumToString(level)+"/"+path+"/"+h1->GetName() << endmsg;
147 // return StatusCode::FAILURE;
148 // }
149 // return StatusCode::SUCCESS;
150 //}
151 //
153 //StatusCode DataQualityFatherMonTool::registerHist(const std::string& path, TH2I_LW* h1, LevelOfDetail_t level, Interval_t interval, std::string dqmAlgorithm)
155 //{
156 // if(ManagedMonitorToolBase::regHist(h1, path, level, interval, dqmAlgorithm) != StatusCode::SUCCESS) {
157 // MsgStream log(msgSvc(), name());
158 // log << MSG::WARNING << "Could not register histogram : "
159 // << levelOfDetailEnumToString(level)+"/"+path+"/"+h1->GetName() << endmsg;
160 // return StatusCode::FAILURE;
161 // }
162 // return StatusCode::SUCCESS;
163 //}
164 //
166 //StatusCode DataQualityFatherMonTool::registerHist(const std::string& path, TProfile_LW* h1, LevelOfDetail_t level, Interval_t interval, std::string dqmAlgorithm)
168 //{
169 // if(ManagedMonitorToolBase::regHist(h1, path, level, interval, dqmAlgorithm) != StatusCode::SUCCESS) {
170 // MsgStream log(msgSvc(), name());
171 // log << MSG::WARNING << "Could not register histogram : "
172 // << levelOfDetailEnumToString(level)+"/"+path+"/"+h1->GetName() << endmsg;
173 // return StatusCode::FAILURE;
174 // }
175 // return StatusCode::SUCCESS;
176 //}
177 //
179 //StatusCode DataQualityFatherMonTool::registerHist(const std::string& path, TProfile2D_LW* h1, LevelOfDetail_t level, Interval_t interval, std::string dqmAlgorithm)
181 //{
182 // if(ManagedMonitorToolBase::regHist(h1, path, level, interval, dqmAlgorithm) != StatusCode::SUCCESS) {
183 // MsgStream log(msgSvc(), name());
184 // log << MSG::WARNING << "Could not register histogram : "
185 // << levelOfDetailEnumToString(level)+"/"+path+"/"+h1->GetName() << endmsg;
186 // return StatusCode::FAILURE;
187 // }
188 // return StatusCode::SUCCESS;
189 //}
190 
191 //----------------------------------------------------------------------------------
193 //----------------------------------------------------------------------------------
194 {
195  if(ManagedMonitorToolBase::regHist(h1, path, interval, histo_mgmt) != StatusCode::SUCCESS) {
196  ATH_MSG_WARNING( "Could not register histogram : "
197  << "/"+path+"/"+h1->GetName() );
198  return StatusCode::FAILURE;
199  }
200  return StatusCode::SUCCESS;
201 }
202 
203 
204 //----------------------------------------------------------------------------------
206 //----------------------------------------------------------------------------------
207 {
208  if(ManagedMonitorToolBase::regHist(h1, path, interval, histo_mgmt) != StatusCode::SUCCESS) {
209  ATH_MSG_WARNING( "Could not register histogram : "
210  << "/"+path+"/"+h1->GetName() );
211  return StatusCode::FAILURE;
212  }
213  return StatusCode::SUCCESS;
214 }
215 
216 
217 
218 //----------------------------------------------------------------------------------
220 //----------------------------------------------------------------------------------
221 {
222  if(ManagedMonitorToolBase::regHist(h1, path, interval, histo_mgmt) != StatusCode::SUCCESS) {
223  ATH_MSG_WARNING( "Could not register histogram : "
224  << "/"+path+"/"+h1->GetName() );
225  return StatusCode::FAILURE;
226  }
227  return StatusCode::SUCCESS;
228 }
229 
230 
231 //----------------------------------------------------------------------------------
232 StatusCode DataQualityFatherMonTool::registerHist(const std::string& path, TH1F_LW* h1, Interval_t interval, MgmtAttr_t histo_mgmt, const std::string& merge_algo)
233 //----------------------------------------------------------------------------------
234 {
235  if(ManagedMonitorToolBase::regHist(h1, path, interval, histo_mgmt, "", merge_algo) != StatusCode::SUCCESS) {
236  ATH_MSG_WARNING( "Could not register histogram : "
237  << "/"+path+"/"+h1->GetName() );
238  return StatusCode::FAILURE;
239  }
240  return StatusCode::SUCCESS;
241 }
242 
243 
244 //----------------------------------------------------------------------------------
245 StatusCode DataQualityFatherMonTool::registerHist(const std::string& path, TH1* h1, Interval_t interval, MgmtAttr_t histo_mgmt, const std::string& merge_algo)
246 //----------------------------------------------------------------------------------
247 {
248  if(ManagedMonitorToolBase::regHist(h1, path, interval, histo_mgmt, "", merge_algo) != StatusCode::SUCCESS) {
249  ATH_MSG_WARNING( "Could not register histogram : "
250  << "/"+path+"/"+h1->GetName() );
251  return StatusCode::FAILURE;
252  }
253  return StatusCode::SUCCESS;
254 }
255 
256 
257 //----------------------------------------------------------------------------------
259 //----------------------------------------------------------------------------------
260 {
261  if(ManagedMonitorToolBase::regHist(h1, path, interval, histo_mgmt) != StatusCode::SUCCESS) {
262  ATH_MSG_WARNING( "Could not register histogram : "
263  << "/"+path+"/"+h1->GetName() );
264  return StatusCode::FAILURE;
265  }
266  return StatusCode::SUCCESS;
267 }
268 
269 
270 //----------------------------------------------------------------------------------
272 //----------------------------------------------------------------------------------
273 {
274  if(ManagedMonitorToolBase::regHist(h1, path, interval, histo_mgmt) != StatusCode::SUCCESS) {
275  ATH_MSG_WARNING( "Could not register histogram : "
276  << "/"+path+"/"+h1->GetName() );
277  return StatusCode::FAILURE;
278  }
279  return StatusCode::SUCCESS;
280 }
281 
282 //----------------------------------------------------------------------------------
284 //----------------------------------------------------------------------------------
285 {
286  if(ManagedMonitorToolBase::regGraph(h1, path, interval, histo_mgmt) != StatusCode::SUCCESS) {
287  ATH_MSG_WARNING( "Could not register histogram : "
288  << "/"+path+"/"+h1->GetName() );
289  return StatusCode::FAILURE;
290  }
291  return StatusCode::SUCCESS;
292 }
293 
DataQualityFatherMonTool::m_doOfflineHists
bool m_doOfflineHists
Definition: DataQualityFatherMonTool.h:79
ManagedMonitorToolBase::Interval_t
Interval_t
An enumeration describing how detailed a particular monitoring object is.
Definition: ManagedMonitorToolBase.h:114
ManagedMonitorToolBase::m_path
std::string m_path
Definition: ManagedMonitorToolBase.h:915
DataQualityFatherMonTool::DataQualityFatherMonTool
DataQualityFatherMonTool(const std::string &type, const std::string &name, const IInterface *parent)
Definition: DataQualityFatherMonTool.cxx:18
DataQualityFatherMonTool::m_doRunCosmics
bool m_doRunCosmics
Definition: DataQualityFatherMonTool.h:77
athena.path
path
python interpreter configuration --------------------------------------—
Definition: athena.py:126
ManagedMonitorToolBase::MgmtAttr_t
MgmtAttr_t
An enumeration describing how the class handles the histogram.
Definition: ManagedMonitorToolBase.h:131
ManagedMonitorToolBase
Provides functionality for users to implement and save histograms, ntuples, and summary data,...
Definition: ManagedMonitorToolBase.h:74
DataQualityFatherMonTool::registerHist
StatusCode registerHist(const std::string &path, TH1 *h1, Interval_t interval=run, MgmtAttr_t histo_mgmt=ATTRIB_MANAGED, const std::string &merge_algo="")
Definition: DataQualityFatherMonTool.cxx:245
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
DataQualityFatherMonTool::~DataQualityFatherMonTool
virtual ~DataQualityFatherMonTool()
Definition: DataQualityFatherMonTool.cxx:37
TH1I_LW
Definition: TH1I_LW.h:23
ManagedMonitorToolBase::regGraph
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...
Definition: ManagedMonitorToolBase.cxx:1693
read_hist_ntuple.h1
h1
Definition: read_hist_ntuple.py:21
TProfile_LW
Definition: TProfile_LW.h:24
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
DataQualityFatherMonTool::bookHistogramsRecurrent
virtual StatusCode bookHistogramsRecurrent()
An inheriting class should either override this function, bookHists() or bookHistograms().
Definition: DataQualityFatherMonTool.cxx:58
TH1F_LW
Definition: TH1F_LW.h:23
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
ManagedMonitorToolBase::initialize
virtual StatusCode initialize()
Definition: ManagedMonitorToolBase.cxx:669
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
getLatestRuns.interval
interval
Definition: getLatestRuns.py:24
test_pyathena.parent
parent
Definition: test_pyathena.py:15
TH2I_LW
Definition: TH2I_LW.h:23
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
DataQualityFatherMonTool::m_doRunBeam
bool m_doRunBeam
Definition: DataQualityFatherMonTool.h:78
DataQualityFatherMonTool::initialize
virtual StatusCode initialize()
Definition: DataQualityFatherMonTool.cxx:43
TProfile2D_LW
Definition: TProfile2D_LW.h:24
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
DataQualityFatherMonTool::procHistograms
virtual StatusCode procHistograms()
An inheriting class should either override this function or finalHists().
Definition: DataQualityFatherMonTool.cxx:92
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
TH1
Definition: rootspy.cxx:268
DataQualityFatherMonTool.h
DataQualityFatherMonTool::m_doOnlineHists
bool m_doOnlineHists
Definition: DataQualityFatherMonTool.h:80
DataQualityFatherMonTool::checkHists
virtual StatusCode checkHists(bool fromFinalize)
This implementation does nothing; equivalent functionality may be provided by procHists(....
Definition: DataQualityFatherMonTool.cxx:102
DataQualityFatherMonTool::bookHistograms
virtual StatusCode bookHistograms()
An inheriting class should either override this function or bookHists().
Definition: DataQualityFatherMonTool.cxx:71
TH2F_LW
Definition: TH2F_LW.h:23
ManagedMonitorToolBase::newLumiBlockFlag
bool newLumiBlockFlag() const
Definition: ManagedMonitorToolBase.h:853
ManagedMonitorToolBase::regHist
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 ...
Definition: ManagedMonitorToolBase.cxx:1454
DataQualityFatherMonTool::fillHistograms
virtual StatusCode fillHistograms()
An inheriting class should either override this function or fillHists().
Definition: DataQualityFatherMonTool.cxx:82
ManagedMonitorToolBase::newRunFlag
bool newRunFlag() const
Definition: ManagedMonitorToolBase.h:854