ATLAS Offline Software
AFPSiLayerSummaryProfileBase.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 
10 
11 AFPSiLayerSummaryProfileBase::AFPSiLayerSummaryProfileBase (AFPHitsMonitorTool* parentTool, const ManagedMonitorToolBase::MonGroup& monGrp, const std::string& name, const std::string& title) : m_parentTool(parentTool), m_monGrp (monGrp)
12 {
13  // count number of layers in monitor
14  int totalPlanes = 0;
15  for (const ToolHandle<IAFPSiStationMonitor>& station : *(m_parentTool->stationsMonitors()) )
16  totalPlanes += station->layersMonitors().size();
17 
18  // create TProfile object
19  m_profile = new TProfile(name.data(),
20  title.data(),
21  totalPlanes, - 0.5, totalPlanes + 0.5);
22 
23  // set names of bins
24  TAxis* axis = m_profile->GetXaxis();
25  int binCounter = 1;
26  for (const ToolHandle<IAFPSiStationMonitor>& station : *(m_parentTool->stationsMonitors()))
27  for (const ToolHandle<IAFPSiLayerMonitor>& layer : station->layersMonitors()) {
28  axis->SetBinLabel (binCounter, layer->layerFullName().data());
29  ++binCounter;
30  }
31 }
32 
33 
35 {
37 }
IAFPSiLayerMonitor.h
AFPSiLayerSummaryProfileBase::m_monGrp
ManagedMonitorToolBase::MonGroup m_monGrp
Configuration of the monitoring options.
Definition: AFPSiLayerSummaryProfileBase.h:49
AFPHitsMonitorTool.h
IAFPSiStationMonitor.h
AFPSiLayerSummaryProfileBase::AFPSiLayerSummaryProfileBase
AFPSiLayerSummaryProfileBase(AFPHitsMonitorTool *parentTool, const ManagedMonitorToolBase::MonGroup &monGrp, const std::string &name, const std::string &title)
Creates a TPofile object m_profile and sets bin labels according to monitors in m_parentTool.
Definition: AFPSiLayerSummaryProfileBase.cxx:11
AFPHitsMonitorTool
Main monitoring class for silicon detectors.
Definition: AFPHitsMonitorTool.h:32
yodamerge_tmp.axis
list axis
Definition: yodamerge_tmp.py:241
AFPSiLayerSummaryProfileBase::m_profile
TProfile * m_profile
The summary distribution. TProfile ensures proper merging of mean values.
Definition: AFPSiLayerSummaryProfileBase.h:39
AFPSiLayerSummaryProfileBase.h
ManagedMonitorToolBase::MonGroup
A container of information describing a monitoring object.
Definition: ManagedMonitorToolBase.h:138
python.TrigEgammaMonitorHelper.TProfile
def TProfile(*args, **kwargs)
Definition: TrigEgammaMonitorHelper.py:81
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
covarianceTool.title
title
Definition: covarianceTool.py:542
AFPSiLayerSummaryProfileBase::m_parentTool
AFPHitsMonitorTool * m_parentTool
Pointer to the parent tool in which the distribution is registered.
Definition: AFPSiLayerSummaryProfileBase.h:42
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
AFPSiLayerSummaryProfileBase::book
void book()
Registers the m_profile as a histogram in m_parentTool.
Definition: AFPSiLayerSummaryProfileBase.cxx:34
AFPHitsMonitorTool::stationsMonitors
const ToolHandleArray< IAFPSiStationMonitor > * stationsMonitors() const
Array of tool handles for monitoring each station m_stationsMonitors.
Definition: AFPHitsMonitorTool.h:77
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