11 #include <framework/datastore/DataStore.h>
12 #include <framework/datastore/StoreAccessorBase.h>
95 const std::string& name,
123 bool isRequired(
const std::string& name =
"");
133 bool isOptional(
const std::string& name =
"");
159 bool assign(TObject*
object,
bool replace =
false);
167 bool create(
bool replace =
false);
EStoreFlags
Flags describing behaviours of objects etc.
EDurability
Durability types.
a (simplified) python wrapper for StoreObjPtr.
TObject * operator->() const
Returns the attached DataStore object, or nullptr if no valid object exists.
StoreAccessorBase m_storeAccessor
Store accessor to retrieve the object.
static void printList(DataStore::EDurability durability=DataStore::EDurability::c_Event)
Print list of available objects for given durability.
PyStoreObj(const std::string &name, DataStore::EDurability durability=DataStore::EDurability::c_Event)
constructor.
void ensureAttached() const
Ensure that contained TObject has been attached to a memory location on the DataStore.
bool hasValidClass() const
Check whether a TClass for the contained object could be determined.
bool isValid() const
Check whether the object was registered and created.
bool isRequired(const std::string &name="")
Ensure this object has been registered previously.
bool isOptional(const std::string &name="")
Tell the DataStore about an optional input.
bool registerInDataStore(DataStore::EStoreFlags storeFlags)
Register the object in the DataStore.
bool assign(TObject *object, bool replace=false)
Assign 'object' to the accessor.
StoreEntry * m_storeEntry
Pointer to the DataStore entry - serves as an internal cache omitting repeated look up from the DataS...
static std::vector< std::string > list(DataStore::EDurability durability=DataStore::EDurability::c_Event)
Return list of available objects for given durability.
void attach() const
Lookup the store entry and cache a pointer to it.
bool create(bool replace=false)
Create default constructed object in the DataStore.
TObject * obj() const
Returns the attached DataStore object, or nullptr if no valid object exists.
Base class for StoreObjPtr and StoreArray for easier common treatment.
Abstract base class for different kinds of events.
Wraps a stored array/object, stored under unique (name, durability) key.
TObject * ptr
The pointer to the returned object, either equal to 'object' or null, depending on wether the object ...