![]() |
The Gaudi Framework
v30r4 (9b837755)
|
Interface to some class-wide metadata of DataHandle subclasses. More...
#include <GaudiKernel/IDataHandleMetadata.h>
Public Types | |
enum | AccessMode { AccessMode::Read = 0, AccessMode::Write, AccessMode::NUM_ACCESS_MODES } |
Tell how the whiteboard class will be accessed. More... | |
Public Member Functions | |
virtual std::string | whiteBoard () const =0 |
Identifier of the Whiteboard implementation used by the subclass. More... | |
virtual AccessMode | access () const =0 |
Interface to some class-wide metadata of DataHandle subclasses.
The Property machinery allowing one to set the target of DataHandles via Python code is centrally managed by the DataHandle base class. However, it needs some customization points. For example, the Python side must be able to tell whether a DataHandle is meant for reading or writing, and what kind of whiteboard it is accessing. And there are more radical proposals on the horizon stating that DataHandle subclasses should fully control the generation and parsing of the Python representation of a DataHandle's configuration.
Now, where do we put these customization points? They need to be accessible right from the point in time where the DataHandle base class constructor is called, because that's when the associated Property is initialized. So they cannot be virtual methods of DataHandle, as calling them at that time is illegal. They could be static virtual methods if C++ had such a thing, but alas that is not the case. So our only option left is to define, for each DataHandle subclass, an associated global constant which implements the associated customization points.
The following interface defines what this global object should look like
Definition at line 32 of file IDataHandleMetadata.h.
|
strong |
Tell how the whiteboard class will be accessed.
The set of access modes is defined by the framework:
Enumerator | |
---|---|
Read | |
Write | |
NUM_ACCESS_MODES |
Definition at line 49 of file IDataHandleMetadata.h.
|
pure virtual |
Implemented in Gaudi::EventDataHandle::Metadata.
|
pure virtual |
Identifier of the Whiteboard implementation used by the subclass.
We must use an open-ended identifier like a string here, in order to allow Gaudi-based experiments to use their own whiteboard implementation without framework-level modifications.
Implemented in Gaudi::EventDataHandle::Metadata.