|
ATLAS Offline Software
|
Go to the documentation of this file.
5 #ifndef XAODROOTACCESS_TAUXSTORE_H
6 #define XAODROOTACCESS_TAUXSTORE_H
28 class AuxStoreInternal;
76 const char*
prefix()
const;
123 size_t capacity )
override;
129 virtual void lock()
override;
138 virtual size_t size()
const override;
150 size_t capacity )
override;
160 virtual void shift(
size_t pos, ptrdiff_t offs )
override;
200 const std::type_info*
auxBranchType( ::TBranch*
br,
const char* auxName,
201 ::Bool_t staticBranch,
202 std::string* expectedClassName =
nullptr );
205 ::Bool_t staticBranch );
246 std::vector< SG::IAuxTypeVector* >
m_vecs;
258 typedef AthContainers_detail::lock_guard< mutex_t >
guard_t;
271 TBranchHandle( ::Bool_t staticBranch, ::Bool_t primitiveBranch,
272 const std::type_info* ti,
void*
obj,
286 const std::type_info*
typeInfo()
const;
324 #endif // XAODROOTACCESS_TAUXSTORE_H
void setTopStore(Bool_t value=kTRUE)
Set whether the object should behave as a "top store" or not.
std::vector< bool > m_missingBranches
Mark branches we've found to be missing.
virtual auxid_set_t getSelectedAuxIDs() const override
Get the IDs of the selected aux variables.
const std::type_info * typeInfo() const
Get the type of the variable in memory.
virtual const auxid_set_t & getAuxIDs() const override
Get the types(names) of variables handled by this container.
void reset()
Tell the object that the branch contents need to be re-read.
virtual bool isDecoration(auxid_t auxid) const override
Test if a variable is a decoration.
::Long64_t m_entry
The last entry that was loaded for this branch.
Int_t basketSize() const
Get the size of the baskets created for the output branches.
const std::string * m_prefix
Pointer to the m_prefix string of the parent object.
StatusCode readFrom(::TTree *tree, ::Bool_t printWarnings=kTRUE)
Connect the object to an input TTree.
std::vector< ::Bool_t > m_isDecoration
Flags items as decorations.
std::string m_prefix
Static prefix for the branch names.
SG::auxid_set_t auxid_set_t
Convenience type declaration.
::Bool_t m_primitive
Is this a primitive variable?
Bool_t isTopStore() const
Check if the object is a "top store", or not.
::Int_t m_splitLevel
The split level for the output branches.
::TBranch * m_branch
The branch that this object is handling.
auxid_set_t m_auxIDs
Internal list of variable IDs handled currently by the object.
void setBasketSize(Int_t value)
Set the size of the baskets created for the output branches.
virtual bool resize(size_t size) override
Resize the arrays to a given size.
StatusCode setStructMode(EStructMode mode)
Set the structure mode of the object to a new value.
"ROOT implementation" of IAuxStore
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
EStructMode
"Structural" modes of the object
::Int_t m_basketSize
The basket size for the output branches.
::Bool_t m_locked
Is this container locked?
StatusCode scanInputTree()
Scan the input TTree for auxiliary branches.
Interface providing I/O for a generic auxiliary store.
virtual const SG::IAuxTypeVector * getVector(SG::auxid_t auxid) const override
Return vector interface for one aux data item.
::TTree * m_inTree
The TTree being read from.
std::string m_dynPrefix
Dynamic prefix for the branch names.
virtual bool insertMove(size_t pos, IAuxStore &other, const SG::auxid_set_t &ignore) override
Insert contents of another store via move.
AthContainers_detail::lock_guard< mutex_t > guard_t
Guard type for multithreaded synchronisation.
void reset()
Tell the object that all branches will need to be re-read.
size_t auxid_t
Identifier for a particular aux data item.
const std::type_info * auxBranchType(::TBranch *br, const char *auxName, ::Bool_t staticBranch, std::string *expectedClassName=nullptr)
Find the type_info to use as the aux type for a given branch.
virtual void lock() override
Lock the object, and don't let decorations be added.
::TTree * m_outTree
The TTree being written to.
virtual const auxid_set_t & getWritableAuxIDs() const override
Return a set of writable data identifiers.
::Bool_t isRegisteredType(auxid_t auxid)
Check if the auxiliary variable has a registered type.
virtual const auxid_set_t & getDecorIDs() const override
Get the types(names) of decorations handled by this container.
Interface providing I/O for a generic auxiliary store.
::StatusCode StatusCode
StatusCode definition for legacy code.
virtual const std::type_info * getIOType(auxid_t auxid) const override
Return the type of the data to be stored for one aux data item.
@ kObjectStore
The object describes a single object.
StatusCode writeTo(::TTree *tree)
Connect the object to an output TTree.
::Bool_t isAuxIDSelected(auxid_t auxid) const
Check if this auxiliary variable needs to go to the output.
virtual void reserve(size_t size) override
Reserve a given size for the arrays.
::Bool_t isContainerBranch(TBranch *br, auxid_t auxid)
Check if a branch describes a container or a single object.
mutex_t m_mutex1
Mutexes object used for multithreaded synchronisation.
Int_t splitLevel() const
Get the split level of the output branches.
virtual void shift(size_t pos, ptrdiff_t offs) override
Shift the contents of the stored arrays.
SG::AuxStoreInternal * m_transientStore
Store for the in-memory-only variables.
void * m_object
The pointer to the object in memory.
AthContainers_detail::mutex mutex_t
Mutex type for multithread synchronization.
virtual const void * getData(auxid_t auxid) const override
Get a pointer to a given array.
Int_t getEntry(Int_t getall=0)
Read the values from the TTree entry that was loaded with TTree::LoadTree()
StatusCode initStats(::TTree *tree)
Function used for setting up the statistics info about the managed branches.
@ kContainerStore
The object describes an entire container.
EStructMode m_structMode
The "structural" mode of the object.
virtual void * getDecoration(auxid_t auxid, size_t size, size_t capacity) override
Get a pointer to a given array, creating the array if necessary.
std::vector< SG::IAuxTypeVector * > m_vecs
Variables handled currently by the object.
Class helping in dealing with dynamic branch selection.
virtual const auxid_set_t & getDynamicAuxIDs() const override
Get the types(names) of variables created dynamically.
::Bool_t m_inputScanned
"Scan status" of the input TTree
void * inputObjectPtr()
Get a pointer to the object (or its pointer) in memory for reading.
SG::auxid_t m_auxid
The auxiliary ID of the branch.
::Bool_t m_needsRead
Read status flag.
const std::type_info * m_typeInfo
Type info for the variable.
void setSplitLevel(Int_t value)
Set the split level of the output branches.
Interface for non-const operations on an auxiliary store.
An auxiliary data store that holds data internally.
virtual void lockDecoration(SG::auxid_t auxid) override
Lock a decoration.
::Bool_t m_topStore
Flag stating whether this is a "top store".
@ kUndefinedStore
The structure mode is not defined.
virtual void selectAux(const std::set< std::string > &attributes)
Select dynamic auxiliary attributes for writing.
SG::auxid_t auxid_t
Convenience type declaration.
void * objectPtr()
Get a pointer to the object.
::Int_t getEntry()
Get entry from the branch that was loaded with TTree::LoadTree()
::TBranch ** branchPtr()
Get a pointer to the branch being held.
virtual size_t size() const override
Return the number of elements in the store.
Abstract interface for manipulating vectors of arbitrary types.
std::size_t m_size
The current size of the container being described.
TAuxStore(const char *prefix="", Bool_t topStore=kTRUE, EStructMode mode=kUndefinedStore, Int_t basketSize=2048, Int_t splitLevel=0)
Default constructor.
virtual const void * getIOData(auxid_t auxid) const override
Get a pointer to the data being stored for one aux data item.
EStructMode structMode() const
Get what structure mode the object was constructed with.
Interface for non-const operations on an auxiliary store.
std::vector< TBranchHandle * > m_branches
Branches reading the various auxiliary variables.
StatusCode setupAuxBranch(::TBranch *br, const char *auxName, ::Bool_t staticBranch)
Register one input branch as an available auxiliary variable.
TBranchHandle(::Bool_t staticBranch, ::Bool_t primitiveBranch, const std::type_info *ti, void *obj, SG::auxid_t auxid, const std::string *prefix)
Constructor.
A set of aux data identifiers.
void * outputObjectPtr()
Get a pointer to the object (or its pointer) in memory for writing.
StatusCode setupOutputData(auxid_t auxid)
Connect a variable to the output tree.
virtual bool clearDecorations() override
Remove the decorations added so far.
::Bool_t m_static
Is this a static variable in question?
::Bool_t isPrimitiveBranch(TBranch *br)
Check if a branch holds a primitive variable or not.
StatusCode setupInputData(auxid_t auxid)
Connect a variable to the input tree.
virtual const SG::IAuxTypeVector * linkedVector(SG::auxid_t auxid) const override
Return interface for a linked variable.
Tool for accessing xAOD files outside of Athena.
Class used internally to implement just-in-time reading.
void setPrefix(const char *prefix)
Set the branch name prefix.
std::vector< bool > m_branchesWritten
"Write status" of the different variables
const char * prefix() const
Get the currently configured branch name prefix.
AuxSelection m_selection
Object helping to select which auxiliary variables to write.