Functions | |
template<typename T> | |
StatusCode | GetPropertyValue (const std::string &client, const std::string &name, T &value) |
StatusCode DistBoss::GetPropertyValue | ( | const std::string & | client, | |
const std::string & | name, | |||
T & | value | |||
) |
Definition at line 12 of file GetPropertyValue.h.
References genRecEmupikp::i.
00013 { 00014 static IJobOptionsSvc* jobSvc = 0; 00015 00016 StatusCode sc; 00017 00018 if ( jobSvc == 0 ) { 00019 sc = Gaudi::svcLocator()->service("JobOptionsSvc", jobSvc); 00020 if ( sc.isFailure() ) { 00021 std::cout << "Can't get the JobOptionsSvc @ DistBoss::GetPropertyValue()" << std::endl; 00022 return sc; 00023 } 00024 } 00025 00026 const std::vector<const Property*>* properties = jobSvc->getProperties(client); 00027 if ( properties == NULL ) { 00028 std::cout << "In DistBoss::GetPropertyValue(), can't get client: " << client << std::endl; 00029 return StatusCode::FAILURE; 00030 } 00031 00032 for ( unsigned int i = 0; i < properties->size(); ++i ) { 00033 if ( properties->at(i)->name() == name ) { 00034 return Gaudi::Parsers::parse(value, properties->at(i)->toString()); 00035 } 00036 } 00037 00038 return StatusCode::FAILURE; 00039 }