4 #include <boost/foreach.hpp>
28 namespace gp =
Gaudi::Parsers;
40 if ( !tmp.empty() && (
"UNKNOWN" != tmp) ) { m_dir_search_path = tmp ; }
42 if ( !tmp.empty() && (
"UNKNOWN" != tmp) ) { m_dump = tmp ; }
44 m_pmgr.declareProperty(
"TYPE" , m_source_type ) ;
45 m_pmgr.declareProperty(
"PATH" , m_source_path ) ;
46 m_pmgr.declareProperty(
"SEARCHPATH" , m_dir_search_path ) ;
47 m_pmgr.declareProperty(
"DUMPFILE" , m_dump ) ;
83 (
const std::string& client,
88 return m_svc_catalog.addProperty( client , p );
93 (
const std::string& client,
94 const std::string& name )
96 return m_svc_catalog.removeProperty(client,name);
114 for ( std::vector<const Property*>::const_iterator cur = props->begin();
115 cur != props->end(); cur++)
123 <<
"Unable to set the property '" << (*cur)->name() <<
"'"
124 <<
" of '" << client <<
"'. "
125 <<
"Check option and algorithm names, type and bounds."
140 const gp::Catalog& catalog)
const {
143 ( file.c_str() , std::ios_base::out | std::ios_base::trunc ) ;
150 log <<
MSG::INFO <<
"Properties are dumped into \""+file+
"\"" <<
endmsg ;
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();
161 StringProperty tmp (current->NameInClient(), current->ValueAsString()) ;
168 const std::string&
path) {
169 std::string search_path =
path;
176 <<
"Reading options from the file "
177 <<
"'" << file <<
"'" <<
endmsg;
178 gp::Messages messages(my_log);
181 gp::PragmaOptions pragma;
189 if (pragma.IsPrintOptions()) {
190 my_log <<
MSG::INFO <<
"Print options" << std::endl << catalog
193 if (pragma.IsPrintTree()) {
194 my_log <<
MSG::INFO <<
"Print tree:" << std::endl << ast.ToString()
197 if (pragma.HasDumpFile()) {
198 dump(pragma.dumpFile(), catalog);
201 <<
"Job options successfully read in from " << file <<
endmsg;