ATLAS Offline Software
AGDDParameterStore.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef AGDDParameterStore_H
6 #define AGDDParameterStore_H
7 
8 #include <map>
9 #include <iostream>
11 
12 typedef std::map<std::string,AGDDParameterBag* > AGDDParameterMap;
13 
15 public:
17 
18  virtual ~AGDDParameterStore() {}
19 
20  void RegisterParameterBag(const std::string& volName, AGDDParameterBag* paraBag) {
21  (*this)[volName]=paraBag;
22  }
23 
24  AGDDParameterBag* GetParameterBag(const std::string& volName) {
25  if ((*this).find(volName) != (*this).end())
26  return (*this)[volName];
27  else {
28  std::cout << " Parameters for Volume "<<volName<<" not found: returning 0"<<std::endl;
29  return 0;
30  }
31  }
32 
33  bool Exist(const std::string& volName) const {
34  return ((*this).find(volName) != (*this).end());
35  }
36 };
37 
38 #endif
AGDDParameterStore::~AGDDParameterStore
virtual ~AGDDParameterStore()
Definition: AGDDParameterStore.h:18
AGDDParameterStore::GetParameterBag
AGDDParameterBag * GetParameterBag(const std::string &volName)
Definition: AGDDParameterStore.h:24
AGDDParameterBag
Definition: AGDDParameterBag.h:8
AGDDParameterStore::RegisterParameterBag
void RegisterParameterBag(const std::string &volName, AGDDParameterBag *paraBag)
Definition: AGDDParameterStore.h:20
AGDDParameterMap
std::map< std::string, AGDDParameterBag * > AGDDParameterMap
Definition: AGDDParameterStore.h:12
AGDDParameterStore
Definition: AGDDParameterStore.h:14
AGDDParameterStore::AGDDParameterStore
AGDDParameterStore()
Definition: AGDDParameterStore.h:16
AGDDParameterBag.h
AGDDParameterStore::Exist
bool Exist(const std::string &volName) const
Definition: AGDDParameterStore.h:33