ATLAS Offline Software
Loading...
Searching...
No Matches
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):
17class TTree;
18
19namespace 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
Interface providing I/O for a generic auxiliary store.
int getEntry(int getall=0)
Read the values from the TTree entry that was loaded with TTree::LoadTree()
virtual ~TAuxStore()
Destructor.
virtual const std::type_info * getInputType(SG::auxid_t auxid) const override
Get the type of an input object, for getIOType()
virtual void reset() override
Tell the object that all branches will need to be re-read.
virtual bool hasEntryFor(SG::auxid_t auxid) const override
Check if a given variable is available from the input.
virtual bool hasOutput() const override
Check if an output is being written by the object.
void setSplitLevel(int value)
Set the split level of the output branches.
TAuxStore(std::string_view prefix="", bool topStore=true, EStructMode mode=EStructMode::kUndefinedStore, int basketSize=2048, int splitLevel=0)
Constructor.
virtual StatusCode setupInputData(SG::auxid_t auxid) override
Connect a variable to the input.
StatusCode readFrom(::TTree &tree, bool printWarnings=true)
Connect the object to an input TTree.
int splitLevel() const
Get the split level of the output branches.
virtual StatusCode setupOutputData(SG::auxid_t auxid) override
Connect a variable to the output.
virtual void setPrefix(std::string_view prefix) override
Set the object name prefix.
StatusCode writeTo(::TTree &tree)
Connect the object to an output TTree.
virtual StatusCode getEntryFor(SG::auxid_t auxid) override
Load a single variable from the input.
std::unique_ptr< impl > m_impl
Pointer to the internal object.
Definition TAuxStore.h:91
void setBasketSize(int value)
Set the size of the baskets created for the output branches.
int basketSize() const
Get the size of the baskets created for the output branches.
virtual const void * getInputObject(SG::auxid_t auxid) const override
Get a pointer to an input object, as it is in memory, for getIOData()
Common base class for the auxiliary store implementations.
const std::string & prefix() const
Get the currently configured object name prefix.
EStructMode
"Structural" modes of the object
@ kUndefinedStore
The structure mode is not defined.
size_t auxid_t
Identifier for a particular aux data item.
Definition AuxTypes.h:27
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
TChain * tree