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

#include <src/JobOptionsSvc/JobOptionsSvc.h>

Inheritance diagram for JobOptionsSvc:
Collaboration diagram for JobOptionsSvc:

Public Types

typedef std::vector< const
Property * > 
PropertiesT
 
- Public Types inherited from extends2< Service, IProperty, IJobOptionsSvc >
typedef extends2 base_class
 Typedef to this class. More...
 
typedef extend_interfaces2
< IProperty, IJobOptionsSvc
extend_interfaces_base
 Typedef to the base of this class. More...
 
typedef
extend_interfaces_base::ext_iids 
interfaces
 MPL set of all the implemented interfaces. More...
 
- Public Types inherited from Service
typedef
Gaudi::PluginService::Factory2
< IService *, const
std::string &, ISvcLocator * > 
Factory
 
- Public Types inherited from CommonMessaging< implements3< IService, IProperty, IStateful > >
typedef CommonMessaging base_class
 
- Public Types inherited from implements3< IService, IProperty, IStateful >
typedef implements3 base_class
 Typedef to this class. More...
 
typedef extend_interfaces3
< IService, IProperty,
IStateful
extend_interfaces_base
 Typedef to the base of this class. More...
 
typedef
extend_interfaces_base::ext_iids 
interfaces
 MPL set of all the implemented interfaces. More...
 
- Public Types inherited from extend_interfaces3< IService, IProperty, IStateful >
typedef mpl::fold< typename
IService::iid::iids::type,
typename mpl::fold< typename
IProperty::iid::iids::type,
typename
IStateful::iid::iids::type,
mpl::insert< mpl::_1, mpl::_2 >
>::type, mpl::insert< mpl::_1,
mpl::_2 > >::type 
ext_iids
 MPL set of interfaces extended by this one. More...
 
- Public Types inherited from IInterface
enum  Status { SUCCESS = 1, NO_INTERFACE, VERSMISMATCH, LAST_ERROR }
 Return status. More...
 
typedef Gaudi::InterfaceId
< IInterface, 0, 0 > 
iid
 Interface ID. More...
 
typedef mpl::set1< iidext_iids
 Extra interfaces. More...
 
- Public Types inherited from extend_interfaces2< IProperty, IJobOptionsSvc >
typedef mpl::fold< typename
IProperty::iid::iids::type,
typename
IJobOptionsSvc::iid::iids::type,
mpl::insert< mpl::_1, mpl::_2 >
>::type 
ext_iids
 MPL set of interfaces extended by this one. More...
 

Public Member Functions

 JobOptionsSvc (const std::string &name, ISvcLocator *svc)
 
virtual ~JobOptionsSvc ()
 destructor More...
 
virtual StatusCode initialize ()
 Initialization (from CONFIGURED to INITIALIZED). More...
 
virtual StatusCode finalize ()
 Service finalization method. More...
 
virtual StatusCode setMyProperties (const std::string &client, IProperty *me)
 Override default properties of the calling client. More...
 
virtual StatusCode addPropertyToCatalogue (const std::string &client, const Property &property)
 Add a property into the JobOptions catalog. More...
 
virtual StatusCode removePropertyFromCatalogue (const std::string &client, const std::string &name)
 Remove a property from the JobOptions catalog. More...
 
virtual const std::vector
< const Property * > * 
getProperties (const std::string &client) const
 Get the properties associated to a given client. More...
 
virtual std::vector< std::string > getClients () const
 Get the list of clients. More...
 
virtual StatusCode readOptions (const std::string &file, const std::string &path="")
 look for file 'file' into search path 'path' and read it to update existing JobOptionsCatalogue More...
 
StatusCode setProperty (const Property &p)
 IProperty implementation (needed for initialisation) More...
 
StatusCode getProperty (Property *p) const
 Get the property by property. More...
 
