ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
RAuxStore.h
Go to the documentation of this file.
1 // Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
2 #ifndef XAODROOTACCESS_RAUXSTORE_H
3 #define XAODROOTACCESS_RAUXSTORE_H
4 
5 // Framework include(s).
8 
9 // Local include(s).
11 
12 // ROOT include(s).
13 #include <ROOT/REntry.hxx>
14 #include <ROOT/RNTupleModel.hxx>
15 #include <ROOT/RNTupleReader.hxx>
16 #include <ROOT/RNTupleWriter.hxx>
17 
18 // System include(s).
19 #include <cstdint>
20 #include <memory>
21 #include <string_view>
22 
23 namespace xAOD {
24 
32 
33  public:
40 
42  RAuxStore(std::string_view prefix = "", bool topStore = true,
45  virtual ~RAuxStore();
46 
48  virtual void setPrefix(std::string_view prefix) override;
49 
54 
56  StatusCode getEntry(std::int64_t entry, int getall = 0);
59 
62 
64  virtual void reset() override;
65 
66  private:
68  virtual bool hasEntryFor(SG::auxid_t auxid) const override;
70  virtual StatusCode getEntryFor(SG::auxid_t auxid) override;
72  virtual bool hasOutput() const override;
73 
75  virtual StatusCode setupInputData(SG::auxid_t auxid) override;
77  virtual StatusCode setupOutputData(SG::auxid_t auxid) override;
78 
80  virtual const void* getInputObject(SG::auxid_t auxid) const override;
82  virtual const std::type_info* getInputType(SG::auxid_t auxid) const override;
83 
85 
87  struct impl;
89  std::unique_ptr<impl> m_impl;
90 
91 }; // class RAuxStore
92 } // namespace xAOD
93 
94 #endif // XAODROOTACCESS_RAUXSTORE_H
xAOD::RAuxStore::hasOutput
virtual bool hasOutput() const override
Check if an output is being written by the object.
Definition: RAuxStore.cxx:790
xAOD::details::AuxStoreBase::prefix
const std::string & prefix() const
Get the currently configured object name prefix.
Definition: AuxStoreBase.cxx:38
xAOD::RAuxStore::setPrefix
virtual void setPrefix(std::string_view prefix) override
Set the object name prefix.
Definition: RAuxStore.cxx:629
xAOD::details::AuxStoreBase::EStructMode
EStructMode
"Structural" modes of the object
Definition: AuxStoreBase.h:30
xAOD::RAuxStore::~RAuxStore
virtual ~RAuxStore()
Destructor.
xAOD::RAuxStore::getInputObject
virtual const void * getInputObject(SG::auxid_t auxid) const override
Get a pointer to an input object, as it is in memory, for getIOData()
Definition: RAuxStore.cxx:1147
xAOD::RAuxStore
"ROOT @c RNTuple implementation" of IAuxStore
Definition: RAuxStore.h:31
xAOD::RAuxStore::RNTupleReader
ROOT::Experimental::RNTupleReader RNTupleReader
The RNTuple reader type.
Definition: RAuxStore.h:35
xAOD
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Definition: ICaloAffectedTool.h:24
xAOD::RAuxStore::getEntryFor
virtual StatusCode getEntryFor(SG::auxid_t auxid) override
Load a single variable from the input.
Definition: RAuxStore.cxx:780
xAOD::RAuxStore::getEntry
StatusCode getEntry(std::int64_t entry, int getall=0)
Get entry from the input RNTuple.
Definition: RAuxStore.cxx:691
xAOD::RAuxStore::setupOutputData
virtual StatusCode setupOutputData(SG::auxid_t auxid) override
Connect a variable to the output.
Definition: RAuxStore.cxx:1010
xAOD::RAuxStore::commitTo
StatusCode commitTo(REntry &entry)
Commit a new entry to the output RNTuple.
Definition: RAuxStore.cxx:740
xAOD::details::AuxStoreBase
Common base class for the auxiliary store implementations.
Definition: AuxStoreBase.h:26
SG::auxid_t
size_t auxid_t
Identifier for a particular aux data item.
Definition: AuxTypes.h:27
xAOD::RAuxStore::hasEntryFor
virtual bool hasEntryFor(SG::auxid_t auxid) const override
Check if a given variable is available from the input.
Definition: RAuxStore.cxx:774
AuxStoreBase.h
xAOD::RAuxStore::writeTo
StatusCode writeTo(RNTupleWriter &writer)
Add the variables of the store to an output RNTuple.
Definition: RAuxStore.cxx:669
IAuxStoreIO.h
Interface providing I/O for a generic auxiliary store.
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
pool::RootCollection::RNTupleWriter
ROOT::Experimental::RNTupleWriter RNTupleWriter
Definition: RNTCollection.h:39
Preparation.mode
mode
Definition: Preparation.py:107
xAOD::RAuxStore::getInputType
virtual const std::type_info * getInputType(SG::auxid_t auxid) const override
Get the type of an input object, for getIOType()
Definition: RAuxStore.cxx:1155
StatusCode.h
GetAllXsec.entry
list entry
Definition: GetAllXsec.py:132
xAOD::RAuxStore::setupInputData
virtual StatusCode setupInputData(SG::auxid_t auxid) override
Connect a variable to the input.
Definition: RAuxStore.cxx:803
xAOD::RAuxStore::REntry
ROOT::Experimental::REntry REntry
The RNTuple entry type.
Definition: RAuxStore.h:39
impl
Definition: CaloGPUClusterAndCellDataMonitorOptions.h:46
xAOD::RAuxStore::RNTupleWriter
ROOT::Experimental::RNTupleWriter RNTupleWriter
The RNTuple writer type.
Definition: RAuxStore.h:37
xAOD::RAuxStore::readFrom
StatusCode readFrom(RNTupleReader &reader)
Connect the object to an input RNTuple.
Definition: RAuxStore.cxx:643
RootStorageSvc::REntry
ROOT::Experimental::REntry REntry
Definition: RNTupleWriterHelper.h:24
RNTupleReader
ROOT::Experimental::RNTupleReader RNTupleReader
Definition: RNTupleAuxDynStore.h:19
xAOD::RAuxStore::reset
virtual void reset() override
Tell the object that all branches will need to be re-read.
Definition: RAuxStore.cxx:762
xAOD::RAuxStore::RAuxStore
RAuxStore(std::string_view prefix="", bool topStore=true, EStructMode mode=EStructMode::kUndefinedStore)
Constructor.
Definition: RAuxStore.cxx:620
xAOD::details::AuxStoreBase::EStructMode::kUndefinedStore
@ kUndefinedStore
The structure mode is not defined.
xAOD::RAuxStore::m_impl
std::unique_ptr< impl > m_impl
Pointer to the internal object.
Definition: RAuxStore.h:87
collisions.reader
reader
read the goodrunslist xml file(s)
Definition: collisions.py:22
example.writer
writer
show summary of content
Definition: example.py:36