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_tree = std::make_unique<TTree>(
"FileSvcNTuple",
"An example NTuple" ).release();
StatusCode andThen(F &&f, ARGS &&... args) const
Chain code blocks making the execution conditional a success result.
StatusCode execute(const EventContext &) const override
Gaudi::Interfaces::IFileSvc * m_fileSvc
StatusCode initialize() override
the default (empty) implementation of IStateful::initialize() method
StatusCode finalize() override
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)
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
std::shared_ptr< TFile > m_file
StatusCode initialize() override
NTupleWriterAlg(const std::string &n, ISvcLocator *l)