"ROOT implementation" of IAuxStore More...
#include <TAuxStore.h>
Classes | |
class | TBranchHandle |
struct | TSAuxidSet |
Helper class for the thread-local auxid set implementation. | |
Public Types | |
enum | EStructMode { kUndefinedStore = 0, kContainerStore = 1, kObjectStore = 2 } |
"Structural" modes of the object More... | |
typedef SG::auxid_t | auxid_t |
Convenience type declaration. | |
typedef SG::auxid_set_t | auxid_set_t |
Convenience type declaration. | |
Public Member Functions | |
TAuxStore (const char *prefix="", Bool_t topStore=kTRUE, EStructMode mode=kUndefinedStore, Int_t basketSize=2048, Int_t splitLevel=0) | |
Default constructor. | |
~TAuxStore () | |
Destructor. | |
EStructMode | structMode () const |
Get what structure mode the object was constructed with. | |
TReturnCode | setStructMode (EStructMode mode) |
Set the structure mode of the object to a new value. | |
const char * | prefix () const |
Get the currently configured branch name prefix. | |
void | setPrefix (const char *prefix) |
Set the branch name prefix. | |
Bool_t | isTopStore () const |
Check if the object is a "top store", or not. | |
void | setTopStore (Bool_t value=kTRUE) |
Set whether the object should behave as a "top store" or not. | |
Int_t | basketSize () const |
Get the size of the baskets created for the output branches. | |
void | setBasketSize (Int_t value) |
Set the size of the baskets created for the output branches. | |
Int_t | splitLevel () const |
Get the split level of the output branches. | |
void | setSplitLevel (Int_t value) |
Set the split level of the output branches. | |
TReturnCode | readFrom (::TTree *tree,::Bool_t printWarnings=kTRUE) |
Connect the object to an input TTree. | |
TReturnCode | writeTo (::TTree *tree) |
Connect the object to an output TTree. | |
Int_t | getEntry (Long64_t entry, Int_t getall=0) |
Read the values from the specified TTree entry. | |
void | reset () |
Tell the object that all branches will need to be re-read. | |
Functions implementing the SG::IConstAuxStore interface | |
virtual const void * | getData (auxid_t auxid) const |
Get a pointer to a given array. | |
virtual const auxid_set_t & | getAuxIDs () const |
Get the types(names) of variables handled by this container. | |
virtual void * | getDecoration (auxid_t auxid, size_t size, size_t capacity) |
Get a pointer to a given array, creating the array if necessary. | |
virtual void | lock () |
Lock the object, and don't let decorations be added. | |
virtual void | clearDecorations () |
virtual size_t | size () const |
Return the number of elements in the store. | |
Functions implementing the SG::IAuxStore interface | |
virtual void * | getData (auxid_t auxid, size_t size, size_t capacity) |
Get a pointer to a given array, creating the array if necessary. | |
virtual const auxid_set_t & | getWritableAuxIDs () const |
Return a set of writable data identifiers. | |
virtual void | resize (size_t size) |
Resize the arrays to a given size. | |
virtual void | reserve (size_t size) |
Reserve a given size for the arrays. | |
virtual void | shift (size_t pos, ptrdiff_t offs) |
Shift the contents of the stored arrays. | |
Functions implementing the SG::IAuxStoreIO interface | |
virtual const void * | getIOData (auxid_t auxid) const |
Get a pointer to the data being stored for one aux data item. | |
virtual const std::type_info * | getIOType (auxid_t auxid) const |
Return the type of the data to be stored for one aux data item. | |
virtual const auxid_set_t & | getDynamicAuxIDs () const |
Get the types(names) of variables created dynamically. | |
virtual void | selectAux (const std::set< std::string > &attributes) |
Select dynamic auxiliary attributes for writing. | |
virtual const auxid_set_t & | getSelectedAuxIDs () const |
Get the IDs of the selected aux variables. | |
Friends | |
class | TEvent |
Make TEvent a friend of this class. |
"ROOT implementation" of IAuxStore
This is a "D3PDReader-like" implementation for the auxiliary store interface. It is meant to provide very efficient access to a relatively small number of auxiliary variables.
void xAOD::TAuxStore::clearDecorations | ( | ) | [virtual] |
Remove the decorations added so far. Only works for transient decorations.
Implements SG::IConstAuxStore.
TReturnCode xAOD::TAuxStore::readFrom | ( | ::TTree * | tree, | |
::Bool_t | printWarnings = kTRUE | |||
) |
Connect the object to an input TTree.
This function is called by the infrastructure to connect the object to an input TTree whenever a new input file is opened.
tree | Pointer to the TTree that is being read from |
TReturnCode xAOD::TAuxStore::setStructMode | ( | EStructMode | mode | ) |
Set the structure mode of the object to a new value.
This function should be used with great care. It makes it possible for the TEvent code to set the type of the object once the type is known. But user code should probably not fiddle with this function.
mode | The structure mode to set |
TReturnCode xAOD::TAuxStore::writeTo | ( | ::TTree * | tree | ) |
Connect the object to an output TTree.
This function is called by the infrastructure to connect the object to an output TTree.
tree | Pointer to the TTree that is being written to |