The Gaudi Framework  v37r0 (b608885e)
Gaudi::Examples::TestObjectVersion::UseObject Struct Reference
Inheritance diagram for Gaudi::Examples::TestObjectVersion::UseObject:
Collaboration diagram for Gaudi::Examples::TestObjectVersion::UseObject:

Public Member Functions

 UseObject (const std::string &name, ISvcLocator *svcLoc)
 
void operator() (const ObjectType &o) const override
 

Detailed Description

Definition at line 33 of file TestObjectVersion.cpp.

Constructor & Destructor Documentation

◆ UseObject()

Gaudi::Examples::TestObjectVersion::UseObject::UseObject ( const std::string name,
ISvcLocator svcLoc 
)
inline

Definition at line 34 of file TestObjectVersion.cpp.

35  : Consumer( name, svcLoc, KeyValue( "InputLocation", "/Event/SomeData" ) ) {}

Member Function Documentation

◆ operator()()

void Gaudi::Examples::TestObjectVersion::UseObject::operator() ( const ObjectType o) const
inlineoverride

Definition at line 36 of file TestObjectVersion.cpp.

36  {
37  info() << "Retrieved object with version " << static_cast<int>( o.version() ) << endmsg;
38  if ( o.version() != 42 ) throw GaudiException( "Wrong object version", name(), StatusCode::FAILURE );
39  }

The documentation for this struct was generated from the following file:
Gaudi::Functional::Consumer
details::Consumer< Signature, Traits_, details::isLegacy< Traits_ > > Consumer
Definition: Consumer.h:68
bug_34121.name
name
Definition: bug_34121.py:20
GaudiException
Definition: GaudiException.h:31
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:203
StatusCode::FAILURE
constexpr static const auto FAILURE
Definition: StatusCode.h:101