The Gaudi Framework  master (1a7a3838)
Loading...
Searching...
No Matches
Gaudi::DataHandleVectorBase Class Referenceabstract

Type-erased interface for a configurable sequence of data handles. More...

#include </builds/gaudi/Gaudi/GaudiKernel/include/GaudiKernel/DataHandle.h>

Inheritance diagram for Gaudi::DataHandleVectorBase:

Public Types

using PropertyType = DataHandleVectorProperty

Public Member Functions

virtual ~DataHandleVectorBase ()=default
virtual void setKeys (std::span< const DataObjID > keys)=0
 Replace the configured TES keys and rebuild the typed handles.
virtual const std::vector< DataObjID > & keys () const =0
 Configured TES keys, in property order.
virtual DataHandle::Mode mode () const =0
 Access mode shared by all handles in the vector.
virtual std::string type () const =0
 Demangled C++ type of the data accessed by each handle.
std::string pythonPropertyClassName () const
 Python class used to represent the property value.
std::string semantics () const
 GaudiConfig2 semantics name including handle mode and value type.
std::string pythonRepr () const
 Python expression reproducing the configured value.

Detailed Description

Type-erased interface for a configurable sequence of data handles.

The associated property stores the TES keys. Updating it rebuilds the typed handles owned by the concrete DataHandleVector.

Definition at line 100 of file DataHandle.h.

Member Typedef Documentation

◆ PropertyType

Constructor & Destructor Documentation

◆ ~DataHandleVectorBase()

virtual Gaudi::DataHandleVectorBase::~DataHandleVectorBase ( )
virtualdefault

Member Function Documentation

◆ keys()

◆ mode()

◆ pythonPropertyClassName()

std::string Gaudi::DataHandleVectorBase::pythonPropertyClassName ( ) const
inline

Python class used to represent the property value.

Definition at line 116 of file DataHandle.h.

116{ return "DataHandleVector"; }

◆ pythonRepr()

std::string Gaudi::DataHandleVectorBase::pythonRepr ( ) const

Python expression reproducing the configured value.

Definition at line 48 of file DataHandle.cpp.

48 {
49 std::ostringstream ost;
50 ost << pythonPropertyClassName() << "([";
51 const char* sep = "";
52 for ( const auto& key : keys() ) {
53 ost << sep << "'" << key.key() << "'";
54 sep = ",";
55 }
56 ost << "], '";
57 switch ( mode() ) {
59 ost << "R";
60 break;
62 ost << "W";
63 break;
64 default:
65 ost << "UNKNOWN";
66 break;
67 }
68 ost << "', '" << type() << "')";
69 return ost.str();
70 }
virtual std::string type() const =0
Demangled C++ type of the data accessed by each handle.
virtual const std::vector< DataObjID > & keys() const =0
Configured TES keys, in property order.
virtual DataHandle::Mode mode() const =0
Access mode shared by all handles in the vector.
std::string pythonPropertyClassName() const
Python class used to represent the property value.
Definition DataHandle.h:116

◆ semantics()

std::string Gaudi::DataHandleVectorBase::semantics ( ) const

GaudiConfig2 semantics name including handle mode and value type.

Definition at line 37 of file DataHandle.cpp.

37 {
38 switch ( mode() ) {
40 return "Gaudi::DataHandleVector<DataObjectReadHandle, " + type() + ">";
42 return "Gaudi::DataHandleVector<DataObjectWriteHandle, " + type() + ">";
43 default:
44 return "Gaudi::DataHandleVector<DataHandle, " + type() + ">";
45 }
46 }

◆ setKeys()

◆ type()


The documentation for this class was generated from the following files: