Gaudi Framework, version v25r0

Home   Generated: Mon Feb 17 2014
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | Private Types | Private Attributes | List of all members
GslErrorCount Class Reference

Concrete GSL error handler It is just counts number of GSL errors. More...

#include <GslErrorCount.h>

Inheritance diagram for GslErrorCount:
Inheritance graph
[legend]
Collaboration diagram for GslErrorCount:
Collaboration graph
[legend]

Public Member Functions

virtual StatusCode handle (const GslError &error) const
 handle the GSL error
 
virtual StatusCode finalize ()
 standard finalization of Tool
 
 GslErrorCount (const std::string &type, const std::string &name, const IInterface *parent)
 Standard constructor.
 
virtual ~GslErrorCount ()
 destructor (protected and virtual)
 
- Public Member Functions inherited from extends1< AlgTool, IGslErrorHandler >
 extends1 (A1 a1, A2 a2, A3 a3)
 Templated constructor with 3 arguments.
 
 extends1 (A1 a1, A2 a2)
 Templated constructor with 2 arguments.
 
 extends1 (A1 a1)
 Templated constructor with 1 argument.
 
 extends1 ()
 Default constructor.
 
virtual void * i_cast (const InterfaceID &tid) const
 Implementation of IInterface::i_cast.
 
virtual StatusCode queryInterface (const InterfaceID &ti, void **pp)
 Implementation of IInterface::queryInterface.
 
virtual std::vector< std::stringgetInterfaceNames () const
 Implementation of IInterface::getInterfaceNames.
 
virtual ~extends1 ()
 Virtual destructor.
 
- Public Member Functions inherited from AlgTool
virtual const std::stringname () const
 Retrieve full identifying name of the concrete tool object.
 
virtual const std::stringtype () const
 Retrieve type (concrete class) of the sub-algtool.
 
virtual const IInterfaceparent () const
 Retrieve parent of the sub-algtool.
 
virtual StatusCode configure ()
 
virtual StatusCode initialize ()
 
virtual StatusCode start ()
 
virtual StatusCode stop ()
 
virtual StatusCode terminate ()
 
virtual StatusCode reinitialize ()
 
virtual StatusCode restart ()
 
virtual Gaudi::StateMachine::State FSMState () const
 
virtual Gaudi::StateMachine::State targetFSMState () const
 
virtual StatusCode sysInitialize ()
 Initialize AlgTool.
 
virtual StatusCode sysStart ()
 Start AlgTool.
 
virtual StatusCode sysStop ()
 Stop AlgTool.
 
virtual StatusCode sysFinalize ()
 Finalize AlgTool.
 
virtual StatusCode sysReinitialize ()
 Initialize AlgTool.
 
virtual StatusCode sysRestart ()
 Start AlgTool.
 
virtual StatusCode setProperty (const Property &p)
 Default implementations for IProperty interface.
 
virtual StatusCode setProperty (const std::string &s)
 
virtual StatusCode setProperty (const std::string &n, const std::string &v)
 
virtual StatusCode getProperty (Property *p) const
 
virtual const PropertygetProperty (const std::string &name) const
 
virtual StatusCode getProperty (const std::string &n, std::string &v) const
 
virtual const std::vector
< Property * > & 
getProperties () const
 
PropertyMgrgetPropertyMgr ()
 
template<class TYPE >
StatusCode setProperty (const std::string &name, const TYPE &value)
 set the property form the value
 
 AlgTool (const std::string &type, const std::string &name, const IInterface *parent)
 Standard Constructor.
 
ISvcLocatorserviceLocator () const
 Retrieve pointer to service locator.
 
ISvcLocatorsvcLoc () const
 shortcut for the method service locator
 
IMessageSvcmsgSvc () const
 Retrieve pointer to message service.
 
IToolSvctoolSvc () const
 The standard ToolSvc service, Return a pointer to the service if present.
 
StatusCode setProperties ()
 Method for setting declared properties to the values specified in the jobOptions via the job option service.
 
template<class T >
StatusCode service (const std::string &name, T *&svc, 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 &type, const std::string &name, T *&svc) const
 Access a service by name, 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 declInterface (const InterfaceID &, void *)
 declare interface
 
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.
 
IAuditorSvcauditorSvc () const
 Access the auditor service.
 
IMonitorSvcmonitorSvc () 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)
 
- Public Member Functions inherited from extend_interfaces1< IGslErrorHandler >
virtual ~extend_interfaces1 ()
 Virtual destructor.
 
- Public Member Functions inherited from IGslErrorHandler
 DeclareInterfaceID (IGslErrorHandler, 2, 0)
 InterfaceID.
 
- Public Member Functions inherited from IAlgTool
 DeclareInterfaceID (IAlgTool, 3, 0)
 InterfaceID.
 
virtual ~IAlgTool ()
 Virtual destructor.
 
virtual const std::stringtype () const =0
 The type of an AlgTool, meaning the concrete AlgTool class.
 
virtual const IInterfaceparent () const =0
 The parent of the concrete AlgTool.
 
virtual StatusCode configure ()=0
 Configuration (from OFFLINE to CONFIGURED).
 
virtual StatusCode initialize ()=0
 Initialization (from CONFIGURED to INITIALIZED).
 
virtual StatusCode start ()=0
 Start (from INITIALIZED to RUNNING).
 
virtual StatusCode stop ()=0
 Stop (from RUNNING to INITIALIZED).
 
