 |
Belle II Software
release-05-02-19
|
13 #include <framework/datastore/DataStore.h>
14 #include <framework/datastore/StoreAccessorBase.h>
16 #include <TCollection.h>
86 const std::string& name,
114 bool isRequired(
const std::string& name =
"");
124 bool isOptional(
const std::string& name =
"");
139 std::string
const& namedRelation =
"")
const;
151 std::string
const& namedRelation =
"")
const;
164 std::string
const& namedRelation =
"")
const;
174 const std::string& namedRelation =
"")
const;
184 const std::string& namedRelation =
"")
const;
236 bool create(
bool replace =
false);
void ensureCreated()
Ensure that contained TClonesArray has been created on the DataStore.
bool registerRelationTo(const PyStoreArray &toArray, DataStore::EDurability durability=DataStore::EDurability::c_Event, DataStore::EStoreFlags storeFlags=DataStore::EStoreFlags::c_WriteOut, std::string const &namedRelation="") const
Register a relation to the given PyStoreArray.
TClonesArray * getPtr()
Raw access to the underlying TClonesArray.
bool requireRelationTo(const PyStoreArray &toArray, DataStore::EDurability durability=DataStore::c_Event, std::string const &namedRelation="") const
Produce error if no relation from this array to 'toArray' has been registered.
void ensureAttached() const
Ensure that contained TClonesArray has been attached to a memory location on the DataStore.
StoreEntry * m_storeEntry
Pointer to the DataStore entry - serves as an internal cache omitting repeated look up from the DataS...
EStoreFlags
Flags describing behaviours of objects etc.
bool hasValidClass() const
Check whether a TClass of the objects in this PyStoreArray could be determined.
Wraps a stored array/object, stored under unique (name, durability) key.
const std::string & getName() const
Return name under which the object is saved in the DataStore.
Base class for StoreObjPtr and StoreArray for easier common treatment.
static std::vector< std::string > list(DataStore::EDurability durability=DataStore::EDurability::c_Event)
Return list of available arrays for given durability.
bool isValid() const
Check whether the array was registered and created.
bool hasRelationFrom(const PyStoreArray &fromArray, DataStore::EDurability durability=DataStore::c_Event, const std::string &namedRelation="") const
Check for the existence of a relation from the provided toArray (to this Pystorearray)
PyStoreArray(const std::string &name, DataStore::EDurability durability=DataStore::EDurability::c_Event)
constructor.
int getEntries() const
returns number of entries for current event.
int __len__() const
Support for len().
bool hasRelationTo(const PyStoreArray &toArray, DataStore::EDurability durability=DataStore::c_Event, const std::string &namedRelation="") const
Check for the existence of a relation to the provided toArray (from this Pystorearray)
TObject * appendNew()
Construct a new object of the array's type at the end of the array.
Abstract base class for different kinds of events.
bool optionalRelationTo(const PyStoreArray &toArray, DataStore::EDurability durability=DataStore::c_Event, std::string const &namedRelation="") const
Tell the data store about a relation that we could make use of.
std::string getName() const
Return name under which the object is saved in the DataStore.
TIter __iter__() const
Allow iteration using for in Python.
void attach() const
Lookup the store entry and cache a pointer to it.
TObject * operator[](int i) const
returns object at index i, or null pointer if out of range (+error)
a (simplified) python wrapper for StoreArray.
static void printList(DataStore::EDurability durability=DataStore::EDurability::c_Event)
Print list of available arrays for given durability.
StoreAccessorBase m_storeAccessor
Store accessor to retrieve the object.
bool registerInDataStore(DataStore::EStoreFlags storeFlags)
Register the array in the data store.
bool isOptional(const std::string &name="")
Tell the DataStore about an optional input.
bool create(bool replace=false)
Create constructed TClonesArray in the DataStore.
bool isRequired(const std::string &name="")
Ensure this array has been registered previously.
@ c_Event
Different object in each event, all objects/arrays are invalidated after event() function has been ca...
EDurability
Durability types.