34 m_hist = std::make_unique<TH1F>(
"FileSvcRandomHist",
"Random Numbers", 100, 0, 100 );
41 m_hist->Fill( rand() % 100 );
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
#define DECLARE_COMPONENT(type)
MsgStream & error() const
shortcut for the method msgStream(MSG::ERROR)
This class represents an entry point to all the event specific data.
Base class from which all concrete algorithm classes should be derived.
Algorithm(std::string name, ISvcLocator *svcloc, std::string version=PACKAGE_VERSION)
Constructor.
StatusCode initialize() override
the default (empty) implementation of IStateful::initialize() method
StatusCode finalize() override
the default (empty) implementation of IStateful::finalize() method
SmartIF< IService > service(std::string_view name, const bool createIf=true, const bool quiet=false) const
Return a pointer to the service identified by name (or "type/name")
StatusCode finalize() override
std::shared_ptr< TFile > m_file
std::unique_ptr< TH1F > m_hist
StatusCode initialize() override
StatusCode execute(const EventContext &) const override
HistogramWriterAlg(const std::string &n, ISvcLocator *l)
Gaudi::Interfaces::IFileSvc * m_fileSvc
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
This class is used for returning status codes from appropriate routines.
StatusCode andThen(F &&f, ARGS &&... args) const
Chain code blocks making the execution conditional a success result.
constexpr static const auto SUCCESS
constexpr static const auto FAILURE
Interface for a component that manages file access within Gaudi applications.