- Public Member Functions inherited from extends2< Service, IProperty, IJobOptionsSvc >
 extends2 (A1 a1, A2 a2, A3 a3)
 Templated constructor with 3 arguments. More...
 
 extends2 (A1 a1, A2 a2)
 Templated constructor with 2 arguments. More...
 
 extends2 (A1 a1)
 Templated constructor with 1 argument. More...
 
 extends2 ()
 Default constructor. More...
 
virtual void * i_cast (const InterfaceID &tid) const
 Implementation of IInterface::i_cast. More...
 
virtual StatusCode queryInterface (const InterfaceID &ti, void **pp)
 Implementation of IInterface::queryInterface. More...
 
virtual std::vector< std::string > getInterfaceNames () const
 Implementation of IInterface::getInterfaceNames. More...
 
virtual ~extends2 ()
 Virtual destructor. More...
 
- Public Member Functions inherited from Service
virtual unsigned long release ()
 Release Interface instance. More...
 
virtual const std::string & name () const
 Retrieve name of the service. More...
 
virtual StatusCode configure ()
 Configuration (from OFFLINE to CONFIGURED). More...
 
virtual StatusCode start ()
 Start (from INITIALIZED to RUNNING). More...
 
virtual StatusCode stop ()
 Stop (from RUNNING to INITIALIZED). More...
 
virtual StatusCode terminate ()
 Initialization (from CONFIGURED to OFFLINE). More...
 
virtual Gaudi::StateMachine::State FSMState () const
 Get the current state. More...
 
virtual Gaudi::StateMachine::State targetFSMState () const
 When we are in the middle of a transition, get the state where the transition is leading us. More...
 
virtual StatusCode reinitialize ()
 Initialization (from INITIALIZED or RUNNING to INITIALIZED, via CONFIGURED). More...
 
virtual StatusCode restart ()
 Initialization (from RUNNING to RUNNING, via INITIALIZED). More...
 
virtual StatusCode sysInitialize ()
 Initialize Service. More...
 
virtual StatusCode sysStart ()
 Initialize Service. More...
 
virtual StatusCode sysStop ()
 Initialize Service. More...
 
virtual StatusCode sysFinalize ()
 Finalize Service. More...
 
virtual StatusCode sysReinitialize ()
 Re-initialize the Service. More...
 
virtual StatusCode sysRestart ()
 Re-initialize the Service. More...
 
virtual StatusCode setProperty (const std::string &s)
 Set the property by string. More...
 
virtual StatusCode setProperty (const std::string &n, const std::string &v)
 Set the property by std::string. More...
 
virtual const PropertygetProperty (const std::string &name) const
 Get the property by name. More...
 
virtual StatusCode getProperty (const std::string &n, std::string &v) const
 Get the property by std::string. More...
 
virtual const std::vector
< Property * > & 
getProperties () const
 Get list of properties. More...
 
template<class TYPE >
StatusCode setProperty (const std::string &name, const TYPE &value)
 set the property form the value More...
 
 Service (const std::string &name, ISvcLocator *svcloc)
 Standard Constructor. More...
 
SmartIF< ISvcLocator > & serviceLocator () const
 Retrieve pointer to service locator. More...
 
StatusCode setProperties ()
 Method for setting declared properties to the values specified for the job. More...
 
template<class T >
StatusCode service (const std::string &name, const T *&psvc, bool createIf=true) const
 Access a service by name, creating it if it doesn't already exist. More...
 
template<class T >
StatusCode service (const std::string &name, T *&psvc, bool createIf=true) const
 
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. More...
 
template<class T >
PropertydeclareProperty (const std::string &name, T &property, const std::string &doc="none") const
 Declare the named property. More...
 
PropertydeclareRemoteProperty (const std::string &name, IProperty *rsvc, const std::string &rname="") const
 Declare remote named properties. More...
 
SmartIF< IAuditorSvc > & auditorSvc () const
 The standard auditor service.May not be invoked before sysInitialize() has been invoked. More...
 
- Public Member Functions inherited from CommonMessaging< implements3< IService, IProperty, IStateful > >
 CommonMessaging (const A1 &a1, const A2 &a2, const A3 &a3)
 Templated constructor with 3 arguments. More...
 
 CommonMessaging (const A1 &a1, const A2 &a2)
 Templated constructor with 2 arguments. More...
 
 CommonMessaging (const A1 &a1)
 Templated constructor with 1 argument. More...
 
 CommonMessaging ()
 Default constructor. More...
 
virtual ~CommonMessaging ()
 Virtual destructor. More...
 
SmartIF< IMessageSvc > & msgSvc () const
 The standard message service. More...
 
MsgStreammsgStream () const
 Return an uninitialized MsgStream. More...
 
MsgStreammsgStream (const MSG::Level level) const
 Predefined configurable message stream for the efficient printouts. More...
 
MsgStreamalways () const
 shortcut for the method msgStream(MSG::ALWAYS) More...
 
MsgStreamfatal () const
 shortcut for the method msgStream(MSG::FATAL) More...
 
MsgStreamerr () const
 shortcut for the method msgStream(MSG::ERROR) More...
 
MsgStreamerror () const
 shortcut for the method msgStream(MSG::ERROR) More...
 
MsgStreamwarning () const
 shortcut for the method msgStream(MSG::WARNING) More...
 
MsgStreaminfo () const
 shortcut for the method msgStream(MSG::INFO) More...
 
MsgStreamdebug () const
 shortcut for the method msgStream(MSG::DEBUG) More...
 
MsgStreamverbose () const
 shortcut for the method msgStream(MSG::VERBOSE) More...
 
MsgStreammsg () const
 shortcut for the method msgStream(MSG::INFO) More...
 
MSG::Level msgLevel () const
 get the output level from the embedded MsgStream More...
 
bool msgLevel (MSG::Level lvl) const
 get the output level from the embedded MsgStream More...
 
- Public Member Functions inherited from extend_interfaces3< IService, IProperty, IStateful >
virtual ~extend_interfaces3 ()
 Virtual destructor. More...
 
- Public Member Functions inherited from IService
 DeclareInterfaceID (IService, 3, 0)
 InterfaceID. More...
 
virtual ~IService ()
 virtual destructor More...
 
- Public Member Functions inherited from INamedInterface
 DeclareInterfaceID (INamedInterface, 1, 0)
 InterfaceID. More...
 
virtual ~INamedInterface ()
 Virtual destructor (always needed for abstract classes). More...
 
- Public Member Functions inherited from IInterface
virtual unsigned long addRef ()=0
 Increment the reference count of Interface instance. More...
 
virtual unsigned long refCount () const =0
 Current reference count. More...
 
virtual ~IInterface ()
 Virtual destructor. More...
 
- Public Member Functions inherited from IProperty
 DeclareInterfaceID (IProperty, 2, 0)
 InterfaceID. More...
 
- Public Member Functions inherited from IStateful
 DeclareInterfaceID (IStateful, 1, 0)
 InterfaceID. More...
 
virtual ~IStateful ()
 
- Public Member Functions inherited from extend_interfaces2< IProperty, IJobOptionsSvc >
virtual ~extend_interfaces2 ()
 Virtual destructor. More...
 
- Public Member Functions inherited from IJobOptionsSvc
 DeclareInterfaceID (IJobOptionsSvc, 4, 0)
 InterfaceID. More...
 

Private Member Functions

void fillServiceCatalog (const Gaudi::Parsers::Catalog &catalog)
 
void dump (const std::string &file, const Gaudi::Parsers::Catalog &catalog) const
 

Private Attributes

PropertyMgr m_pmgr
 dump the content of Properties catalog to the predefined file More...
 
std::string m_source_path
 
std::string m_source_type
 
std::string m_dir_search_path
 
std::string m_dump
 
SvcCatalog m_svc_catalog
 

Additional Inherited Members

