All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
PropertyAlg Class Reference

Trivial Algorithm for tutotial purposes. More...

#include <src/Test/PropertyAlg.h>

Inheritance diagram for PropertyAlg:
Collaboration diagram for PropertyAlg:

Public Member Functions

 PropertyAlg (const std::string &name, ISvcLocator *pSvcLocator)
 Constructor of this form must be provided.
 
StatusCode initialize ()
 Three mandatory member functions of any algorithm.
 
StatusCode execute ()
 
StatusCode finalize ()
 the default (empty) implementation of IStateful::finalize() method
 
- Public Member Functions inherited from Algorithm
 Algorithm (const std::string &name, ISvcLocator *svcloc, const std::string &version=PACKAGE_VERSION)
 Constructor.
 
virtual ~Algorithm ()
 Destructor.
 
virtual StatusCode sysStart ()
 Reinitialization method invoked by the framework.
 
virtual StatusCode sysInitialize ()
 Initialization method invoked by the framework.
 
virtual StatusCode sysReinitialize ()
 Reinitialization method invoked by the framework.
 
virtual StatusCode sysRestart ()
 Restart method invoked by the framework.
 
virtual StatusCode sysExecute ()
 The actions to be performed by the algorithm on an event.
 
virtual StatusCode sysStop ()
 System stop.
 
virtual StatusCode sysFinalize ()
 System finalization.
 
virtual StatusCode sysBeginRun ()
 beginRun method invoked by the framework.
 
virtual StatusCode sysEndRun ()
 endRun method invoked by the framework.
 
virtual const std::string & name () const
 The identifying name of the algorithm object.
 
virtual const std::string & version () const
 
virtual StatusCode configure ()
 Dummy implementation of IStateful::configure() method.
 
virtual StatusCode terminate ()
 Dummy implementation of IStateful::terminate() method.
 
virtual StatusCode start ()
 the default (empty) implementation of IStateful::start() method
 
virtual StatusCode stop ()
 the default (empty) implementation of IStateful::stop() method
 
virtual StatusCode reinitialize ()
 the default (empty) implementation of IStateful::reinitialize() method
 
virtual StatusCode restart ()
 the default (empty) implementation of IStateful::restart() method
 
virtual bool isExecuted () const
 Has this algorithm been executed since the last reset?
 
virtual void setExecuted (bool state)
 Set the executed flag to the specified state.
 
virtual void resetExecuted ()
 Reset the executed state of the Algorithm for the duration of the current event.
 
virtual StatusCode beginRun ()
 Algorithm begin run.
 
virtual StatusCode endRun ()
 Algorithm end run. This method is called at the end of the event loop.
 
virtual Gaudi::StateMachine::State FSMState () const
 returns the current state of the algorithm
 
virtual Gaudi::StateMachine::State targetFSMState () const
 returns the state the algorithm will be in after the ongoing transition
 
virtual bool isEnabled () const
 Is this algorithm enabled or disabled?
 
virtual bool filterPassed () const
 Did this algorithm pass or fail its filter criterion for the last event?
 
virtual void setFilterPassed (bool state)
 Set the filter passed flag to the specified state.
 
template<class T >
StatusCode service (const std::string &name, T *&psvc, bool createIf=true) const
 Access a service by name, creating it if it doesn't already exist.
 
template<class T >
StatusCode service (const std::string &svcType, const std::string &svcName, T *&psvc) const
 Access a service by name and type, creating it if it doesn't already exist.
 
SmartIF< IServiceservice (const std::string &name, const bool createIf=true, const bool quiet=false) const
 Return a pointer to the service identified by name (or "type/name")
 
void setOutputLevel (int level)
 Set the output level for current algorithm.
 
SmartIF< IAuditorSvc > & auditorSvc () const
 The standard auditor service.May not be invoked before sysInitialize() has been invoked.
 
SmartIF< IChronoStatSvc > & chronoSvc () const
 The standard Chrono & Stat service, Return a pointer to the service if present.
 
SmartIF< IChronoStatSvc > & chronoStatService () const
 Obsoleted name, kept due to the backwards compatibility.
 
SmartIF< IDataProviderSvc > & detSvc () const
 The standard detector data service.
 
SmartIF< IDataProviderSvc > & detDataService () const
 Obsoleted name, kept due to the backwards compatibility.
 
SmartIF< IConversionSvc > & detCnvSvc () const
 The standard detector data persistency conversion service.
 
SmartIF< IConversionSvc > & detDataCnvService () const
 Obsoleted name, kept due to the backwards compatibility.
 
SmartIF< IDataProviderSvc > & eventSvc () const
 The standard event data service.
 
SmartIF< IDataProviderSvc > & evtSvc () const
 shortcut for method eventSvc
 
SmartIF< IDataProviderSvc > & eventDataService () const
 Obsoleted name, kept due to the backwards compatibility.
 
SmartIF< IConversionSvc > & eventCnvSvc () const
 The standard event data persistency conversion service.
 
SmartIF< IConversionSvc > & eventDataCnvService () const
 Obsoleted name, kept due to the backwards compatibility.
 
SmartIF< IHistogramSvc > & histoSvc () const
 The standard histogram service.
 
SmartIF< IHistogramSvc > & histogramDataService () const
 Obsoleted name, kept due to the backwards compatibility.
 
SmartIF< IMessageSvc > & msgSvc () const
 The standard message service.
 
SmartIF< IMessageSvc > & messageService () const
 Obsoleted name, kept due to the backwards compatibility.
 
SmartIF< INTupleSvc > & ntupleSvc () const
 The standard N tuple service.
 
SmartIF< INTupleSvc > & ntupleService () const
 Obsoleted name, kept due to the backwards compatibility.
 
SmartIF< IRndmGenSvc > & randSvc () const
 AIDA-based NTuple service Returns a pointer to the AIDATuple service if present.
 
SmartIF< IToolSvc > & toolSvc () const
 The standard ToolSvc service, Return a pointer to the service if present.
 
SmartIF< IExceptionSvc > & exceptionSvc () const
 Get the exception Service.
 
SmartIF< IAlgContextSvc > & contextSvc () const
 get Algorithm Context Service
 
SmartIF< ISvcLocator > & serviceLocator () const
 The standard service locator.
 
SmartIF< ISvcLocator > & svcLoc () const
 shortcut for method serviceLocator
 
bool registerContext () const
 register for Algorithm Context Service?
 
StatusCode createSubAlgorithm (const std::string &type, const std::string &name, Algorithm *&pSubAlg)
 Create a sub algorithm.
 
std::vector< Algorithm * > * subAlgorithms () const
 List of sub-algorithms. Returns a pointer to a vector of (sub) Algorithms.
 
virtual StatusCode setProperty (const Property &p)
 Implementation of IProperty::setProperty.
 
virtual StatusCode setProperty (const std::string &s)
 Implementation of IProperty::setProperty.
 
virtual StatusCode setProperty (const std::string &n, const std::string &v)
 Implementation of IProperty::setProperty.
 
virtual StatusCode getProperty (Property *p) const
 Implementation of IProperty::getProperty.
 
virtual const PropertygetProperty (const std::string &name) const
 Implementation of IProperty::getProperty.
 
virtual StatusCode getProperty (const std::string &n, std::string &v) const
 Implementation of IProperty::getProperty.
 
virtual const std::vector
< Property * > & 
getProperties () const
 Implementation of IProperty::getProperties.
 
StatusCode setProperties ()
 Set the algorithm's properties.
 
template<class T >
PropertydeclareProperty (const std::string &name, T &property, const std::string &doc="none") const
 Declare the named property.
 
PropertydeclareRemoteProperty (const std::string &name, IProperty *rsvc, const std::string &rname="") const
 Declare remote named properties.
 
SmartIF< IMonitorSvc > & monitorSvc () const
 Access the monitor service.
 
template<class T >
void declareInfo (const std::string &name, const T &var, const std::string &desc) const
 Declare monitoring information.
 
