Go to the documentation of this file.
22 m_fileSvc = service<Gaudi::Interfaces::IFileSvc>(
"FileSvc" );
24 error() <<
"Failed to retrieve FileSvc" <<
endmsg;
30 error() <<
"Failed to retrieve TFile" <<
endmsg;
34 m_hist = std::make_unique<TH1F>(
"FileSvcRandomHist",
"Random Numbers", 100, 0, 100 );
41 m_hist->Fill( rand() % 100 );
StatusCode initialize() override
StatusCode andThen(F &&f, ARGS &&... args) const
Chain code blocks making the execution conditional a success result.
StatusCode initialize() override
the default (empty) implementation of IStateful::initialize() method
StatusCode execute(const EventContext &) const override
Gaudi::Interfaces::IFileSvc * m_fileSvc
Base class from which all concrete algorithm classes should be derived.
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
StatusCode finalize() override
the default (empty) implementation of IStateful::finalize() method
constexpr static const auto SUCCESS
#define DECLARE_COMPONENT(type)
HistogramWriterAlg(const std::string &n, ISvcLocator *l)
std::unique_ptr< TH1F > m_hist
virtual std::shared_ptr< TFile > getFile(const std::string &identifier)=0
Interface for a component that manages file access within Gaudi applications.
constexpr static const auto FAILURE
StatusCode finalize() override
std::shared_ptr< TFile > m_file