33 if ( !tmp.
empty() && (
"UNKNOWN" != tmp) ) { m_dir_search_path = tmp ; }
35 if ( !tmp.
empty() && (
"UNKNOWN" != tmp) ) { m_dump = tmp ; }
37 m_pmgr.declareProperty(
"TYPE" , m_source_type ) ;
38 m_pmgr.declareProperty(
"PATH" , m_source_path ) ;
39 m_pmgr.declareProperty(
"SEARCHPATH" , m_dir_search_path ) ;
40 m_pmgr.declareProperty(
"DUMPFILE" , m_dump ) ;
41 m_pmgr.declareProperty(
"PYTHONACTION" , m_pythonAction ) ;
42 m_pmgr.declareProperty(
"PYTHONPARAMS" , m_pythonParams ) ;
79 return property.
load( *p ) ? m_svc_catalog.addProperty( client , p.release() )
88 return m_svc_catalog.removeProperty(client,name);
104 for (
const auto& cur : *props )
110 <<
"Unable to set the property '" << cur->name() <<
"'"
111 <<
" of '" << client <<
"'. "
112 <<
"Check option and algorithm names, type and bounds."
127 const gp::Catalog& catalog)
const {
128 std::ofstream out( file , std::ios_base::out | std::ios_base::trunc );
130 error() <<
"Unable to open dump-file \""+file+
"\"" <<
endmsg ;
133 info() <<
"Properties are dumped into \""+file+
"\"" <<
endmsg ;
139 for (
const auto& client : catalog) {
140 for (
const auto& current : client.second ) {
143 current.ValueAsString() } );
155 debug() <<
"Reading options from the file "
156 <<
"'" << file <<
"'" <<
endmsg;
160 gp::PragmaOptions pragma;
168 if (pragma.IsPrintOptions()) {
172 if (pragma.IsPrintTree()) {
176 if (pragma.HasDumpFile())
dump(pragma.dumpFile(), catalog);
177 info() <<
"Job options successfully read in from " << file <<
endmsg;
GAUDI_API std::string getEnv(const char *var)
get a particular environment variable (returning "UNKNOWN" if not set)
StatusCode initialize() override
void fillServiceCatalog(const Gaudi::Parsers::Catalog &catalog)
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
std::vector< std::string > getClients() const override
Get the list of clients.
std::string m_source_type
MsgStream & info() const
shortcut for the method msgStream(MSG::INFO)
const PropertiesT * getProperties(const std::string &client) const
const std::string & name() const
property name
StatusCode setProperty(const Property &p) override
set the property form another property
std::string m_pythonAction
bool isSuccess() const
Test for a status code of SUCCESS.
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.
StatusCode evaluateConfig(const std::string &filename, const std::string &preAction, const std::string &postAction)
bool isFailure() const
Test for a status code of FAILURE.
StatusCode getProperty(Property *p) const override
SimpleProperty< std::string > StringProperty
#define DECLARE_COMPONENT(type)
std::vector< std::string > getClients() const
std::string m_dir_search_path
StatusCode getProperty(Property *p) const override
get the property
const std::vector< Property * > & getProperties() const override
void dump(const std::string &file, const Gaudi::Parsers::Catalog &catalog) const
MsgStream & error() const
shortcut for the method msgStream(MSG::ERROR)
StatusCode setMyProperties(const std::string &client, IProperty *me) override
Override default properties of the calling client.
StatusCode setProperty(const Property &p) override
IProperty implementation (needed for initialisation)
This class is used for returning status codes from appropriate routines.
virtual StatusCode setProperty(const Property &p)=0
Set the property by property.
GAUDI_API std::string path(const AIDA::IBaseHistogram *aida)
get the path in THS for AIDA histogram
Property base class allowing Property* collections to be "homogeneous".
MsgStream & debug() const
shortcut for the method msgStream(MSG::DEBUG)
StatusCode readOptions(const std::string &file, const std::string &path="") override
look for file 'file' into search path 'path' and read it to update existing JobOptionsCatalogue ...
StatusCode removePropertyFromCatalogue(const std::string &client, const std::string &name) override
Remove a property from the JobOptions catalog.
MsgStream & msgStream() const
Return an uninitialized MsgStream.
StatusCode addPropertyToCatalogue(const std::string &client, const Property &property) override
Add a property into the JobOptions catalog.
StatusCode initialize() override
std::string m_pythonParams
bool load(Property &dest) const override
set value for another property
PropertyMgr m_pmgr
dump the content of Properties catalog to the predefined file
MsgStream & fatal() const
shortcut for the method msgStream(MSG::FATAL)
The IProperty is the basic interface for all components which have properties that can be set or get...
MSG::Level msgLevel() const
get the output level from the embedded MsgStream
std::string m_source_path
Helper functions to set/get the application return code.
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.