void declareInfo (const std::string &name, const std::string &format, const void *var, int size, const std::string &desc) const
 Declare monitoring information (special case)
 
template<class TYPE >
StatusCode setProperty (const std::string &name, const TYPE &value)
 set the property form the value
 
 Algorithm (const std::string &name, ISvcLocator *svcloc, const std::string &version=PACKAGE_VERSION)
 Constructor.
 
virtual ~Algorithm ()
 Destructor.
 
virtual StatusCode sysStart ()
 Reinitialization method invoked by the framework.
 
virtual StatusCode sysInitialize ()
 Initialization method invoked by the framework.
 
virtual StatusCode sysReinitialize ()
 Reinitialization method invoked by the framework.
 
virtual StatusCode sysRestart ()
 Restart method invoked by the framework.
 
virtual StatusCode sysExecute ()
 The actions to be performed by the algorithm on an event.
 
virtual StatusCode sysStop ()
 System stop.
 
virtual StatusCode sysFinalize ()
 System finalization.
 
virtual StatusCode sysBeginRun ()
 beginRun method invoked by the framework.
 
virtual StatusCode sysEndRun ()
 endRun method invoked by the framework.
 
virtual const std::string & name () const
 The identifying name of the algorithm object.
 
virtual const std::string & version () const
 
virtual StatusCode configure ()
 Dummy implementation of IStateful::configure() method.
 
virtual StatusCode terminate ()
 Dummy implementation of IStateful::terminate() method.
 
virtual StatusCode start ()
 the default (empty) implementation of IStateful::start() method
 
virtual StatusCode stop ()
 the default (empty) implementation of IStateful::stop() method
 
virtual StatusCode reinitialize ()
 the default (empty) implementation of IStateful::reinitialize() method
 
virtual StatusCode restart ()
 the default (empty) implementation of IStateful::restart() method
 
virtual bool isExecuted () const
 Has this algorithm been executed since the last reset?
 
virtual void setExecuted (bool state)
 Set the executed flag to the specified state.
 
virtual void resetExecuted ()
 Reset the executed state of the Algorithm for the duration of the current event.
 
virtual StatusCode beginRun ()
 Algorithm begin run.
 
virtual StatusCode endRun ()
 Algorithm end run. This method is called at the end of the event loop.
 
virtual Gaudi::StateMachine::State FSMState () const
 returns the current state of the algorithm
 
virtual Gaudi::StateMachine::State targetFSMState () const
 returns the state the algorithm will be in after the ongoing transition
 
virtual bool isEnabled () const
 Is this algorithm enabled or disabled?
 
virtual bool filterPassed () const
 Did this algorithm pass or fail its filter criterion for the last event?
 
virtual void setFilterPassed (bool state)
 Set the filter passed flag to the specified state.
 
template<class T >
StatusCode service (const std::string &name, T *&psvc, bool createIf=true) const
 Access a service by name, creating it if it doesn't already exist.
 
template<class T >
StatusCode service (const std::string &svcType, const std::string &svcName, T *&psvc) const
 Access a service by name and type, creating it if it doesn't already exist.
 
SmartIF< IServiceservice (const std::string &name, const bool createIf=true, const bool quiet=false) const
 Return a pointer to the service identified by name (or "type/name")
 
void setOutputLevel (int level)
 Set the output level for current algorithm.
 
SmartIF< IAuditorSvc > & auditorSvc () const
 The standard auditor service.May not be invoked before sysInitialize() has been invoked.
 
SmartIF< IChronoStatSvc > & chronoSvc () const
 The standard Chrono & Stat service, Return a pointer to the service if present.
 
SmartIF< IChronoStatSvc > & chronoStatService () const
 Obsoleted name, kept due to the backwards compatibility.
 
SmartIF< IDataProviderSvc > & detSvc () const
 The standard detector data service.
 
SmartIF< IDataProviderSvc > & detDataService () const
 Obsoleted name, kept due to the backwards compatibility.
 
SmartIF< IConversionSvc > & detCnvSvc () const
 The standard detector data persistency conversion service.
 
SmartIF< IConversionSvc > & detDataCnvService () const
 Obsoleted name, kept due to the backwards compatibility.
 
SmartIF< IDataProviderSvc > & eventSvc () const
 The standard event data service.
 
SmartIF< IDataProviderSvc > & evtSvc () const
 shortcut for method eventSvc
 
SmartIF< IDataProviderSvc > & eventDataService () const
 Obsoleted name, kept due to the backwards compatibility.
 
SmartIF< IConversionSvc > & eventCnvSvc () const
 The standard event data persistency conversion service.
 
SmartIF< IConversionSvc > & eventDataCnvService () const
 Obsoleted name, kept due to the backwards compatibility.
 
SmartIF< IHistogramSvc > & histoSvc () const
 The standard histogram service.
 
SmartIF< IHistogramSvc > & histogramDataService () const
 Obsoleted name, kept due to the backwards compatibility.
 
SmartIF< IMessageSvc > & msgSvc () const
 The standard message service.
 
SmartIF< IMessageSvc > & messageService () const
 Obsoleted name, kept due to the backwards compatibility.
 
SmartIF< INTupleSvc > & ntupleSvc () const
 The standard N tuple service.
 
SmartIF< INTupleSvc > & ntupleService () const
 Obsoleted name, kept due to the backwards compatibility.
 
SmartIF< IRndmGenSvc > & randSvc () const
 AIDA-based NTuple service Returns a pointer to the AIDATuple service if present.
 
SmartIF< IToolSvc > & toolSvc () const
 The standard ToolSvc service, Return a pointer to the service if present.
 
SmartIF< IExceptionSvc > & exceptionSvc () const
 Get the exception Service.
 
SmartIF< IAlgContextSvc > & contextSvc () const
 get Algorithm Context Service
 
SmartIF< ISvcLocator > & serviceLocator () const
 The standard service locator.
 
SmartIF< ISvcLocator > & svcLoc () const
 shortcut for method serviceLocator
 
bool registerContext () const
 register for Algorithm Context Service?
 
StatusCode createSubAlgorithm (const std::string &type, const std::string &name, Algorithm *&pSubAlg)
 Create a sub algorithm.
 
std::vector< Algorithm * > * subAlgorithms () const
 List of sub-algorithms. Returns a pointer to a vector of (sub) Algorithms.
 
virtual StatusCode setProperty (const Property &p)
 Implementation of IProperty::setProperty.
 
virtual StatusCode setProperty (const std::string &s)
 Implementation of IProperty::setProperty.
 
virtual StatusCode setProperty (const std::string &n, const std::string &v)
 Implementation of IProperty::setProperty.
 
virtual StatusCode getProperty (Property *p) const
 Implementation of IProperty::getProperty.
 
virtual const PropertygetProperty (const std::string &name) const
 Implementation of IProperty::getProperty.
 
virtual StatusCode getProperty (const std::string &n, std::string &v) const
 Implementation of IProperty::getProperty.
 
virtual const std::vector
< Property * > & 
getProperties () const
 Implementation of IProperty::getProperties.
 
StatusCode setProperties ()
 Set the algorithm's properties.
 
template<class T >
PropertydeclareProperty (const std::string &name, T &property, const std::string &doc="none") const
 Declare the named property.
 
PropertydeclareRemoteProperty (const std::string &name, IProperty *rsvc, const std::string &rname="") const
 Declare remote named properties.
 
SmartIF< IMonitorSvc > & monitorSvc () const
 Access the monitor service.
 
template<class T >
void declareInfo (const std::string &name, const T &var, const std::string &desc) const
 Declare monitoring information.
 
void declareInfo (const std::string &name, const std::string &format, const void *var, int size, const std::string &desc) const
 Declare monitoring information (special case)
 
template<class TYPE >
StatusCode setProperty (const std::string &name, const TYPE &value)
 set the property form the value
 

Private Attributes

bool m_bool
 These data members are used in the execution of this algorithm They are set in the initialisation phase by the job options service.
 
char m_char
 
signed char m_schar
 
unsigned char m_uchar
 
short m_short
 
unsigned short m_ushort
 
int m_int
 
unsigned int m_uint
 
long m_long
 
unsigned long m_ulong
 
long long m_longlong
 
unsigned long long m_ulonglong
 
float m_float
 
double m_double
 
std::string m_string
 
std::vector< bool > m_boolarray
 
std::vector< char > m_chararray
 
std::vector< unsigned char > m_uchararray
 
std::vector< signed char > m_schararray
 
std::vector< short > m_shortarray
 
std::vector< unsigned short > m_ushortarray
 
std::vector< int > m_intarray
 
std::vector< unsigned int > m_uintarray
 
std::vector< long > m_longarray
 
std::vector< unsigned long > m_ulongarray
 
std::vector< long long > m_longlongarray
 
std::vector< unsigned long long > m_ulonglongarray
 
std::vector< float > m_floatarray
 
std::vector< double > m_doublearray
 
std::vector< std::string > m_stringarray
 

Additional Inherited Members

- Public Types inherited from Algorithm
typedef
Gaudi::PluginService::Factory
< IAlgorithm *, const
std::string &, ISvcLocator * > 
Factory
 
typedef
Gaudi::PluginService::Factory
< IAlgorithm *, const
std::string &, ISvcLocator * > 
Factory
 
- Protected Member Functions inherited from Algorithm
bool isInitialized () const
 Has the Algorithm already been initialized?
 
bool isFinalized () const
 Has the Algorithm already been finalized?
 
int outputLevel () const
 retrieve the Algorithm output level
 
IntegerPropertyoutputLevelProperty ()
 Accessor for the Message level property.
 
void initOutputLevel (Property &prop)
 callback for output level property
 
bool isInitialized () const
 Has the Algorithm already been initialized?
 
bool isFinalized () const
 Has the Algorithm already been finalized?
 
int outputLevel () const
 retrieve the Algorithm output level
 
IntegerPropertyoutputLevelProperty ()
 Accessor for the Message level property.
 
void initOutputLevel (Property &prop)
 callback for output level property
 

Detailed Description

Trivial Algorithm for tutotial purposes.

Author
nobody

Definition at line 15 of file PropertyAlg.h.

Constructor & Destructor Documentation

PropertyAlg::PropertyAlg ( const std::string &  name,
ISvcLocator pSvcLocator 
)

Constructor of this form must be provided.

Definition at line 16 of file PropertyAlg.cpp.

: Algorithm(name, ploc) {
//------------------------------------------------------------------------------
// Declare the algorithm's properties
declareProperty( "Bool", m_bool = true);
declareProperty( "Char", m_char = 100);
declareProperty( "Uchar", m_uchar = 100);
declareProperty( "Schar", m_schar = 100);
declareProperty( "Short", m_short = 100);
declareProperty( "Ushort", m_ushort = 100);
declareProperty( "Int", m_int = 100);
declareProperty( "Uint", m_uint = 100);
declareProperty( "Long", m_long = 100L);
declareProperty( "Ulong", m_ulong = 100L);
declareProperty( "Longlong", m_longlong = 100LL);
declareProperty( "Ulonglong", m_ulonglong = 100LL);
declareProperty( "Float", m_float = 100.0F);
declareProperty( "Double", m_double = 100.);
declareProperty( "String", m_string = "hundred");
declareProperty( "BoolArray", m_boolarray );
declareProperty( "CharArray", m_chararray );
declareProperty( "UcharArray", m_uchararray );
declareProperty( "ScharArray", m_schararray );
declareProperty( "ShortArray", m_shortarray );
declareProperty( "UshortArray", m_ushortarray );
declareProperty( "IntArray", m_intarray );
declareProperty( "UintArray", m_uintarray );
declareProperty( "LongArray", m_longarray );
declareProperty( "UlongArray", m_ulongarray );
declareProperty( "LonglongArray", m_longlongarray );
declareProperty( "UlonglongArray", m_ulonglongarray );
declareProperty( "FloatArray", m_floatarray );
declareProperty( "DoubleArray", m_doublearray );
declareProperty( "StringArray", m_stringarray );
}

