The Gaudi Framework  v33r1 (b1225454)
PythonConfig.h
Go to the documentation of this file.
1 /***********************************************************************************\
2 * (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations *
3 * *
4 * This software is distributed under the terms of the Apache version 2 licence, *
5 * copied verbatim in the file "LICENSE". *
6 * *
7 * In applying this licence, CERN does not waive the privileges and immunities *
8 * granted to it by virtue of its status as an Intergovernmental Organization *
9 * or submit itself to any jurisdiction. *
10 \***********************************************************************************/
11 #ifndef GAUDISVC_PYTHONCONFIG_H
12 #define GAUDISVC_PYTHONCONFIG_H
15 #include "GaudiKernel/IProperty.h"
16 #include "GaudiKernel/Property.h"
17 #include "GaudiKernel/SmartIF.h"
18 #include <string>
19 
20 // Class to translate between Python and C++ worlds
21 // It will be exposed to Python via Boost (see .cpp file)
23 public:
25  void addPropertyToJobOptions( const std::string& client, const std::string& name, const std::string& value ) {
26  if ( auto sc = m_IJobOptionsSvc->addPropertyToCatalogue( client, Gaudi::Property<std::string>( name, value ) );
27  !sc )
28  throw GaudiException( "Failed to add property", "PythonAdaptor", sc );
29  }
30 
31 private:
33 };
34 
35 // Helper class to be invoked by JobOptionsSvc
36 class PythonConfig {
37 public:
39  StatusCode evaluateConfig( const std::string& filename, const std::string& preAction, const std::string& postAction );
40 
41 private:
43 };
44 
45 #endif
Define general base for Gaudi exception.
PythonConfig(IJobOptionsSvc *jos)
Definition: PythonConfig.h:38
PythonAdaptor(IJobOptionsSvc *jos)
Definition: PythonConfig.h:24
Implementation of property with value of concrete type.
Definition: Property.h:370
StatusCode evaluateConfig(const std::string &filename, const std::string &preAction, const std::string &postAction)
void addPropertyToJobOptions(const std::string &client, const std::string &name, const std::string &value)
Definition: PythonConfig.h:25
STL class.
virtual StatusCode addPropertyToCatalogue(const std::string &client, const Gaudi::Details::PropertyBase &property)=0
Add a property into the JobOptions catalog.
Main interface for the JobOptions service.
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:61
SmartIF< IJobOptionsSvc > m_IJobOptionsSvc
Definition: PythonConfig.h:32
SmartIF< IJobOptionsSvc > m_IJobOptionsSvc
Definition: PythonConfig.h:42