The Gaudi Framework  v30r4 (9b837755)
Gaudi::IDataHandleMetadata Struct Referenceabstract

Interface to some class-wide metadata of DataHandle subclasses. More...

#include <GaudiKernel/IDataHandleMetadata.h>

Inheritance diagram for Gaudi::IDataHandleMetadata:

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
 

Detailed Description

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.

Member Enumeration Documentation

enum Gaudi::IDataHandleMetadata::AccessMode
strong

Tell how the whiteboard class will be accessed.

The set of access modes is defined by the framework:

  • The Write access mode provides the ability to insert data once in a previously empty whiteboard location.
  • The Read access mode provides the ability to read data from a previously written whiteboard location any number of times.
Enumerator
Read 
Write 
NUM_ACCESS_MODES 

Definition at line 49 of file IDataHandleMetadata.h.

49 { Read = 0, Write, NUM_ACCESS_MODES };

Member Function Documentation

virtual AccessMode Gaudi::IDataHandleMetadata::access ( ) const
pure virtual
virtual std::string Gaudi::IDataHandleMetadata::whiteBoard ( ) const
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.


The documentation for this struct was generated from the following file: