|
ATLAS Offline Software
|
Go to the documentation of this file.
14 #include "GaudiKernel/ITHistSvc.h"
28 TrigConfMessaging(
"AthenaL1TopoHistSvc"),
42 auto colPos =
histName.find_first_of(
'/');
45 h->SetName(
histName.substr(colPos+1).c_str());
46 std::unique_ptr<TH1> uhist(
h);
48 if( ! m_histSvc->regShared(
fullName, std::move(uhist),
lh).isSuccess() ) {
52 { m_hist1D[
key] =
lh; }
62 auto colPos =
histName.find_first_of(
'/');
65 h->SetName(
histName.substr(colPos+1).c_str());
66 std::unique_ptr<TH2> uhist(
h);
68 if( ! m_histSvc->regShared(
fullName, std::move(uhist),
lh).isSuccess() ) {
72 { m_hist2D[
key] =
lh; }
81 if ( ! m_histSvc->getHist(
fullName,
h).isSuccess() )
90 if(m_hist1D.find(
key) == m_hist1D.end()) {
93 else { m_hist1D[
key]->Fill(
x); }
98 if(m_hist2D.find(
key) == m_hist2D.end()) {
102 { m_hist2D[
key]->Fill(
x,
y); }
106 auto colPos = baseDir.find_last_of(
':');
107 if( colPos != string::npos ) {
108 m_baseDir = baseDir.substr(colPos+1);
112 if(
'/' != m_baseDir[m_baseDir.size()-1] ) {
120 string m_baseDir {
""};
163 m_impl->setBaseDir( baseDir );
Property holding a SG store/key/clid from which a ReadHandle is made.
std::unordered_map< std::string, LockedHandle< TH1 > > m_hist1D ATLAS_THREAD_SAFE
void registerHist(TH1 *h)
virtual void fillHist1D(const std::string &histName, double x) override
virtual void save() override
void setBaseDir(const std::string &baseDir)
~AthenaL1TopoHistSvcImpl()
std::unordered_map< std::string, LockedHandle< TH2 > > m_hist2D ATLAS_THREAD_SAFE
void fillHist2D(const std::string &histName, double x, double y)
virtual TH1 * findHist(const std::string &histName) override
#define TRG_MSG_WARNING(x)
TH1 * findHist(const std::string &histName)
Class to provide easy access to TrigConf::MsgStream for TrigConf classes.
virtual ~AthenaL1TopoHistSvc()
virtual void setBaseDir(const std::string &baseDir) override
ServiceHandle< ITHistSvc > m_histSvc
virtual void fillHist2D(const std::string &histName, double x, double y) override
AthenaL1TopoHistSvc(ServiceHandle< ITHistSvc > histSvc)
Messaging base class for TrigConf code shared with Lvl1 ( AthMessaging)
std::unique_ptr< AthenaL1TopoHistSvcImpl > m_impl
virtual void registerHist(TH1 *h) override
AthenaL1TopoHistSvcImpl(ServiceHandle< ITHistSvc > histSvc)
void registerHist(TH2 *h)
void fillHist1D(const std::string &histName, double x)