Member Function Documentation

StatusCode PropertyAlg::execute ( )
inline

Definition at line 22 of file PropertyAlg.h.

StatusCode PropertyAlg::finalize ( )
inlinevirtual

the default (empty) implementation of IStateful::finalize() method

Reimplemented from Algorithm.

Definition at line 23 of file PropertyAlg.h.

StatusCode PropertyAlg::initialize ( )
inlinevirtual

Three mandatory member functions of any algorithm.

Reimplemented from Algorithm.

Definition at line 21 of file PropertyAlg.h.

Member Data Documentation

bool PropertyAlg::m_bool
private

These data members are used in the execution of this algorithm They are set in the initialisation phase by the job options service.

Definition at line 29 of file PropertyAlg.h.

std::vector<bool> PropertyAlg::m_boolarray
private

Definition at line 45 of file PropertyAlg.h.

char PropertyAlg::m_char
private

Definition at line 30 of file PropertyAlg.h.

std::vector<char> PropertyAlg::m_chararray
private

Definition at line 46 of file PropertyAlg.h.

double PropertyAlg::m_double
private

Definition at line 42 of file PropertyAlg.h.

std::vector<double> PropertyAlg::m_doublearray
private

Definition at line 58 of file PropertyAlg.h.

float PropertyAlg::m_float
private

Definition at line 41 of file PropertyAlg.h.

std::vector<float> PropertyAlg::m_floatarray
private

Definition at line 57 of file PropertyAlg.h.

int PropertyAlg::m_int
private

Definition at line 35 of file PropertyAlg.h.

std::vector<int> PropertyAlg::m_intarray
private

Definition at line 51 of file PropertyAlg.h.

long PropertyAlg::m_long
private

Definition at line 37 of file PropertyAlg.h.

std::vector<long> PropertyAlg::m_longarray
private

Definition at line 53 of file PropertyAlg.h.

long long PropertyAlg::m_longlong
private

Definition at line 39 of file PropertyAlg.h.

std::vector<long long> PropertyAlg::m_longlongarray
private

Definition at line 55 of file PropertyAlg.h.

signed char PropertyAlg::m_schar
private

Definition at line 31 of file PropertyAlg.h.

std::vector<signed char> PropertyAlg::m_schararray
private

Definition at line 48 of file PropertyAlg.h.

short PropertyAlg::m_short
private

Definition at line 33 of file PropertyAlg.h.

std::vector<short> PropertyAlg::m_shortarray
private

Definition at line 49 of file PropertyAlg.h.

std::string PropertyAlg::m_string
private

Definition at line 43 of file PropertyAlg.h.

std::vector<std::string> PropertyAlg::m_stringarray
private

Definition at line 59 of file PropertyAlg.h.

unsigned char PropertyAlg::m_uchar
private

Definition at line 32 of file PropertyAlg.h.

std::vector<unsigned char> PropertyAlg::m_uchararray
private

Definition at line 47 of file PropertyAlg.h.

unsigned int PropertyAlg::m_uint
private

Definition at line 36 of file PropertyAlg.h.

std::vector<unsigned int> PropertyAlg::m_uintarray
private

Definition at line 52 of file PropertyAlg.h.

unsigned long PropertyAlg::m_ulong
private

Definition at line 38 of file PropertyAlg.h.

std::vector<unsigned long> PropertyAlg::m_ulongarray
private

Definition at line 54 of file PropertyAlg.h.

unsigned long long PropertyAlg::m_ulonglong
private

Definition at line 40 of file PropertyAlg.h.

std::vector<unsigned long long> PropertyAlg::m_ulonglongarray
private

Definition at line 56 of file PropertyAlg.h.

unsigned short PropertyAlg::m_ushort
private

Definition at line 34 of file PropertyAlg.h.

std::vector<unsigned short> PropertyAlg::m_ushortarray
private

Definition at line 50 of file PropertyAlg.h.


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