52 auto p = std::make_unique<Gaudi::Property<std::string>>(
property.name(),
"" );
74 for (
const auto& cur : *props ) {
77 error() <<
"Unable to set the property '" << cur->name() <<
"'" 78 <<
" of '" << client <<
"'. " 79 <<
"Check option and algorithm names, type and bounds." <<
endmsg;
91 std::ofstream out( file, std::ios_base::out | std::ios_base::trunc );
93 error() <<
"Unable to open dump-file \"" + file +
"\"" <<
endmsg;
96 info() <<
"Properties are dumped into \"" + file +
"\"" <<
endmsg;
103 for (
const auto& client : catalog ) {
104 for (
const auto& current : client.second ) {
119 debug() <<
"Reading options from the file " 120 <<
"'" << file <<
"'" <<
endmsg;
124 gp::PragmaOptions pragma;
131 if ( pragma.IsPrintOptions() ) {
134 if ( pragma.IsPrintTree() ) {
137 if ( pragma.HasDumpFile() )
dump( pragma.dumpFile(), catalog );
138 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)
constexpr static const auto FAILURE
StatusCode initialize() override
Gaudi::Property< std::string > m_source_path
void fillServiceCatalog(const Gaudi::Parsers::Catalog &catalog)
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
const std::string & name() const override
Retrieve name of the service.
Gaudi::Details::PropertyBase * property(const std::string &name) const
Implementation of property with value of concrete type.
Gaudi::Property< std::string > m_pythonAction
MsgStream & info() const
shortcut for the method msgStream(MSG::INFO)
const PropertiesT * getProperties(const std::string &client) const
const std::vector< Gaudi::Details::PropertyBase * > & getProperties() const override
get all properties
StatusCode addProperty(const std::string &client, const Gaudi::Details::PropertyBase *property)
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)
StatusCode removeProperty(const std::string &client, const std::string &name)
std::vector< std::string > getClients() const
#define DECLARE_COMPONENT(type)
void dump(const std::string &file, const Gaudi::Parsers::Catalog &catalog) const
MsgStream & error() const
shortcut for the method msgStream(MSG::ERROR)
virtual StatusCode setProperty(const Gaudi::Details::PropertyBase &p)=0
Set the property by property.
StatusCode setMyProperties(const std::string &client, IProperty *me) override
Override default properties of the calling client.
Gaudi::Property< std::string > m_pythonParams
Gaudi::Property< std::string > m_dir_search_path
This class is used for returning status codes from appropriate routines.
PropertyBase base class allowing PropertyBase* collections to be "homogeneous".
constexpr static const auto SUCCESS
GAUDI_API bool isEnvSet(const char *var)
Check if an environment variable is set or not.
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 initialize() override
Gaudi::Property< std::string > m_source_type
dump the content of Properties catalog to the predefined file
StatusCode addPropertyToCatalogue(const std::string &client, const Gaudi::Details::PropertyBase &property) override
Add a property into the JobOptions catalog.
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...
Helper functions to set/get the application return code.
std::vector< std::string > getClients() const override
Get the list of clients.
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
MSG::Level msgLevel() const
get the cached level (originally extracted from the embedded MsgStream)