virtual StatusCode terminate ()=0
 Initialization (from CONFIGURED to OFFLINE).
 
virtual StatusCode reinitialize ()=0
 Initialization (from INITIALIZED or RUNNING to INITIALIZED, via CONFIGURED).
 
virtual StatusCode restart ()=0
 Initialization (from RUNNING to RUNNING, via INITIALIZED).
 
virtual Gaudi::StateMachine::State FSMState () const =0
 Get the current state.
 
virtual StatusCode sysInitialize ()=0
 Initialization of the Tool.
 
virtual StatusCode sysStart ()=0
 Initialization of the Tool.
 
virtual StatusCode sysStop ()=0
 Initialization of the Tool.
 
virtual StatusCode sysFinalize ()=0
 Finalization of the Tool.
 
virtual StatusCode sysReinitialize ()=0
 Initialization of the Tool.
 
virtual StatusCode sysRestart ()=0
 Initialization of the Tool.
 
virtual unsigned long refCount () const =0
 Current number of reference counts.
 
- Public Member Functions inherited from INamedInterface
 DeclareInterfaceID (INamedInterface, 1, 0)
 InterfaceID.
 
virtual const std::stringname () const =0
 Retrieve the name of the instance.
 
virtual ~INamedInterface ()
 Virtual destructor (always needed for abstract classes).
 
- Public Member Functions inherited from IInterface
virtual unsigned long addRef ()=0
 Increment the reference count of Interface instance.
 
virtual unsigned long release ()=0
 Release Interface instance.
 
virtual ~IInterface ()
 Virtual destructor.
 

Private Types

typedef std::map< GslError,
unsigned int
Counters
 container of error counters
 

Private Attributes

Counters m_counters
 

Additional Inherited Members

- Public Types inherited from extends1< AlgTool, IGslErrorHandler >
typedef extends1 base_class
 Typedef to this class.
 
typedef extend_interfaces1
< IGslErrorHandler
extend_interfaces_base
 Typedef to the base of this class.
 
typedef
extend_interfaces_base::ext_iids 
interfaces
 MPL set of all the implemented interfaces.
 
- Static Public Member Functions inherited from IInterface
static const InterfaceIDinterfaceID ()
 Return an instance of InterfaceID identifying the interface.
 
- Protected Member Functions inherited from AlgTool
int outputLevel () const
 get tool's output level
 
IntegerPropertyoutputLevelProperty ()
 Accessor for the Message level property.
 
void initOutputLevel (Property &prop)
 callback for output level property
 
virtual ~AlgTool ()
 
- Protected Member Functions inherited from IGslErrorHandler
virtual ~IGslErrorHandler ()
 destructor (virtual and protected)
 

Detailed Description

Concrete GSL error handler It is just counts number of GSL errors.

Author
Vanya Belyaev Ivan..nosp@m.Bely.nosp@m.aev@i.nosp@m.tep..nosp@m.ru
Date
30/04/2002

Definition at line 25 of file GslErrorCount.h.

Member Typedef Documentation

typedef std::map<GslError,unsigned int> GslErrorCount::Counters
private

container of error counters

Definition at line 60 of file GslErrorCount.h.

Constructor & Destructor Documentation

GslErrorCount::GslErrorCount ( const std::string type,
const std::string name,
const IInterface parent 
)

Standard constructor.

Declaration of the Tool Factory.

Parameters
typetool type (?)
nametool name
parentpointer to parent
See Also
ToolFactory
IToolFactory
IFactoryStandard constructor
Parameters
typetool type (?)
nametool name
parentpointer to parent

Definition at line 39 of file GslErrorCount.cpp.

: base_class ( type, name , parent )
{}
GslErrorCount::~GslErrorCount ( )
virtual

destructor (protected and virtual)

Definition at line 50 of file GslErrorCount.cpp.

{}

Member Function Documentation

StatusCode GslErrorCount::finalize ( )
virtual

standard finalization of Tool

See Also
AlgTool
IAlgTool
Returns
status code

Reimplemented from AlgTool.

Definition at line 60 of file GslErrorCount.cpp.

{
// printout the Error table
const std::string stars( 78 , '*' );
log << MSG::INFO << stars << endmsg ;
log << MSG::ERROR << m_counters.size() << " GSL errors handled" << endmsg ;
error != m_counters.end() ; ++error )
{
<< " #times " << error->second
<< " GSL code " << error->first.code
<< " Message '" << error->first.reason << "'"
<< " File '" << error->first.file << "'"
<< " Line " << error->first.line << endmsg ;
}
log << MSG::INFO << stars << endmsg ;
// clear the counters
// finalize the base class
return AlgTool::finalize ();
}
StatusCode GslErrorCount::handle ( const GslError error) const
virtual

handle the GSL error

See Also
IGslErrorHandler
Parameters
errorerror to be handled
See Also
GslError
Returns
status code

Implements IGslErrorHandler.

Definition at line 94 of file GslErrorCount.cpp.

{
// increase the counter
m_counters[ error ] += 1 ;
//
}

Member Data Documentation

Counters GslErrorCount::m_counters
mutableprivate

Definition at line 61 of file GslErrorCount.h.


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

Generated at Mon Feb 17 2014 14:38:03 for Gaudi Framework, version v25r0 by Doxygen version 1.8.2 written by Dimitri van Heesch, © 1997-2004