2#ifndef XAODROOTACCESS_REVENT_H
3#define XAODROOTACCESS_REVENT_H
9#include <ROOT/RNTupleReader.hxx>
10#include <ROOT/RNTupleWriter.hxx>
11#include <ROOT/REntry.hxx>
47 StatusCode
readFrom(TFile& inFile)
override;
51 StatusCode
readFrom(std::string_view fileName);
67 ::Int_t
getEntry(::Long64_t entry, ::Int_t getall = 0)
override;
73 ::Int_t
fill()
override;
88 StatusCode
getNames(
const std::string& targetClassName,
89 std::vector<std::string>& vkeys,
90 bool metadata)
const override;
93 StatusCode
connectObject(
const std::string& key,
bool silent)
override;
97 StatusCode
connectAux(
const std::string& prefix,
bool standalone)
override;
101 bool standalone)
override;
105 bool metadata)
override;
108 StatusCode
record(
void* obj,
const std::string& typeName,
109 const std::string& key,
bool overwrite,
bool metadata,
110 bool isOwner)
override;
113 bool metadata)
override;
128 ROOT::RNTupleReader& ntupleReader);
Manager for EDM objects created by ROOT.
Event(std::string_view name)
Constructor with a name.
StatusCode record(T *obj, const std::string &key)
Add an output object to the event.
StatusCode finishWritingTo(TFile &file) override
Finish writing to an output file.
bool m_inputNTupleIsMissing
Whether the input has an event RNTuple or not.
StatusCode addField(const std::string &key, const TVirtualManager &mgr)
Add field to RNTuple model given the StoreGate key and output object manager.
StatusCode putAux(TVirtualManager &mgr, ::Bool_t metadata=kFALSE)
Method saving the dynamically created auxiliary properties.
::Int_t fill() override
Method filling one event into the output.
StatusCode setUpDynamicStore(RObjectManager &mgr, ROOT::RNTupleReader &ntupleReader)
event uses RNTupleReader:
std::unique_ptr< ROOT::RNTupleWriter > m_eventWriter
The main event writer: RNTupleWeader.
StatusCode record(void *obj, const std::string &typeName, const std::string &key, bool overwrite, bool metadata, bool isOwner) override
Record an object into a connected output file.
std::unique_ptr< ROOT::RNTupleReader > m_eventReader
The main event data reader.
StatusCode connectMetaAux(const std::string &prefix, bool standalone) override
Function setting up access to a set of auxiliary branches for a metadata object.
::Int_t getEntry(::Long64_t entry, ::Int_t getall=0) override
Function loading a given entry of the input RNTuple.
std::unique_ptr< ROOT::RNTupleModel > m_model
The RNTuple model used for event fields.
StatusCode writeTo(TFile &file) override
Connect the object to an output file.
::TFile * m_outputFile
The output file for writing.
std::unique_ptr< ROOT::RNTupleReader > m_metaReader
The metadata reader.
StatusCode recordAux(TVirtualManager &mgr, const std::string &key, bool metadata) override
Record an auxiliary store into a connected output file.
StatusCode readFrom(TFile &inFile) override
Set up the reading of an input file from TFile This method implements the interface from Event.
StatusCode setAuxStore(const std::string &key, Details::IObjectManager &mgr, bool metadata) override
Function connecting a DV object to its auxiliary store.
::Long64_t getEntries() const override
Get how many entries are available from the current input file(s)
bool hasOutput() const override
Check if an output file is connected to the object.
StatusCode getNames(const std::string &targetClassName, std::vector< std::string > &vkeys, bool metadata) const override
Function determining the list keys associated with a type name.
StatusCode connectObject(const std::string &key, bool silent) override
Function setting up access to a particular object.
::Long64_t m_entry
The entry to look at from the input.
REvent()
Default constructor.
virtual ~REvent()
Destructor.
StatusCode connectAux(const std::string &prefix, bool standalone) override
Function setting up access to a set of auxiliary branches.
StatusCode initStats()
Function to initialise the statistics for all RNTuple content.
StatusCode connectMetaObject(const std::string &key, bool silent) override
Function setting up access to a particular metadata object.
bool hasInput() const override
Check if an input file is connected to the object.
Manager for EDM objects created by ROOT.
Interface class for the "manager classes".