ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Calorimeter
CaloConditions
CaloConditions
ToolConstants.h
Go to the documentation of this file.
1
// This file's extension implies that it's C, but it's really -*- C++ -*-.
2
/*
3
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
4
*/
11
12
13
#ifndef CALOREC_TOOLCONSTANTS_H
14
#define CALOREC_TOOLCONSTANTS_H
15
16
17
#include "
AthenaKernel/CLASS_DEF.h
"
18
#include "
CxxUtils/Array.h
"
19
#include <string>
20
#include <map>
21
22
namespace
CaloRec
{
23
24
31
class
ToolConstants
32
{
33
public
:
35
typedef
std::map<std::string, CxxUtils::Arrayrep>
Maptype
;
36
38
ToolConstants
();
39
40
51
const
CxxUtils::Arrayrep
&
newrep
(
const
std::string&
context
,
52
const
std::string& key,
53
const
std::string& val);
54
63
const
CxxUtils::Arrayrep
&
getrep
(
const
std::string&
context
,
64
const
std::string& key)
const
;
65
66
72
void
setrep
(
const
std::string& key,
73
const
CxxUtils::Arrayrep
& rep);
74
75
81
void
setrep
(
const
std::string& key,
82
CxxUtils::Arrayrep
&& rep);
83
84
88
bool
hasrep
(
const
std::string& key)
const
;
89
90
96
void
writeConstants
(std::ostream& stream,
const
std::string& name)
const
;
97
98
103
std::string
toString
(
const
std::string& name)
const
;
104
105
109
const
std::string&
clsname
()
const
;
110
111
115
void
clsname
(
const
std::string& name);
116
117
122
int
version
()
const
;
123
124
128
void
version
(
int
version
);
129
130
132
const
Maptype
&
map
()
const
;
133
134
135
private
:
142
[[noreturn]]
143
static
void
error
(
const
std::string&
context
,
144
const
std::string& key,
145
const
std::string&
msg
);
146
148
Maptype
m_map
;
149
151
std::string
m_clsname
;
152
154
int
m_version
;
155
};
156
157
158
}
// namespace CaloRec
159
160
161
CLASS_DEF
(
CaloRec::ToolConstants
,250904980 ,1)
162
163
#include "AthenaKernel/CondCont.h"
164
CONDCONT_DEF
(
CaloRec::ToolConstants
, 274098 );
165
166
#endif
// not CALOREC_TOOLCONSTANTS_H
CONDCONT_DEF
#define CONDCONT_DEF(...)
Definition
CondCont.h:1413
CLASS_DEF.h
macros to associate a CLID to a type
CLASS_DEF
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
Definition
Control/AthenaKernel/AthenaKernel/CLASS_DEF.h:67
Array.h
Simple multidimensional arrays.
CaloRec::ToolConstants
Container for the tool constants managed by ToolWithConstants.
Definition
ToolConstants.h:32
CaloRec::ToolConstants::m_map
Maptype m_map
The map of keys to values.
Definition
ToolConstants.h:148
CaloRec::ToolConstants::newrep
const CxxUtils::Arrayrep & newrep(const std::string &context, const std::string &key, const std::string &val)
Make a new entry.
Definition
ToolConstants.cxx:40
CaloRec::ToolConstants::m_version
int m_version
Version number of the C++ class that operates on these constants.
Definition
ToolConstants.h:154
CaloRec::ToolConstants::Maptype
std::map< std::string, CxxUtils::Arrayrep > Maptype
Type of the map from keys to values.
Definition
ToolConstants.h:35
CaloRec::ToolConstants::setrep
void setrep(const std::string &key, const CxxUtils::Arrayrep &rep)
Set an entry.
Definition
ToolConstants.cxx:79
CaloRec::ToolConstants::hasrep
bool hasrep(const std::string &key) const
Test to see if a given key is present.
Definition
ToolConstants.cxx:101
CaloRec::ToolConstants::version
int version() const
Return the version of the C++ class that operates on these constants.
Definition
ToolConstants.cxx:170
CaloRec::ToolConstants::getrep
const CxxUtils::Arrayrep & getrep(const std::string &context, const std::string &key) const
Look up an entry.
Definition
ToolConstants.cxx:59
CaloRec::ToolConstants::ToolConstants
ToolConstants()
Default constructor.
Definition
ToolConstants.cxx:23
CaloRec::ToolConstants::clsname
const std::string & clsname() const
Return the name of the C++ class that operates on these constants.
Definition
ToolConstants.cxx:152
CaloRec::ToolConstants::map
const Maptype & map() const
Return the key -> value map.
Definition
ToolConstants.cxx:188
CaloRec::ToolConstants::m_clsname
std::string m_clsname
Name of the C++ class that operates on these constants.
Definition
ToolConstants.h:151
CaloRec::ToolConstants::writeConstants
void writeConstants(std::ostream &stream, const std::string &name) const
Writes out constants in a python-like format.
Definition
ToolConstants.cxx:126
CaloRec::ToolConstants::toString
std::string toString(const std::string &name) const
Return the data as a formatted string.
Definition
ToolConstants.cxx:141
CaloRec
Namespace for helper functions.
Definition
CaloCellPositionShift.h:23
CaloRec::context
context
Definition
Arrayrep.cxx:217
error
Definition
IImpactPoint3dEstimator.h:72
CaloRec::Arrayrep
Representation class for Array's.
Definition
Control/CxxUtils/CxxUtils/Arrayrep.h:62
msg
MsgStream & msg
Definition
testRead.cxx:32
Generated on
for ATLAS Offline Software by
1.17.0