|
ATLAS Offline Software
|
Go to the documentation of this file.
20 #include "Gaudi/Property.h"
21 #include "GaudiKernel/ITHistSvc.h"
32 ISvcLocator* pSvcLocator ) :
35 m_histSvc (
"THistSvc/THistSvc",
name )
43 "Handle to a THistSvc instance: it will be used to write "
44 "ROOT objects to ROOT files" );
47 declareProperty(
"RootStreamName",
m_prefix =
"/ANALYSIS",
"Name of the output ROOT stream (file) that the THistSvc uses");
49 "Name of the ROOT directory inside the ROOT file where the histograms will go");
80 if ( Gaudi::StateMachine::INITIALIZED <= FSMState() )
return StatusCode::SUCCESS;
83 bindPropertiesTo( serviceLocator()->getOptsSvc() );
87 if ( !isEnabled( ) )
return StatusCode::SUCCESS;
def retrieve(aClass, aKey=None)
const ServiceHandle< ITHistSvc > & histSvc() const
The standard THistSvc (for writing histograms and TTrees and more to a root file) Returns (kind of) a...
AthHistogramAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
ServiceHandle< ITHistSvc > m_histSvc
Default constructor: AthHistogramAlgorithm();.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
std::string m_prefix
Name of the ROOT output stream (file)
std::string m_histNamePrefix
The prefix for the histogram THx name.
std::string m_histTitlePrefix
The prefix for the histogram THx title.
virtual ~AthHistogramAlgorithm()
Destructor:
virtual StatusCode sysInitialize() override
Override sysInitialize.
::StatusCode StatusCode
StatusCode definition for legacy code.
StatusCode configAthHistogramming(const ServiceHandle< ITHistSvc > &histSvc, const std::string &prefix, const std::string &rootDir, const std::string &histNamePrefix, const std::string &histNamePostfix, const std::string &histTitlePrefix, const std::string &histTitlePostfix)
To be called by the derived classes to fill the internal configuration.
virtual StatusCode sysInitialize()
Initialization method invoked by the framework.
std::string m_histNamePostfix
The postfix for the histogram THx name.
std::string m_histTitlePostfix
The postfix for the histogram THx title.
std::string m_rootDir
Name of the ROOT directory.