1#ifndef GET_PROPERTY_VALUE_H
2#define GET_PROPERTY_VALUE_H
4#include "GaudiKernel/IJobOptionsSvc.h"
5#include "GaudiKernel/Bootstrap.h"
6#include "GaudiKernel/StatusCode.h"
7#include "GaudiKernel/Parsers.h"
12StatusCode
GetPropertyValue(
const std::string& client,
const std::string& name, T& value)
14 static IJobOptionsSvc* jobSvc = 0;
19 sc = Gaudi::svcLocator()->service(
"JobOptionsSvc", jobSvc);
20 if ( sc.isFailure() ) {
21 std::cout <<
"Can't get the JobOptionsSvc @ DistBoss::GetPropertyValue()" << std::endl;
26 const std::vector<const Property*>* properties = jobSvc->getProperties(client);
27 if ( properties ==
NULL ) {
28 std::cout <<
"In DistBoss::GetPropertyValue(), can't get client: " << client << std::endl;
29 return StatusCode::FAILURE;
32 for (
unsigned int i = 0; i < properties->size(); ++i ) {
33 if ( properties->at(i)->name() == name ) {
34 return Gaudi::Parsers::parse(value, properties->at(i)->toString());
38 return StatusCode::FAILURE;
StatusCode GetPropertyValue(const std::string &client, const std::string &name, T &value)