The Gaudi Framework  v32r2 (46d42edc)
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_v<Gaudi::Algorithm, BASE>, 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_v<AlgTool, BASE>, 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

◆ FixTESPath() [1/2]

template<class BASE>
template<typename U = BASE, typename = std::enable_if_t<std::is_base_of_v<Gaudi::Algorithm, BASE>, 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 ) {}

◆ FixTESPath() [2/2]

template<class BASE>
template<typename U = BASE, typename = std::enable_if_t<std::is_base_of_v<AlgTool, BASE>, 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  }
virtual bool hasProperty(const std::string &name) const =0
Return true if we have a property with the given name.
bool PyHelper() setProperty(IInterface *p, char *name, char *value)
Definition: Bootstrap.cpp:233
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

◆ fullTESLocation()

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  }
std::string fullTESLocation(std::string_view location, std::string_view rit)
Definition: FixTESPath.cpp:46
const std::string & rootInTES() const
Returns the "rootInTES" string.
Definition: FixTESPath.h:52

◆ initialize()

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  }
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:50
const std::string & rootInTES() const
Returns the "rootInTES" string.
Definition: FixTESPath.h:52
bool isFailure() const
Definition: StatusCode.h:130
std::unique_ptr< IDataHandleVisitor > fixDataHandlePath(std::string_view rit, std::string rootName, MsgStream *dbg)
Definition: FixTESPath.cpp:67

◆ rootInTES()

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

◆ m_rootInTES

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: