The Gaudi Framework  master (37c0b60a)
AlgToolHistory Class Reference

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

Inheritance diagram for AlgToolHistory:
Collaboration diagram for AlgToolHistory:

Public Member Functions

 AlgToolHistory (const AlgTool &alg, const JobHistory *job)
 
 AlgToolHistory (std::string algVersion, std::string algName, std::string algType, const AlgTool *tool, const PropertyList &props, const JobHistory *job)
 
const CLIDclID () const override
 Retrieve reference to class definition structure. More...
 
const std::stringalgtool_type () const
 
const std::stringalgtool_version () const
 
const std::stringalgtool_name () const
 
const AlgToolalgtool_instance () const
 
const PropertyListproperties () const override
 
const JobHistoryjobHistory () const
 
std::ostreamdump (std::ostream &, bool isXML, int indent) const override
 
const std::stringname () const override
 
const std::stringtype () const override
 
const std::stringversion () const override
 
- Public Member Functions inherited from HistoryObj
virtual ~HistoryObj ()=default
 
const CLIDclID () const override
 Retrieve reference to class definition structure. More...
 
- Public Member Functions inherited from DataObject
 DataObject ()
 Standard Constructor. More...
 
 DataObject (const DataObject &rhs)
 Copy Constructor. More...
 
DataObjectoperator= (const DataObject &rhs)
 Assignment Operator. More...
 
 DataObject (DataObject &&rhs)
 Move Constructor. More...
 
DataObjectoperator= (DataObject &&rhs)
 Move Assignment Operator. More...
 
virtual ~DataObject ()
 Standard Destructor. More...
 
virtual unsigned long addRef ()
 Add reference to object. More...
 
virtual unsigned long release ()
 release reference to object More...
 
const std::stringname () const
 Retreive DataObject name. It is the name when registered in the store. More...
 
virtual StatusCode update ()
 Provide empty placeholder for internal object reconfiguration callback. More...
 
void setRegistry (IRegistry *pRegistry)
 Set pointer to Registry. More...
 
IRegistryregistry () const
 Get pointer to Registry. More...
 
LinkManagerlinkMgr ()
 Retrieve Link manager. More...
 
const LinkManagerlinkMgr () const
 
unsigned char version () const
 Retrieve version number of this object representation. More...
 
void setVersion (unsigned char vsn)
 Set version number of this object representation. More...
 
unsigned long refCount () const
 Return the refcount. More...
 
virtual std::ostreamfillStream (std::ostream &s) const
 Fill the output stream (ASCII) More...
 
- Public Member Functions inherited from IVersHistoryObj
virtual ~IVersHistoryObj ()=default
 

Static Public Member Functions

static const CLIDclassID ()
 
- Static Public Member Functions inherited from HistoryObj
static const CLIDclassID ()
 
static std::string convert_string (const std::string &)
 
- Static Public Member Functions inherited from DataObject
static const CLIDclassID ()
 Retrieve reference to class definition structure (static access) More...
 

Private Attributes

std::string m_type
 
std::string m_version
 
std::string m_name
 
const AlgToolm_tool
 
PropertyList m_properties
 
const JobHistorym_jobHistory
 

Friends

std::ostreamoperator<< (std::ostream &lhs, const AlgToolHistory &rhs)
 

Additional Inherited Members

- Public Types inherited from IVersHistoryObj
typedef std::vector< Gaudi::Details::PropertyBase * > PropertyList
 
- Protected Member Functions inherited from HistoryObj
virtual void indent (std::ostream &, int) const
 

Detailed Description

AlgToolHistory class definition

Author
: Charles Leggett

Definition at line 32 of file AlgToolHistory.h.

Constructor & Destructor Documentation

◆ AlgToolHistory() [1/2]

AlgToolHistory::AlgToolHistory ( const AlgTool alg,
const JobHistory job 
)

Definition at line 31 of file AlgToolHistory.cpp.

32  : m_type( alg.type() )
33  , m_version( "UNKNOWN" )
34  , m_name( alg.name() )
35  , m_tool( &alg )
36  , m_properties( alg.getProperties() )
37  , m_jobHistory( job ) {}

◆ AlgToolHistory() [2/2]

AlgToolHistory::AlgToolHistory ( std::string  algVersion,
std::string  algName,
std::string  algType,
const AlgTool tool,
const PropertyList props,
const JobHistory job 
)

Definition at line 41 of file AlgToolHistory.cpp.

44  : m_type( std::move( algType ) ) // FIXME type_info???
45  , m_version( std::move( algVersion ) )
46  , m_name( std::move( algName ) )
47  , m_tool( tool )
48  , m_properties( props )
49  , m_jobHistory( job ) {}

Member Function Documentation

◆ algtool_instance()

const AlgTool* AlgToolHistory::algtool_instance ( ) const
inline

Definition at line 73 of file AlgToolHistory.h.

73 { return m_tool; }

◆ algtool_name()

const std::string& AlgToolHistory::algtool_name ( ) const
inline

Definition at line 70 of file AlgToolHistory.h.

70 { return m_name; }

◆ algtool_type()

const std::string& AlgToolHistory::algtool_type ( ) const
inline

Definition at line 64 of file AlgToolHistory.h.

64 { return m_type; }

◆ algtool_version()

const std::string& AlgToolHistory::algtool_version ( ) const
inline

Definition at line 67 of file AlgToolHistory.h.

67 { return m_version; }

◆ classID()

const CLID & AlgToolHistory::classID ( )
static

Definition at line 53 of file AlgToolHistory.cpp.

53  {
54 
55  static const CLID CLID_AlgToolHistory = 171959758; // from `clid AlgToolHistory`
56  return CLID_AlgToolHistory;
57 }

◆ clID()

const CLID& AlgToolHistory::clID ( ) const
inlineoverridevirtual

Retrieve reference to class definition structure.

Retrieve Pointer to class definition structure.

Reimplemented from DataObject.

Definition at line 60 of file AlgToolHistory.h.

60 { return classID(); }

◆ dump()

std::ostream & AlgToolHistory::dump ( std::ostream ost,
bool  isXML,
int  indent 
) const
overridevirtual

Implements HistoryObj.

Definition at line 61 of file AlgToolHistory.cpp.

61  {
62 
63  if ( !isXML ) {
64 
65  ost << "Name: " << algtool_name() << endl;
66  ost << "Type: " << algtool_type() << endl;
67  ost << "Version: " << algtool_version() << endl;
68  ost << "Parent: " << algtool_instance()->name() << endl;
69 
70  // Properties
71  ost << "Properties: [" << endl;
72 
73  for ( const auto& iprop : properties() ) {
74  iprop->fillStream( ost );
75  ost << endl;
76  }
77  ost << "]" << endl;
78 
79  } else {
80 
81  ind += 2;
82  indent( ost, ind );
83  ost << "<COMPONENT name=\"" << algtool_name() << "\" class=\"" << convert_string( algtool_type() )
84  << "\" version=\"" << convert_string( algtool_version() ) << "\" parent=\""
85  << convert_string( algtool_instance()->name() ) << "\">" << endl;
86 
87  for ( const auto& iprop : properties() ) {
88 
89  indent( ost, ind + 2 );
90  ost << "<PROPERTY name=\"" << iprop->name() << "\" value=\"" << convert_string( iprop->toString() )
91  << "\" documentation=\"" << convert_string( iprop->documentation() ) << "\">" << endl;
92  }
93 
94  indent( ost, ind );
95  ost << "</COMPONENT>" << endl;
96  }
97  return ost;
98 }

◆ jobHistory()

const JobHistory* AlgToolHistory::jobHistory ( ) const
inline

Definition at line 79 of file AlgToolHistory.h.

79 { return m_jobHistory; }

◆ name()

const std::string& AlgToolHistory::name ( ) const
inlineoverridevirtual

Implements IVersHistoryObj.

Definition at line 83 of file AlgToolHistory.h.

83 { return algtool_name(); }

◆ properties()

const PropertyList& AlgToolHistory::properties ( ) const
inlineoverridevirtual

Implements IVersHistoryObj.

Definition at line 76 of file AlgToolHistory.h.

76 { return m_properties; }

◆ type()

const std::string& AlgToolHistory::type ( ) const
inlineoverridevirtual

Implements IVersHistoryObj.

Definition at line 84 of file AlgToolHistory.h.

84 { return algtool_type(); }

◆ version()

const std::string& AlgToolHistory::version ( ) const
inlineoverridevirtual

Implements IVersHistoryObj.

Definition at line 85 of file AlgToolHistory.h.

85 { return algtool_version(); }

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream lhs,
const AlgToolHistory rhs 
)
friend

Definition at line 87 of file AlgToolHistory.h.

87 { return rhs.dump( lhs, false, 0 ); }

Member Data Documentation

◆ m_jobHistory

const JobHistory* AlgToolHistory::m_jobHistory
private

Definition at line 51 of file AlgToolHistory.h.

◆ m_name

std::string AlgToolHistory::m_name
private

Definition at line 42 of file AlgToolHistory.h.

◆ m_properties

PropertyList AlgToolHistory::m_properties
private

Definition at line 48 of file AlgToolHistory.h.

◆ m_tool

const AlgTool* AlgToolHistory::m_tool
private

Definition at line 45 of file AlgToolHistory.h.

◆ m_type

std::string AlgToolHistory::m_type
private

Definition at line 36 of file AlgToolHistory.h.

◆ m_version

std::string AlgToolHistory::m_version
private

Definition at line 39 of file AlgToolHistory.h.


The documentation for this class was generated from the following files:
AlgToolHistory::m_version
std::string m_version
Definition: AlgToolHistory.h:39
AlgToolHistory::m_name
std::string m_name
Definition: AlgToolHistory.h:42
AlgToolHistory::name
const std::string & name() const override
Definition: AlgToolHistory.h:83
AlgToolHistory::properties
const PropertyList & properties() const override
Definition: AlgToolHistory.h:76
std::move
T move(T... args)
AlgToolHistory::algtool_version
const std::string & algtool_version() const
Definition: AlgToolHistory.h:67
AlgToolHistory::m_jobHistory
const JobHistory * m_jobHistory
Definition: AlgToolHistory.h:51
AlgToolHistory::m_properties
PropertyList m_properties
Definition: AlgToolHistory.h:48
check_ParticleID.props
props
Definition: check_ParticleID.py:21
AlgToolHistory::algtool_name
const std::string & algtool_name() const
Definition: AlgToolHistory.h:70
AlgTool::type
const std::string & type() const override
Retrieve type (concrete class) of the sub-algtool.
Definition: AlgTool.cpp:74
AlgToolHistory::algtool_instance
const AlgTool * algtool_instance() const
Definition: AlgToolHistory.h:73
AlgTool::name
const std::string & name() const override
Retrieve full identifying name of the concrete tool object.
Definition: AlgTool.cpp:67
ManySmallAlgs.alg
alg
Definition: ManySmallAlgs.py:81
bug_34121.tool
tool
Definition: bug_34121.py:18
AlgToolHistory::m_type
std::string m_type
Definition: AlgToolHistory.h:36
AlgToolHistory::m_tool
const AlgTool * m_tool
Definition: AlgToolHistory.h:45
HistoryObj::indent
virtual void indent(std::ostream &, int) const
Definition: HistoryObj.cpp:56
AlgToolHistory::algtool_type
const std::string & algtool_type() const
Definition: AlgToolHistory.h:64
HistoryObj::convert_string
static std::string convert_string(const std::string &)
Definition: HistoryObj.cpp:30
CLID
unsigned int CLID
Class ID definition.
Definition: ClassID.h:18
AlgToolHistory::classID
static const CLID & classID()
Definition: AlgToolHistory.cpp:53
std::endl
T endl(T... args)
AlgToolHistory::dump
std::ostream & dump(std::ostream &, bool isXML, int indent) const override
Definition: AlgToolHistory.cpp:61