ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Control
AthenaMonitoringKernel
src
HistogramFiller
HistogramFactory.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#ifndef AthenaMonitoringKernel_HistogramFiller_HistogramFactory_h
6
#define AthenaMonitoringKernel_HistogramFiller_HistogramFactory_h
7
8
#include "TH1.h"
9
#include "TEfficiency.h"
10
11
#include "GaudiKernel/ServiceHandle.h"
12
#include "GaudiKernel/ITHistSvc.h"
13
14
#include "
AthenaMonitoringKernel/HistogramDef.h
"
15
16
#include "
HistogramException.h
"
17
18
#include <mutex>
19
20
namespace
Monitored
{
26
class
HistogramFactory
{
27
public
:
34
HistogramFactory
(
const
ServiceHandle<ITHistSvc>
& histSvc,
const
std::string& groupName);
38
virtual
~HistogramFactory
() {}
39
48
virtual
TNamed*
create
(
const
HistogramDef
& def);
49
61
std::string
getFullName
(
const
HistogramDef
& def)
const
;
62
66
virtual
void
remove
(
const
HistogramDef
& def);
67
68
static
std::mutex&
globalROOTMutex
() {
return
s_histDirMutex
; }
69
70
private
:
83
template
<
class
H
,
class
HBASE,
typename
... Types>
84
HBASE*
create
(
const
HistogramDef
& def, Types&&... hargs);
92
template
<
class
H>
93
TH1*
create1D
(
const
HistogramDef
& def);
101
template
<
class
H>
102
TH1*
create1DProfile
(
const
HistogramDef
& def);
110
template
<
class
H>
111
TH2*
create2D
(
const
HistogramDef
& def);
119
template
<
class
H>
120
TH2*
create2DProfile
(
const
HistogramDef
& def);
129
TEfficiency*
createEfficiency
(
const
HistogramDef
& def);
138
TTree*
createTree
(
const
HistogramDef
& def);
139
148
static
void
setOpts
(TH1* hist,
const
HistogramDef
& def);
149
156
static
void
setLabels
(TH1* hist,
const
HistogramDef
& def);
157
164
static
void
setLabels
(TAxis* axis,
const
std::vector<std::string>& labels);
165
166
ServiceHandle<ITHistSvc>
m_histSvc
;
167
std::string
m_streamName
;
168
std::string
m_groupName
;
169
170
bool
m_deleteOnRemove
{
true
};
171
mutable
std::mutex
m_createLock
;
172
inline
static
std::mutex
s_histDirMutex
;
173
};
174
}
175
176
#endif
/* AthenaMonitoringKernel_HistogramFiller_HistogramFactory_h */
HistogramDef.h
HistogramException.h
H
#define H(x, y, z)
Definition
MD5.cxx:114
Monitored::HistogramFactory::setLabels
static void setLabels(TH1 *hist, const HistogramDef &def)
Set labels for all axes.
Definition
HistogramFactory.cxx:274
Monitored::HistogramFactory::getFullName
std::string getFullName(const HistogramDef &def) const
Invent path name.
Definition
HistogramFactory.cxx:292
Monitored::HistogramFactory::createEfficiency
TEfficiency * createEfficiency(const HistogramDef &def)
Create and register efficiency graph.
Definition
HistogramFactory.cxx:156
Monitored::HistogramFactory::m_deleteOnRemove
bool m_deleteOnRemove
delete histogram during remove
Definition
HistogramFactory.h:170
Monitored::HistogramFactory::s_histDirMutex
static std::mutex s_histDirMutex
Definition
HistogramFactory.h:172
Monitored::HistogramFactory::create
virtual TNamed * create(const HistogramDef &def)
Book and register ROOT object for given definition.
Definition
HistogramFactory.cxx:58
Monitored::HistogramFactory::globalROOTMutex
static std::mutex & globalROOTMutex()
Definition
HistogramFactory.h:68
Monitored::HistogramFactory::createTree
TTree * createTree(const HistogramDef &def)
Create and register tree.
Definition
HistogramFactory.cxx:239
Monitored::HistogramFactory::create2D
TH2 * create2D(const HistogramDef &def)
Helper for generic 'create' method for 2D histograms.
Definition
HistogramFactory.cxx:122
Monitored::HistogramFactory::m_createLock
std::mutex m_createLock
Definition
HistogramFactory.h:171
Monitored::HistogramFactory::m_histSvc
ServiceHandle< ITHistSvc > m_histSvc
Definition
HistogramFactory.h:166
Monitored::HistogramFactory::create1DProfile
TH1 * create1DProfile(const HistogramDef &def)
Helper for generic 'create' method for 1DProfile histograms.
Definition
HistogramFactory.cxx:111
Monitored::HistogramFactory::create1D
TH1 * create1D(const HistogramDef &def)
Helper for generic 'create' method for 1D histograms.
Definition
HistogramFactory.cxx:102
Monitored::HistogramFactory::m_groupName
std::string m_groupName
defines location of group of histograms
Definition
HistogramFactory.h:168
Monitored::HistogramFactory::m_streamName
std::string m_streamName
defines the stream for THistSvc
Definition
HistogramFactory.h:167
Monitored::HistogramFactory::remove
virtual void remove(const HistogramDef &def)
Removes histogram (used to get rid of old LB tagged histograms).
Definition
HistogramFactory.cxx:314
Monitored::HistogramFactory::setOpts
static void setOpts(TH1 *hist, const HistogramDef &def)
Setup various histogram options.
Definition
HistogramFactory.cxx:265
Monitored::HistogramFactory::HistogramFactory
HistogramFactory(const ServiceHandle< ITHistSvc > &histSvc, const std::string &groupName)
Default constructor.
Definition
HistogramFactory.cxx:19
Monitored::HistogramFactory::create2DProfile
TH2 * create2DProfile(const HistogramDef &def)
Helper for generic 'create' method for 2DProfile histograms.
Definition
HistogramFactory.cxx:139
Monitored::HistogramFactory::~HistogramFactory
virtual ~HistogramFactory()
Virtual destructor.
Definition
HistogramFactory.h:38
ServiceHandle
Definition
ClusterMakerTool.h:36
Monitored
Generic monitoring tool for athena components.
Definition
GenericMonitoringTool.h:28
Monitored::HistogramDef
the internal class used to keep parsed Filler properties
Definition
HistogramDef.h:15
Generated on
for ATLAS Offline Software by
1.17.0