The Gaudi Framework  master (594c33fa)
FixTESPath< BASE > Class Template Reference

#include </builds/gaudi/Gaudi/GaudiAlg/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 (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 (std::string type, 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 30 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 ( 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 35 of file FixTESPath.h.

35 : BASE( std::move( 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 ( std::string  type,
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 40 of file FixTESPath.h.

41  : BASE( std::move( type ), std::move( name ), ancestor ) {
42  // setup RootInTES from parent if available
43  if ( const IProperty* ancestorProp = dynamic_cast<const IProperty*>( ancestor );
44  ancestorProp && ancestorProp->hasProperty( "RootInTES" ) ) {
45  this->setProperty( ancestorProp->getProperty( "RootInTES" ) ).ignore();
46  }
47  }

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 64 of file FixTESPath.h.

64  {
65  return FixTESPathDetails::fullTESLocation( location, useRootInTES ? rootInTES() : std::string_view{} );
66  }

◆ initialize()

template<class BASE >
StatusCode FixTESPath< BASE >::initialize ( )
inlineoverride

Definition at line 49 of file FixTESPath.h.

49  {
50  return BASE::initialize().andThen( [&] {
51  // TODO: just call 'acceptDHVisitor` and remove m_updateDataHandles...
52  SmartIF<IDataManagerSvc> dataMgrSvc{ BASE::evtSvc() };
53  this->m_updateDataHandles = FixTESPathDetails::fixDataHandlePath(
54  rootInTES(), dataMgrSvc->rootName(), BASE::msgLevel( MSG::DEBUG ) ? &this->debug() : nullptr );
55  } );
56  }

◆ 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 61 of file FixTESPath.h.

61 { return m_rootInTES; }

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 69 of file FixTESPath.h.


The documentation for this class was generated from the following file:
MSG::DEBUG
@ DEBUG
Definition: IMessageSvc.h:25
Gaudi::Details::PropertyBase
PropertyBase base class allowing PropertyBase* collections to be "homogeneous".
Definition: PropertyBase.h:35
setProperty
bool PyHelper() setProperty(IInterface *p, char *name, char *value)
Definition: Bootstrap.cpp:244
std::move
T move(T... args)
GaudiAlg.HistoUtils.location
location
Definition: HistoUtils.py:964
FixTESPathDetails::fullTESLocation
std::string fullTESLocation(std::string_view location, std::string_view rit)
Definition: FixTESPath.cpp:56
IProperty
Definition: IProperty.h:33
Gaudi::Property::value
const ValueType & value() const
Definition: Property.h:239
IProperty::hasProperty
virtual bool hasProperty(std::string_view name) const =0
Return true if we have a property with the given name.
SmartIF< IDataManagerSvc >
FixTESPath::m_rootInTES
Gaudi::Property< std::string > m_rootInTES
Definition: FixTESPath.h:69
gaudirun.type
type
Definition: gaudirun.py:160
ConditionsStallTest.name
name
Definition: ConditionsStallTest.py:77
FixTESPath::rootInTES
const std::string & rootInTES() const
Returns the "rootInTES" string.
Definition: FixTESPath.h:61
FixTESPathDetails::fixDataHandlePath
std::unique_ptr< IDataHandleVisitor > fixDataHandlePath(std::string_view rit, std::string rootName, MsgStream *dbg)
Definition: FixTESPath.cpp:74