ATLAS Offline Software
AthHistogramAlgorithm.h
Go to the documentation of this file.
1 
3 /*
4  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
5 */
6 
11 #ifndef ATHENABASECOMPS_ATHHISTOGRAMALGORITHM_H
12 #define ATHENABASECOMPS_ATHHISTOGRAMALGORITHM_H 1
13 
14 // STL includes
15 #include <string>
16 
17 // Framework includes
20 #include "GaudiKernel/ServiceHandle.h"
21 
22 
23 // Some needed forward declarations
24 class ITHistSvc;
25 
26 
27 
28 
30  : public ::AthAlgorithm,
31  public ::AthHistogramming
32 {
33 
35  // Public methods:
37 public:
38 
40  AthHistogramAlgorithm( const std::string& name, ISvcLocator* pSvcLocator );
41 
43  virtual ~AthHistogramAlgorithm();
44 
45 
51  virtual StatusCode sysInitialize();
52 
53 
54 
56  // Const methods:
58 
63  const ServiceHandle<ITHistSvc>& histSvc() const;
64 
65 
66 
67 
69  // Private methods:
71 private:
74 
75 
76 
78  // Private data:
80 private:
81 
84 
85 
86 
88  std::string m_prefix;
89 
91  std::string m_rootDir;
92 
94  std::string m_histNamePrefix;
95 
97  std::string m_histNamePostfix;
98 
100  std::string m_histTitlePrefix;
101 
103  std::string m_histTitlePostfix;
104 
105 
106 
107 };
108 
109 // I/O operators
111 
112 // For the THistSvc
114 {
115  return m_histSvc;
116 }
117 
118 
119 #endif //> !ATHENABASECOMPS_ATHHISTOGRAMALGORITHM_H
AthHistogramAlgorithm::histSvc
const ServiceHandle< ITHistSvc > & histSvc() const
The standard THistSvc (for writing histograms and TTrees and more to a root file) Returns (kind of) a...
Definition: AthHistogramAlgorithm.h:113
AthHistogramAlgorithm::AthHistogramAlgorithm
AthHistogramAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
Definition: AthHistogramAlgorithm.cxx:31
AthHistogramAlgorithm::m_histSvc
ServiceHandle< ITHistSvc > m_histSvc
Default constructor: AthHistogramAlgorithm();.
Definition: AthHistogramAlgorithm.h:83
AthHistogramAlgorithm::m_prefix
std::string m_prefix
Name of the ROOT output stream (file)
Definition: AthHistogramAlgorithm.h:88
AthHistogramAlgorithm::m_histNamePrefix
std::string m_histNamePrefix
The prefix for the histogram THx name.
Definition: AthHistogramAlgorithm.h:94
AthHistogramming
Definition: AthHistogramming.h:37
AthHistogramAlgorithm::m_histTitlePrefix
std::string m_histTitlePrefix
The prefix for the histogram THx title.
Definition: AthHistogramAlgorithm.h:100
AthHistogramAlgorithm::~AthHistogramAlgorithm
virtual ~AthHistogramAlgorithm()
Destructor:
Definition: AthHistogramAlgorithm.cxx:63
AthAlgorithm.h
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AthHistogramAlgorithm
Definition: AthHistogramAlgorithm.h:32
AthAlgorithm
Definition: AthAlgorithm.h:47
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
AthHistogramming.h
AthHistogramAlgorithm::sysInitialize
virtual StatusCode sysInitialize()
Initialization method invoked by the framework.
Definition: AthHistogramAlgorithm.cxx:75
AthHistogramAlgorithm::m_histNamePostfix
std::string m_histNamePostfix
The postfix for the histogram THx name.
Definition: AthHistogramAlgorithm.h:97
AthHistogramAlgorithm::m_histTitlePostfix
std::string m_histTitlePostfix
The postfix for the histogram THx title.
Definition: AthHistogramAlgorithm.h:103
AthHistogramAlgorithm::m_rootDir
std::string m_rootDir
Name of the ROOT directory.
Definition: AthHistogramAlgorithm.h:91
ServiceHandle< ITHistSvc >