- Static Public Member Functions inherited from IInterface
static const InterfaceIDinterfaceID ()
 Return an instance of InterfaceID identifying the interface. More...
 
- Protected Member Functions inherited from Service
virtual ~Service ()
 Standard Destructor. More...
 
int outputLevel () const
 get the Service's output level More...
 
- Protected Member Functions inherited from CommonMessaging< implements3< IService, IProperty, IStateful > >
void updateMsgStreamOutputLevel (int level)
 Update the output level of the cached MsgStream. More...
 
- Protected Attributes inherited from Service
IntegerProperty m_outputLevel
 Service output level. More...
 
Gaudi::StateMachine::State m_state
 Service state. More...
 
Gaudi::StateMachine::State m_targetState
 Service state. More...
 
- Protected Attributes inherited from CommonMessaging< implements3< IService, IProperty, IStateful > >
SmartIF< IMessageSvcm_msgsvc
 Pointer to the message service;. More...
 
std::auto_ptr< MsgStreamm_msgStream
 The predefined message stream. More...
 
bool m_streamWithService
 Flag to create a new MsgStream if it was created without the message service. More...
 

Detailed Description

Definition at line 21 of file JobOptionsSvc.h.

Member Typedef Documentation

typedef std::vector<const Property*> JobOptionsSvc::PropertiesT

Definition at line 23 of file JobOptionsSvc.h.

Constructor & Destructor Documentation

JobOptionsSvc::JobOptionsSvc ( const std::string &  name,
ISvcLocator svc 
)

Definition at line 30 of file JobOptionsSvc.cpp.

30  :
31 base_class(name,svc),
32 m_pmgr()
33 , m_source_path()
34 , m_source_type()
36 , m_dump()
37 {
38  std::string tmp ;
39  tmp = System::getEnv ( "JOBOPTSEARCHPATH" ) ;
40  if ( !tmp.empty() && ("UNKNOWN" != tmp) ) { m_dir_search_path = tmp ; }
41  tmp = System::getEnv ( "JOBOPTSDUMPFILE" ) ;
42  if ( !tmp.empty() && ("UNKNOWN" != tmp) ) { m_dump = tmp ; }
43 
46  m_pmgr.declareProperty( "SEARCHPATH" , m_dir_search_path ) ;
47  m_pmgr.declareProperty( "DUMPFILE" , m_dump ) ;
48 }
GAUDI_API std::string getEnv(const char *var)
get a particular environment variable (returning "UNKNOWN" if not set)
Definition: System.cpp:608
std::string m_source_type
Definition: JobOptionsSvc.h:78
extends2 base_class
Typedef to this class.
Definition: extends.h:77
std::string m_dir_search_path
Definition: JobOptionsSvc.h:79
Property * declareProperty(const std::string &name, TYPE &value, const std::string &doc="none")
Declare a property (templated)
Definition: PropertyMgr.h:177
std::string m_dump
Definition: JobOptionsSvc.h:80
virtual const std::string & name() const
Retrieve name of the service.
Definition: Service.cpp:331
PropertyMgr m_pmgr
dump the content of Properties catalog to the predefined file
Definition: JobOptionsSvc.h:76
std::string m_source_path
Definition: JobOptionsSvc.h:77
virtual JobOptionsSvc::~JobOptionsSvc ( )
inlinevirtual

destructor

Definition at line 31 of file JobOptionsSvc.h.

31 {};

Member Function Documentation

StatusCode JobOptionsSvc::addPropertyToCatalogue ( const std::string &  client,
const Property property 
)
virtual

Add a property into the JobOptions catalog.

Implements IJobOptionsSvc.

Definition at line 83 of file JobOptionsSvc.cpp.

85 {
86  Property* p = new StringProperty ( property.name(), "" ) ;
87  if ( !property.load( *p ) ) { delete p ; return StatusCode::FAILURE ; }
88  return m_svc_catalog.addProperty( client , p );
89 }
const std::string & name() const
property name
Definition: Property.h:47
SvcCatalog m_svc_catalog
Definition: JobOptionsSvc.h:81
StatusCode addProperty(const std::string &client, const Property *property)
Definition: SvcCatalog.cpp:36
virtual bool load(Property &dest) const =0
export the property value to the destination
SimpleProperty< std::string > StringProperty
Definition: Property.h:743
Property base class allowing Property* collections to be "homogeneous".
Definition: Property.h:43
void JobOptionsSvc::dump ( const std::string &  file,
const Gaudi::Parsers::Catalog catalog 
) const
private

Definition at line 139 of file JobOptionsSvc.cpp.

140  {
141  MsgStream log ( msgSvc() , name() ) ;
142  std::ofstream out
143  ( file.c_str() , std::ios_base::out | std::ios_base::trunc ) ;
144  // perform the actual dumping
145  if ( !out ) {
146  log << MSG::ERROR << "Unable to open dump-file \""+file+"\"" << endmsg ;
147  return ; // RETURN
148  }
149  else {
150  log << MSG::INFO << "Properties are dumped into \""+file+"\"" << endmsg ;
151  }
152  // perform the actual dump:
153  out << catalog;
154 }
Definition of the MsgStream class used to transmit messages.
Definition: MsgStream.h:24
SmartIF< IMessageSvc > & msgSvc() const
The standard message service.
list file
Definition: ana.py:160
virtual const std::string & name() const
Retrieve name of the service.
Definition: Service.cpp:331
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:243
void JobOptionsSvc::fillServiceCatalog ( const Gaudi::Parsers::Catalog catalog)
private

Definition at line 156 of file JobOptionsSvc.cpp.

156  {
157  BOOST_FOREACH(const gp::Catalog::value_type& client, catalog) {
158  for (gp::Catalog::CatalogSet::mapped_type::const_iterator current
159  = client.second.begin(); current != client.second.end();
160  ++current) {
161  StringProperty tmp (current->NameInClient(), current->ValueAsString()) ;
162  addPropertyToCatalogue ( client.first , tmp ) ;
163  }
164  }
165 }
virtual StatusCode addPropertyToCatalogue(const std::string &client, const Property &property)
Add a property into the JobOptions catalog.
StatusCode JobOptionsSvc::finalize ( )
virtual

Service finalization method.

Reimplemented from Service.

Definition at line 76 of file JobOptionsSvc.cpp.

77 {
78  // finalize the base class
79  return Service::finalize();
80 }
virtual StatusCode finalize()
Finalize (from INITIALIZED to CONFIGURED).
Definition: Service.cpp:199
std::vector< std::string > JobOptionsSvc::getClients ( ) const
virtual

Get the list of clients.

Implements IJobOptionsSvc.

Definition at line 134 of file JobOptionsSvc.cpp.

134  {
135  return m_svc_catalog.getClients();
136 }
SvcCatalog m_svc_catalog
Definition: JobOptionsSvc.h:81
std::vector< std::string > getClients() const
Definition: SvcCatalog.cpp:73
const JobOptionsSvc::PropertiesT * JobOptionsSvc::getProperties ( const std::string &  client) const
virtual

Get the properties associated to a given client.

Implements IJobOptionsSvc.

Definition at line 100 of file JobOptionsSvc.cpp.

101 {
102  return m_svc_catalog.getProperties(client);
103 }
const PropertiesT * getProperties(const std::string &client) const
Definition: SvcCatalog.cpp:71
SvcCatalog m_svc_catalog
Definition: JobOptionsSvc.h:81
StatusCode JobOptionsSvc::getProperty ( Property p) const
virtual

Get the property by property.

Reimplemented from Service.

Definition at line 55 of file JobOptionsSvc.cpp.

