ATLAS Offline Software
InDetGlobalMotherMonTool.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
18 //Local
20 //Root
21 #include "TH1.h"
22 #include "LWHists/TH1I_LW.h"
23 #include "LWHists/TH1F_LW.h"
24 #include "LWHists/TH2F_LW.h"
25 #include "LWHists/TH2I_LW.h"
26 #include "LWHists/TProfile_LW.h"
27 #include "TH1F.h"
28 #include "TH2F.h"
29 #include "TProfile.h"
30 #include "TProfile2D.h"
31 //Standard c++
32 #include <vector>
33 #include <string>
34 
35 //---------------------------------------------------------
37  const std::string & type,
38  const std::string & name,
39  const IInterface* parent)
41  m_isOnline(false),
42  m_isCosmicsRun(false),
43  m_checkRate(1000),
44  m_trackMax(1000),
45  m_trackBin(100),
46  m_d0Max(10),
47  m_z0Max(50),
48  m_nBinsEta(50),
49  m_nBinsPhi(50),
50  m_perEvent(500),
51  m_evt(0),
52  m_LayersB(73),
53  m_LayersEC(10*16),
54  m_sct_tracks(nullptr),
55  m_trt_tracks(nullptr),
56  m_pix_tracks(nullptr),
57  m_combined_tracks(nullptr),
58  m_trtID(nullptr),
59  m_sctID(nullptr),
60  m_pixelID(nullptr),
61  m_BCM_RDO(nullptr),
62  m_pixRdoContainer(nullptr),
63  m_sctRdoContainer(nullptr),
64  m_driftCircleContainer(nullptr),
65  m_pixLVL1IDContainer(nullptr),
66  m_sctLVL1IDContainer(nullptr),
67  m_trtLVL1IDContainer(nullptr),
68  m_pixBCIDContainer(nullptr),
69  m_sctBCIDContainer(nullptr),
70  m_trtBCIDContainer(nullptr),
71  m_trtPhase(nullptr)
72 {
73  declareProperty("checkRate",m_checkRate);
74  declareProperty("m_isOnline",m_isOnline);
75  declareProperty("trackMax", m_trackMax);
76  declareProperty("trackBin", m_trackBin);
77  declareProperty("d0Max", m_d0Max);
78  declareProperty("z0Max", m_z0Max);
79  declareProperty("nBinsEta", m_nBinsEta);
80  declareProperty("nBinsPhi", m_nBinsPhi);
81  declareProperty("perEvent", m_perEvent); // Check what this is
82  declareProperty("isCosmicsRun", m_isCosmicsRun);
83 
84 }
85 
86 // //--------------------------------------------------------------------
87 // StatusCode InDetGlobalMotherMonTool::bookHistograms( bool isNewEventsBlock, bool isNewLumiBlock, bool isNewRun )
88 // {
89 // if ( isNewEventsBlock || isNewLumiBlock || isNewRun ){
90 // m_evt = 0;
91 // }
92 
93 // if(m_environment==AthenaMonManager::tier0Raw){
94 // m_isOnline = false;
95 // }
96 // if(m_environment==AthenaMonManager::tier0ESD){
97 // m_isOnline = false;
98 // }
99 
100 // return StatusCode::SUCCESS;
101 // }
102 
103 // //----------------------------------------------------------
104 // StatusCode InDetGlobalMotherMonTool::fillHistograms()
105 // {
106 // return StatusCode::SUCCESS;
107 // }
108 
109 // //----------------------------------------------------------
110 // StatusCode InDetGlobalMotherMonTool::procHistograms( bool isEndOfEventsBlock, bool isEndOfLumiBlock, bool isEndOfRun )
111 // {
112 // if ( isEndOfEventsBlock || isEndOfLumiBlock || isEndOfRun ){
113 // m_evt = 0;
114 // }
115 
116 // return StatusCode::SUCCESS;
117 // }
118 
119 
120 //-------------------------------------------------------------------------
122  MonGroup & theGroup,
123  TH1* h1)
124 {
125  StatusCode rc = theGroup.regHist(h1) ;
126  if (rc != StatusCode::SUCCESS)
127  {
128  //std::string msgtext = "Could not register histogram "; //fix this it did not like the variable
129  //if (h1!=0) msg+=h1->GetName();
130  if ( msgLvl(MSG::WARNING) ) msg(MSG::WARNING) << "Could not register histogram :" << endmsg;
131  }
132  return rc;
133 }
134 
136  TH1F* h1 )
137 {
138  StatusCode rc = theGroup.regHist(h1) ;
139  if (rc != StatusCode::SUCCESS)
140  {
141  //std::string msgtext = "Could not register histogram "; //fix this it did not like the variable
142  //if (h1!=0) msg+=h1->GetName();
143  if ( msgLvl(MSG::WARNING) ) msg(MSG::WARNING) << "Could not register histogram :" << endmsg;
144  }
145  return rc;
146 }
147 
149  TH1I* h1 )
150 {
151  StatusCode rc = theGroup.regHist(h1) ;
152  if (rc != StatusCode::SUCCESS)
153  {
154  //std::string msgtext = "Could not register histogram "; //fix this it did not like the variable
155  //if (h1!=0) msg+=h1->GetName();
156  if ( msgLvl(MSG::WARNING) ) msg(MSG::WARNING) << "Could not register histogram :" << endmsg;
157  }
158  return rc;
159 }
161  TH2F* h2 )
162 {
163  StatusCode rc = theGroup.regHist(h2) ;
164  if (rc != StatusCode::SUCCESS)
165  {
166  //std::string msgtext = "Could not register histogram "; //fix this it did not like the variable
167  //if (h1!=0) msg+=h1->GetName();
168  if ( msgLvl(MSG::WARNING) ) msg(MSG::WARNING) << "Could not register histogram :" << endmsg;
169  }
170  return rc;
171 }
172 
174  TH2I* h2 )
175 {
176  StatusCode rc = theGroup.regHist(h2) ;
177  if (rc != StatusCode::SUCCESS)
178  {
179  //std::string msgtext = "Could not register histogram "; //fix this it did not like the variable
180  //if (h1!=0) msg+=h1->GetName();
181  if ( msgLvl(MSG::WARNING) ) msg(MSG::WARNING) << "Could not register histogram :" << endmsg;
182  }
183  return rc;
184 }
185 
187  TProfile* h1 )
188 {
189  StatusCode rc = theGroup.regHist(h1) ;
190  if (rc != StatusCode::SUCCESS)
191  {
192  //std::string msgtext = "Could not register histogram "; //fix this it did not like the variable
193  //if (h1!=0) msg+=h1->GetName();
194  if ( msgLvl(MSG::WARNING) ) msg(MSG::WARNING) << "Could not register histogram :" << endmsg;
195  }
196  return rc;
197 }
198 
199 
201  TH1I_LW* h1 )
202 {
203  StatusCode rc = theGroup.regHist(h1) ;
204  if (rc != StatusCode::SUCCESS)
205  {
206  //std::string msgtext = "Could not register histogram "; //fix this it did not like the variable
207  //if (h1!=0) msg+=h1->GetName();
208  if ( msgLvl(MSG::WARNING) ) msg(MSG::WARNING) << "Could not register histogram :" << endmsg;
209  }
210  return rc;
211 }
212 
214  TH2I_LW* h1 )
215 {
216  StatusCode rc = theGroup.regHist(h1) ;
217  if (rc != StatusCode::SUCCESS)
218  {
219  //std::string msgtext = "Could not register histogram "; //fix this it did not like the variable
220  //if (h1!=0) msg+=h1->GetName();
221  if ( msgLvl(MSG::WARNING) ) msg(MSG::WARNING) << "Could not register histogram :" << endmsg;
222  }
223  return rc;
224 }
225 
227  TH1F_LW* h1 )
228 {
229  StatusCode rc = theGroup.regHist(h1) ;
230  if (rc != StatusCode::SUCCESS)
231  {
232  //std::string msgtext = "Could not register histogram "; //fix this it did not like the variable
233  //if (h1!=0) msg+=h1->GetName();
234  if ( msgLvl(MSG::WARNING) ) msg(MSG::WARNING) << "Could not register histogram :" << endmsg;
235  }
236  return rc;
237 }
238 
240  TH2F_LW* h2 )
241 {
242  StatusCode rc = theGroup.regHist(h2) ;
243  if (rc != StatusCode::SUCCESS)
244  {
245  //std::string msgtext = "Could not register histogram "; //fix this it did not like the variable
246  //if (h1!=0) msg+=h1->GetName();
247  if ( msgLvl(MSG::WARNING) ) msg(MSG::WARNING) << "Could not register histogram :" << endmsg;
248  }
249  return rc;
250 }
251 
253  TProfile_LW* h1 )
254 {
255  StatusCode rc = theGroup.regHist(h1) ;
256  if (rc != StatusCode::SUCCESS)
257  {
258  //std::string msgtext = "Could not register histogram "; //fix this it did not like the variable
259  //if (h1!=0) msg+=h1->GetName();
260  if ( msgLvl(MSG::WARNING) ) msg(MSG::WARNING) << "Could not register histogram :" << endmsg;
261  }
262  return rc;
263 }
264 
265 
267  TProfile2D* h2 )
268 {
269  StatusCode rc = theGroup.regHist(h2);
270  if (rc != StatusCode::SUCCESS)
271  {
272  //std::string msgtext = "Could not register histogram "; //fix this it did not like the variable
273  //if (h1!=0) msg+=h1->GetName();
274  if ( msgLvl(MSG::WARNING) ) msg(MSG::WARNING) << "Could not register histogram :" << endmsg;
275  }
276  return rc;
277 }
TH1F_LW.h
TH2F_LW.h
InDetGlobalMotherMonTool::m_isOnline
bool m_isOnline
True if offline mode, false if online mode.
Definition: InDetGlobalMotherMonTool.h:540
InDetGlobalMotherMonTool::m_checkRate
int m_checkRate
Check rate used in histograms.
Definition: InDetGlobalMotherMonTool.h:549
TH1I
Definition: rootspy.cxx:332
ManagedMonitorToolBase
Provides functionality for users to implement and save histograms, ntuples, and summary data,...
Definition: ManagedMonitorToolBase.h:74
TH2F
Definition: rootspy.cxx:420
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
InDetGlobalMotherMonTool::registerHist
StatusCode registerHist(MonGroup &theGroup, TH1 *h1)
Register single histogram.
Definition: InDetGlobalMotherMonTool.cxx:121
InDetGlobalMotherMonTool::m_isCosmicsRun
bool m_isCosmicsRun
True if this is a cosmics run, false for all other types.
Definition: InDetGlobalMotherMonTool.h:543
TH1I_LW
Definition: TH1I_LW.h:23
TProfile2D
Definition: rootspy.cxx:531
AthCommonMsg< AlgTool >::msgLvl
bool msgLvl(const MSG::Level lvl) const
Definition: AthCommonMsg.h:30
TProfile_LW.h
read_hist_ntuple.h1
h1
Definition: read_hist_ntuple.py:21
TProfile_LW
Definition: TProfile_LW.h:24
InDetGlobalMotherMonTool::m_perEvent
int m_perEvent
Number of events per which some histograms are filled.
Definition: InDetGlobalMotherMonTool.h:571
ManagedMonitorToolBase::MonGroup
A container of information describing a monitoring object.
Definition: ManagedMonitorToolBase.h:138
InDetGlobalMotherMonTool::m_d0Max
int m_d0Max
d0 limits
Definition: InDetGlobalMotherMonTool.h:559
TH1F_LW
Definition: TH1F_LW.h:23
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
TH2I
Definition: rootspy.cxx:410
TH1I_LW.h
TH2I_LW.h
test_pyathena.parent
parent
Definition: test_pyathena.py:15
InDetGlobalMotherMonTool::m_nBinsEta
int m_nBinsEta
Number of bins in eta histograms.
Definition: InDetGlobalMotherMonTool.h:565
InDetGlobalMotherMonTool::m_trackMax
int m_trackMax
Track limit.
Definition: InDetGlobalMotherMonTool.h:553
InDetGlobalMotherMonTool::m_trackBin
int m_trackBin
Track bin number.
Definition: InDetGlobalMotherMonTool.h:556
ManagedMonitorToolBase::MonGroup::regHist
StatusCode regHist(TH1 *h)
Registers a TH1 (including TH2, TH3, and TProfile) to be included in the output stream using logical ...
Definition: ManagedMonitorToolBase.cxx:195
TH2I_LW
Definition: TH2I_LW.h:23
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
TProfile
Definition: rootspy.cxx:515
InDetGlobalMotherMonTool::m_z0Max
int m_z0Max
z0 limits
Definition: InDetGlobalMotherMonTool.h:562
TH1F
Definition: rootspy.cxx:320
InDetGlobalMotherMonTool::InDetGlobalMotherMonTool
InDetGlobalMotherMonTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor
Definition: InDetGlobalMotherMonTool.cxx:36
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
TH1
Definition: rootspy.cxx:268
AthCommonMsg< AlgTool >::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
InDetGlobalMotherMonTool::m_nBinsPhi
int m_nBinsPhi
Number of bins in phi histograms.
Definition: InDetGlobalMotherMonTool.h:568
InDetGlobalMotherMonTool.h
TH2F_LW
Definition: TH2F_LW.h:23