ATLAS Offline Software
Loading...
Searching...
No Matches
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
12typedef std::map<std::string,AGDDParameterBag* > AGDDParameterMap;
13
15public:
17
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
std::map< std::string, AGDDParameterBag * > AGDDParameterMap
AGDDParameterBag * GetParameterBag(const std::string &volName)
bool Exist(const std::string &volName) const
void RegisterParameterBag(const std::string &volName, AGDDParameterBag *paraBag)