56 {
57 
58  return m_pmgr.getProperty( p );
59 }
StatusCode getProperty(Property *p) const
get the property
PropertyMgr m_pmgr
dump the content of Properties catalog to the predefined file
Definition: JobOptionsSvc.h:76
StatusCode JobOptionsSvc::initialize ( )
virtual

Initialization (from CONFIGURED to INITIALIZED).

Reimplemented from Service.

Definition at line 61 of file JobOptionsSvc.cpp.

62 {
63  // Call base class initializer
65  if( !sc.isSuccess() ) return sc;
66  // Read the job options if needed
67  if ( this->m_source_type == "NONE" ) {
69  }
70  else {
72  }
73  return sc;
74 }
std::string m_source_type
Definition: JobOptionsSvc.h:78
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:62
std::string m_dir_search_path
Definition: JobOptionsSvc.h:79
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
virtual StatusCode initialize()
Initialization (from CONFIGURED to INITIALIZED).
Definition: Service.cpp:74
virtual StatusCode readOptions(const std::string &file, const std::string &path="")
look for file 'file' into search path 'path' and read it to update existing JobOptionsCatalogue ...
std::string m_source_path
Definition: JobOptionsSvc.h:77
StatusCode JobOptionsSvc::readOptions ( const std::string &  file,
const std::string &  path = "" 
)
virtual

look for file 'file' into search path 'path' and read it to update existing JobOptionsCatalogue

Parameters
filefile name
pathsearch path
Returns
status code

Implements IJobOptionsSvc.

Definition at line 167 of file JobOptionsSvc.cpp.

168  {
169  std::string search_path = path;
170  if ( search_path.empty() && !m_dir_search_path.empty() )
171  { search_path = m_dir_search_path ; }
172  //
173  MsgStream my_log( this->msgSvc(), this->name() );
174  if (UNLIKELY(outputLevel() <= MSG::DEBUG))
175  my_log << MSG::DEBUG // debug
176  << "Reading options from the file "
177  << "'" << file << "'" << endmsg;
178  gp::Messages messages(my_log);
179  gp::Catalog catalog;
180  gp::Units units;
181  gp::PragmaOptions pragma;
182  gp::Node ast;
183  StatusCode sc = gp::ReadOptions(file, path, &messages, &catalog, &units,
184  &pragma, &ast);
185 
186  // --------------------------------------------------------------------------
187  if ( sc.isSuccess() )
188  {
189  if (pragma.IsPrintOptions()) {
190  my_log << MSG::INFO << "Print options" << std::endl << catalog
191  << endmsg;
192  }
193  if (pragma.IsPrintTree()) {
194  my_log << MSG::INFO << "Print tree:" << std::endl << ast.ToString()
195  << endmsg;
196  }
197  if (pragma.HasDumpFile()) {
198  dump(pragma.dumpFile(), catalog);
199  }
200  my_log << MSG::INFO
201  << "Job options successfully read in from " << file << endmsg;
202  fillServiceCatalog(catalog);
203  }
204  else
205  {
206  my_log << MSG::FATAL << "Job options errors."<< endmsg;
207  }
208  // ----------------------------------------------------------------------------
209  return sc;
210 }
#define UNLIKELY(x)
Definition: Kernel.h:127
Definition of the MsgStream class used to transmit messages.
Definition: MsgStream.h:24
void fillServiceCatalog(const Gaudi::Parsers::Catalog &catalog)
SmartIF< IMessageSvc > & msgSvc() const
The standard message service.
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:62
int outputLevel() const
get the Service's output level
Definition: Service.h:248
bool ReadOptions(const std::string &filename, const std::string &search_path, Messages *messages, Catalog *catalog, Units *units, PragmaOptions *pragma, Node *root)
Parse and analyze filename, save all messages and properties.
Definition: Analyzer.cpp:438
std::string m_dir_search_path
Definition: JobOptionsSvc.h:79
void dump(const std::string &file, const Gaudi::Parsers::Catalog &catalog) const
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
list file
Definition: ana.py:160
virtual const std::string & name() const
Retrieve name of the service.
Definition: Service.cpp:331
GAUDI_API std::string path(const AIDA::IBaseHistogram *aida)
get the path in THS for AIDA histogram
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:243
StatusCode JobOptionsSvc::removePropertyFromCatalogue ( const std::string &  client,
const std::string &  name 
)
virtual

Remove a property from the JobOptions catalog.

Implements IJobOptionsSvc.

Definition at line 93 of file JobOptionsSvc.cpp.

95 {
96  return m_svc_catalog.removeProperty(client,name);
97 }
SvcCatalog m_svc_catalog
Definition: JobOptionsSvc.h:81
StatusCode removeProperty(const std::string &client, const std::string &name)
Definition: SvcCatalog.cpp:53
virtual const std::string & name() const
Retrieve name of the service.
Definition: Service.cpp:331
StatusCode JobOptionsSvc::setMyProperties ( const std::string &  client,
IProperty me 
)
virtual

Override default properties of the calling client.

Parameters
clientName of the client algorithm or service
meAddress of the interface IProperty of the client

Implements IJobOptionsSvc.

Definition at line 105 of file JobOptionsSvc.cpp.

107 {
108  const SvcCatalog::PropertiesT* props =
110 
111  if ( NULL == props ){ return StatusCode::SUCCESS; }
112 
113  bool fail = false;
114  for ( std::vector<const Property*>::const_iterator cur = props->begin();
115  cur != props->end(); cur++)
116  {
117  StatusCode sc = myInt->setProperty (**cur ) ;
118  if ( sc.isFailure() )
119  {
120  MsgStream my_log( this->msgSvc(), this->name() );
121  my_log
122  << MSG::ERROR
123  << "Unable to set the property '" << (*cur)->name() << "'"
124  << " of '" << client << "'. "
125  << "Check option and algorithm names, type and bounds."
126  << endmsg;
127  fail = true;
128  }
129  }
130  return fail ? StatusCode::FAILURE : StatusCode::SUCCESS ;
131 }
Definition of the MsgStream class used to transmit messages.
Definition: MsgStream.h:24
const PropertiesT * getProperties(const std::string &client) const
Definition: SvcCatalog.cpp:71
SmartIF< IMessageSvc > & msgSvc() const
The standard message service.
SvcCatalog m_svc_catalog
Definition: JobOptionsSvc.h:81
bool isFailure() const
Test for a status code of FAILURE.
Definition: StatusCode.h:72
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
virtual const std::string & name() const
Retrieve name of the service.
Definition: Service.cpp:331
std::vector< const Property * > PropertiesT
Definition: SvcCatalog.h:31
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:243
StatusCode JobOptionsSvc::setProperty ( const Property p)
virtual

IProperty implementation (needed for initialisation)

Reimplemented from Service.

Definition at line 50 of file JobOptionsSvc.cpp.

51 {
52  return m_pmgr.setProperty( p );
53 }
StatusCode setProperty(const Property &p)
set the property form another property
PropertyMgr m_pmgr
dump the content of Properties catalog to the predefined file
Definition: JobOptionsSvc.h:76

Member Data Documentation

std::string JobOptionsSvc::m_dir_search_path
private

Definition at line 79 of file JobOptionsSvc.h.

std::string JobOptionsSvc::m_dump
private

Definition at line 80 of file JobOptionsSvc.h.

PropertyMgr JobOptionsSvc::m_pmgr
private

dump the content of Properties catalog to the predefined file

Definition at line 76 of file JobOptionsSvc.h.

std::string JobOptionsSvc::m_source_path
private

Definition at line 77 of file JobOptionsSvc.h.

std::string JobOptionsSvc::m_source_type
private

Definition at line 78 of file JobOptionsSvc.h.

SvcCatalog JobOptionsSvc::m_svc_catalog
private

Definition at line 81 of file JobOptionsSvc.h.


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