The Gaudi Framework  v32r0 (3325bb39)
FixTESPath< BASE > Class Template Reference

#include <GaudiAlg/FixTESPath.h>

Inheritance diagram for FixTESPath< BASE >:
Collaboration diagram for FixTESPath< BASE >:

Public Member Functions

template<typename U = BASE, typename = std::enable_if_t<std::is_base_of<Gaudi::Algorithm, BASE>::value, U>>
 FixTESPath (const std::string &name, ISvcLocator *pSvcLocator)
 Algorithm constructor - the SFINAE constraint below ensures that this is constructor is only defined if BASE derives from Algorithm. More...
 
template<typename U = BASE, typename = std::enable_if_t<std::is_base_of<AlgTool, BASE>::value, U>>
 FixTESPath (const std::string &type, const std::string &name, const IInterface *ancestor)
 Tool constructor - SFINAE-ed to insure this constructor is only defined if BASE derives from AlgTool. More...
 
StatusCode initialize () override
 
const std::stringrootInTES () const
 Returns the "rootInTES" string. More...
 
std::string fullTESLocation (std::string_view location, bool useRootInTES) const
 Returns the full correct event location given the rootInTes settings. More...
 

Private Attributes

Gaudi::Property< std::stringm_rootInTES
 

Detailed Description

template<class BASE>
class FixTESPath< BASE >

Definition at line 20 of file FixTESPath.h.

Constructor & Destructor Documentation

template<class BASE>
template<typename U = BASE, typename = std::enable_if_t<std::is_base_of<Gaudi::Algorithm, BASE>::value, U>>
FixTESPath< BASE >::FixTESPath ( const std::string name,
ISvcLocator pSvcLocator 
)
inline

Algorithm constructor - the SFINAE constraint below ensures that this is constructor is only defined if BASE derives from Algorithm.

Definition at line 25 of file FixTESPath.h.

25 : BASE( name, pSvcLocator ) {}
template<class BASE>
template<typename U = BASE, typename = std::enable_if_t<std::is_base_of<AlgTool, BASE>::value, U>>
FixTESPath< BASE >::FixTESPath ( const std::string type,
const std::string name,
const IInterface ancestor 
)
inline

Tool constructor - SFINAE-ed to insure this constructor is only defined if BASE derives from AlgTool.

Definition at line 30 of file FixTESPath.h.

31  : BASE( type, name, ancestor ) {
32  // setup RootInTES from parent if available
33  if ( const IProperty* ancestorProp = dynamic_cast<const IProperty*>( ancestor );
34  ancestorProp && ancestorProp->hasProperty( "RootInTES" ) ) {
35  this->setProperty( ancestorProp->getProperty( "RootInTES" ) ).ignore();
36  }
37  }
StatusCode setProperty(IProperty *component, const std::string &name, const TYPE &value, const std::string &doc)
simple function to set the property of the given object from the value
Definition: Property.h:1180
virtual bool hasProperty(const std::string &name) const =0
Return true if we have a property with the given name.
The IProperty is the basic interface for all components which have properties that can be set or get...
Definition: IProperty.h:20

Member Function Documentation

template<class BASE>
std::string FixTESPath< BASE >::fullTESLocation ( std::string_view  location,
bool  useRootInTES 
) const
inline

Returns the full correct event location given the rootInTes settings.

Definition at line 55 of file FixTESPath.h.

55  {
56  return FixTESPathDetails::fullTESLocation( location, useRootInTES ? rootInTES() : std::string_view{} );
57  }
const std::string & rootInTES() const
Returns the "rootInTES" string.
Definition: FixTESPath.h:52
std::string fullTESLocation(std::string_view location, std::string_view rit)
Definition: FixTESPath.cpp:40
template<class BASE>
StatusCode FixTESPath< BASE >::initialize ( )
inlineoverride

Definition at line 39 of file FixTESPath.h.

39  {
40  const StatusCode sc = BASE::initialize();
41  if ( sc.isFailure() ) return sc;
42  // TODO: just call 'acceptDHVisitor` and remove m_updateDataHandles...
43  SmartIF<IDataManagerSvc> dataMgrSvc{BASE::evtSvc()};
44  this->m_updateDataHandles = FixTESPathDetails::fixDataHandlePath(
45  rootInTES(), dataMgrSvc->rootName(), BASE::msgLevel( MSG::DEBUG ) ? &this->debug() : nullptr );
46  return sc;
47  }
const std::string & rootInTES() const
Returns the "rootInTES" string.
Definition: FixTESPath.h:52
bool isFailure() const
Definition: StatusCode.h:130
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:50
std::unique_ptr< IDataHandleVisitor > fixDataHandlePath(std::string_view rit, std::string rootName, MsgStream *dbg)
Definition: FixTESPath.cpp:61
template<class BASE>
const std::string& FixTESPath< BASE >::rootInTES ( ) const
inline

Returns the "rootInTES" string.

Used as the directory root in the TES for which all data access refers to (both saving and retrieving).

Definition at line 52 of file FixTESPath.h.

52 { return m_rootInTES; }
Gaudi::Property< std::string > m_rootInTES
Definition: FixTESPath.h:60

Member Data Documentation

template<class BASE>
Gaudi::Property<std::string> FixTESPath< BASE >::m_rootInTES
private
Initial value:
{this,
"RootInTES",
{},
auto& rit = this->m_rootInTES.value();
if ( !rit.empty() && rit.back() != '/' ) rit += '/';
},
"note: overridden by parent settings"}

Definition at line 60 of file FixTESPath.h.


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