9#include "GaudiKernel/Service.h"
10#include "GaudiKernel/IInterface.h"
14static const InterfaceID IID_IHltStoreSvc(
"IID_IHltStoreSvc", 1, 0);
16class HltStoreSvc :
public Service ,
virtual public IInterface {
20 HltStoreSvc(
const std::string& name, ISvcLocator* sl);
23 virtual StatusCode
queryInterface(
const InterfaceID& riid,
void** ppvIF);
32 static const InterfaceID&
interfaceID() {
return IID_IHltStoreSvc; }
47 bool exists(
const std::string& name);
60 bool put(
const std::string& name,
const T& value) {
63 std::cout <<
"demanded key already exists, overwrite old one" << std::endl;
76 bool get(
const std::string& name, T& value) {
78 ContainerType::iterator it =
m_map.find(name);
80 if(it !=
m_map.end()) {
95 bool erase(
const std::string& name) {
96 ContainerType::iterator it =
m_map.find(name);
97 if(it !=
m_map.end()) {
109 for (ContainerType::iterator it =
m_map.begin(); it !=
m_map.end(); it++) {
132 const T&
value()
const {
return m_value; }
135 void erase(T1
value) {}
138 void erase(T1 *
value) {
map< string, BaseHolder * > ContainerType
bool put(const std::string &name, const T &value)
static const InterfaceID & interfaceID()
virtual StatusCode queryInterface(const InterfaceID &riid, void **ppvIF)
virtual StatusCode finalize()
bool get(const std::string &name, T &value)
bool erase(const std::string &name)
bool exists(const std::string &name)
virtual StatusCode initialize()