Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
TAuxStore.h
Go to the documentation of this file.
1 // Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
2 #ifndef XAODROOTACCESS_TAUXSTORE_H
3 #define XAODROOTACCESS_TAUXSTORE_H
4 
5 // Framework include(s).
8 
9 // Local include(s).
11 
12 // System include(s).
13 #include <memory>
14 #include <string_view>
15 
16 // Forward declaration(s):
17 class TTree;
18 
19 namespace xAOD {
20 
31 
32  public:
34  TAuxStore(std::string_view prefix = "", bool topStore = true,
36  int basketSize = 2048, int splitLevel = 0);
38  virtual ~TAuxStore();
39 
41  virtual void setPrefix(std::string_view prefix) override;
42 
44  int basketSize() const;
46  void setBasketSize(int value);
47 
49  int splitLevel() const;
51  void setSplitLevel(int value);
52 
54  StatusCode readFrom(::TTree& tree, bool printWarnings = true);
56  StatusCode writeTo(::TTree& tree);
57 
60  int getEntry(int getall = 0);
61 
64 
66  virtual void reset() override;
67 
68  private:
70  virtual bool hasEntryFor(SG::auxid_t auxid) const override;
72  virtual StatusCode getEntryFor(SG::auxid_t auxid) override;
74  virtual bool hasOutput() const override;
75 
77  virtual StatusCode setupInputData(SG::auxid_t auxid) override;
79  virtual StatusCode setupOutputData(SG::auxid_t auxid) override;
80 
82  virtual const void* getInputObject(SG::auxid_t auxid) const override;
84  virtual const std::type_info* getInputType(SG::auxid_t auxid) const override;
85 
87 
89  struct impl;
91  std::unique_ptr<impl> m_impl;
92 
93 }; // class TAuxStore
94 
95 } // namespace xAOD
96 
97 #endif // XAODROOTACCESS_TAUXSTORE_H
xAOD::details::AuxStoreBase::prefix
const std::string & prefix() const
Get the currently configured object name prefix.
Definition: AuxStoreBase.cxx:38
xAOD::TAuxStore::setupOutputData
virtual StatusCode setupOutputData(SG::auxid_t auxid) override
Connect a variable to the output.
Definition: TAuxStore.cxx:1286
xAOD::TAuxStore::setupInputData
virtual StatusCode setupInputData(SG::auxid_t auxid) override
Connect a variable to the input.
Definition: TAuxStore.cxx:1026
xAOD::TAuxStore::getEntry
int getEntry(int getall=0)
Read the values from the TTree entry that was loaded with TTree::LoadTree()
Definition: TAuxStore.cxx:931
tree
TChain * tree
Definition: tile_monitor.h:30
xAOD::details::AuxStoreBase::EStructMode
EStructMode
"Structural" modes of the object
Definition: AuxStoreBase.h:30
xAOD::TAuxStore
"ROOT @c TTree implementation" of IAuxStore
Definition: TAuxStore.h:30
athena.value
value
Definition: athena.py:124
xAOD
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Definition: ICaloAffectedTool.h:24
xAOD::TAuxStore::hasOutput
virtual bool hasOutput() const override
Check if an output is being written by the object.
Definition: TAuxStore.cxx:1010
xAOD::TAuxStore::reset
virtual void reset() override
Tell the object that all branches will need to be re-read.
Definition: TAuxStore.cxx:977
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::TAuxStore::writeTo
StatusCode writeTo(::TTree &tree)
Connect the object to an output TTree.
Definition: TAuxStore.cxx:909
AuxStoreBase.h
xAOD::TAuxStore::readFrom
StatusCode readFrom(::TTree &tree, bool printWarnings=true)
Connect the object to an input TTree.
Definition: TAuxStore.cxx:864
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
xAOD::TAuxStore::setPrefix
virtual void setPrefix(std::string_view prefix) override
Set the object name prefix.
Definition: TAuxStore.cxx:828
xAOD::TAuxStore::TAuxStore
TAuxStore(std::string_view prefix="", bool topStore=true, EStructMode mode=EStructMode::kUndefinedStore, int basketSize=2048, int splitLevel=0)
Constructor.
Definition: TAuxStore.cxx:818
Preparation.mode
mode
Definition: Preparation.py:107
StatusCode.h
xAOD::TAuxStore::getEntryFor
virtual StatusCode getEntryFor(SG::auxid_t auxid) override
Load a single variable from the input.
Definition: TAuxStore.cxx:995
xAOD::TAuxStore::getInputType
virtual const std::type_info * getInputType(SG::auxid_t auxid) const override
Get the type of an input object, for getIOType()
Definition: TAuxStore.cxx:1531
xAOD::TAuxStore::setBasketSize
void setBasketSize(int value)
Set the size of the baskets created for the output branches.
Definition: TAuxStore.cxx:841
impl
Definition: CaloGPUClusterAndCellDataMonitorOptions.h:46
xAOD::TAuxStore::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: TAuxStore.cxx:1523
xAOD::TAuxStore::m_impl
std::unique_ptr< impl > m_impl
Pointer to the internal object.
Definition: TAuxStore.h:89
xAOD::TAuxStore::setSplitLevel
void setSplitLevel(int value)
Set the split level of the output branches.
Definition: TAuxStore.cxx:853
xAOD::details::AuxStoreBase::EStructMode::kUndefinedStore
@ kUndefinedStore
The structure mode is not defined.
xAOD::TAuxStore::~TAuxStore
virtual ~TAuxStore()
Destructor.
xAOD::TAuxStore::splitLevel
int splitLevel() const
Get the split level of the output branches.
Definition: TAuxStore.cxx:847
xAOD::TAuxStore::hasEntryFor
virtual bool hasEntryFor(SG::auxid_t auxid) const override
Check if a given variable is available from the input.
Definition: TAuxStore.cxx:989
xAOD::TAuxStore::basketSize
int basketSize() const
Get the size of the baskets created for the output branches.
Definition: TAuxStore.cxx:835