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.
@ c_WriteOut
Object/array should be saved by output modules.
EDurability
Durability types.
@ c_Event
Different object in each event, all objects/arrays are invalidated after event() function has been ca...
a (simplified) python wrapper for StoreObjPtr.
StoreAccessorBase m_storeAccessor
Store accessor to retrieve the object.
TObject * operator->() const
Returns the attached DataStore object, or nullptr if no valid object exists.
static void printList(DataStore::EDurability durability=DataStore::EDurability::c_Event)
Print list of available objects for given durability.
TObject * obj() const
Returns the attached DataStore object, or nullptr if no valid object exists.
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.
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.
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 ...