ATLAS Offline Software
Loading...
Searching...
No Matches
REvent.h
Go to the documentation of this file.
1// Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
2#ifndef XAODROOTACCESS_REVENT_H
3#define XAODROOTACCESS_REVENT_H
4
5// Local include(s).
7
8// ROOT include(s).
9#include <ROOT/RNTupleReader.hxx>
10
11// System include(s).
12#include <memory>
13#include <string_view>
14
15namespace xAOD::Experimental {
16
17// Forward declaration(s).
18class RObjectManager;
19
27
28class REvent : public Event {
29
30 public:
32 REvent();
33
35 virtual ~REvent();
36
39
41 StatusCode readFrom(std::string_view fileName);
42
44
47
49 ::Long64_t getEntries() const;
51 ::Int_t getEntry(::Long64_t entry, ::Int_t getall = 0);
52
54
55 private:
58
60 bool hasInput() const override;
62 bool hasOutput() const override;
63
65 StatusCode getNames(const std::string& targetClassName,
66 std::vector<std::string>& vkeys,
67 bool metadata) const override;
68
70 StatusCode connectObject(const std::string& key, bool silent) override;
72 StatusCode connectMetaObject(const std::string& key, bool silent) override;
74 StatusCode connectAux(const std::string& prefix, bool standalone) override;
77 StatusCode connectMetaAux(const std::string& prefix,
78 bool standalone) override;
79
81 StatusCode setAuxStore(const std::string& key, Details::IObjectManager& mgr,
82 bool metadata) override;
83
85 StatusCode record(void* obj, const std::string& typeName,
86 const std::string& key, bool overwrite, bool metadata,
87 bool isOwner) override;
89 StatusCode recordAux(TVirtualManager& mgr, const std::string& key,
90 bool metadata) override;
91
93
95 StatusCode initStats();
96
98 StatusCode setUpDynamicStore(RObjectManager& mgr,
99 ROOT::RNTupleReader& ntupleReader);
100
102 std::unique_ptr<ROOT::RNTupleReader> m_eventReader;
106 std::unique_ptr<ROOT::RNTupleReader> m_metaReader;
107
109 ::Long64_t m_entry{};
110
111}; // class REvent
112
113} // namespace xAOD::Experimental
114
115#endif // XAODROOTACCESS_REVENT_H
Manager for EDM objects created by ROOT.
Event(std::string_view name)
Constructor with a name.
Definition EventCore.cxx:27
bool m_inputNTupleIsMissing
Whether the input has an event RNTuple or not.
Definition REvent.h:104
StatusCode setUpDynamicStore(RObjectManager &mgr, ROOT::RNTupleReader &ntupleReader)
event uses RNTupleReader:
Definition REvent.cxx:960
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.
Definition REvent.cxx:848
std::unique_ptr< ROOT::RNTupleReader > m_eventReader
The main event data reader.
Definition REvent.h:102
StatusCode connectMetaAux(const std::string &prefix, bool standalone) override
Function setting up access to a set of auxiliary branches for a metadata object.
Definition REvent.cxx:665
StatusCode readFrom(std::string_view fileName)
Set up the reading of an input file.
Definition REvent.cxx:90
std::unique_ptr< ROOT::RNTupleReader > m_metaReader
The metadata reader.
Definition REvent.h:106
StatusCode recordAux(TVirtualManager &mgr, const std::string &key, bool metadata) override
Record an auxiliary store into a connected output file.
Definition REvent.cxx:855
::Long64_t getEntries() const
Get how many entries are available from the current input file(s)
Definition REvent.cxx:264
StatusCode setAuxStore(const std::string &key, Details::IObjectManager &mgr, bool metadata) override
Function connecting a DV object to its auxiliary store.
Definition REvent.cxx:740
bool hasOutput() const override
Check if an output file is connected to the object.
Definition REvent.cxx:334
::Int_t getEntry(::Long64_t entry, ::Int_t getall=0)
Function loading a given entry of the input TTree.
Definition REvent.cxx:290
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.
Definition REvent.cxx:339
StatusCode connectObject(const std::string &key, bool silent) override
Function setting up access to a particular object.
Definition REvent.cxx:364
::Long64_t m_entry
The entry to look at from the input tree.
Definition REvent.h:109
REvent()
Default constructor.
Definition REvent.cxx:73
virtual ~REvent()
Destructor.
Definition REvent.cxx:75
StatusCode connectAux(const std::string &prefix, bool standalone) override
Function setting up access to a set of auxiliary branches.
Definition REvent.cxx:593
StatusCode initStats()
Function to initialise the statistics for all Tree content.
Definition REvent.cxx:867
StatusCode connectMetaObject(const std::string &key, bool silent) override
Function setting up access to a particular metadata object.
Definition REvent.cxx:502
bool hasInput() const override
Check if an input file is connected to the object.
Definition REvent.cxx:329
Manager for EDM objects created by ROOT.
Interface class for the "manager classes".