Skip to content
Snippets Groups Projects
Commit 01bba39d authored by Marco Clemencic's avatar Marco Clemencic
Browse files

Added easy access to OptionsSvc implelmentation

parent 1329410b
No related branches found
No related tags found
No related merge requests found
......@@ -60,7 +60,7 @@ endif()
#---Libraries---------------------------------------------------------------
gaudi_add_library(GaudiKernel src/Lib/*.cpp ${extra_sources}
LINK_LIBRARIES ${CMAKE_DL_LIBS} Boost ROOT TBB GaudiPluginService ${extra_libraries}
INCLUDE_DIRS Boost ROOT TBB
INCLUDE_DIRS Boost ROOT TBB cppgsl
PUBLIC_HEADERS GaudiKernel Gaudi)
#---Tests-------------------------------------------------------------------
......
......@@ -6,12 +6,21 @@
#include "GaudiKernel/ISvcManager.h"
#include "GaudiKernel/SmartIF.h"
#include "GaudiKernel/TypeNameString.h"
#include <list>
#include <string>
// Forward class declaration
class IService;
namespace Gaudi
{
namespace Interfaces
{
class OptionsSvc;
}
}
/** @class ISvcLocator ISvcLocator.h GaudiKernel/ISvcLocator.h
The ISvcLocator is the interface implemented by the Service Factory in the
Application Manager to locate services in the framework. Clients use this
......@@ -110,6 +119,9 @@ public:
{
return SmartIF<IFace>{this};
}
/// Direct access to Gaudi::Interfaces::OptionsSvc implementation.
Gaudi::Interfaces::OptionsSvc& getOptsSvc();
};
#endif // GAUDI_ISVCLOCATOR_H
#include "GaudiKernel/ISvcLocator.h"
#include "Gaudi/Interfaces/OptionsSvc.h"
#include <gsl/gsl>
Gaudi::Interfaces::OptionsSvc& ISvcLocator::getOptsSvc()
{
using namespace Gaudi::Interfaces;
return *gsl::not_null<OptionsSvc*>( dynamic_cast<OptionsSvc*>( service( "JobOptionsSvc" ).get() ) );
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment