ATLAS Offline Software
Loading...
Searching...
No Matches
LArCalorimeter
LArGeoModel
LArGeoRAL
src
RAL.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
LArGeoRAL/RAL.h
"
6
#include "
LArGeoCode/VDetectorParameters.h
"
7
8
#include "
LArGeoRAL/RALExperimentalHall.h
"
9
#include "
LArGeoRAL/RALEmb.h
"
10
#include "
LArGeoRAL/RALEmec.h
"
11
#include "
LArGeoRAL/RALHec.h
"
12
13
#include "GaudiKernel/MsgStream.h"
14
#include "
AthenaKernel/getMessageSvc.h
"
15
16
#include <cstdlib>
17
#include <iostream>
18
#include <stdexcept>
19
#include <string>
20
21
namespace
LArGeo
{
22
23
double
RAL::GetValue
(
const
std::string& a_name,
24
const
int
a0
,
25
const
int
a1,
26
const
int
a2,
27
const
int
a3,
28
const
int
a4 )
const
29
{
30
31
// Call the appropriate GetValue() based on the contents of the
32
// string in a_name.
33
34
// Note: "npos" is defined in the <string> header. If it's the
35
// result of a find() method, then the sub-string was not found.
36
37
if
( a_name.find(
"ExpHall"
) != std::string::npos )
38
return
m_ExpHall
.GetValue(a_name,
a0
,a1,a2,a3,a4);
39
40
if
( a_name.find(
"EMEC"
) != std::string::npos )
41
return
m_Emec
.GetValue(a_name,
a0
,a1,a2,a3,a4);
42
43
if
( a_name.find(
"EMB"
) != std::string::npos )
44
return
m_Emb
.GetValue(a_name,
a0
,a1,a2,a3,a4);
45
46
if
( a_name.find(
"HEC"
) != std::string::npos )
47
return
m_Hec
.GetValue(a_name,
a0
,a1,a2,a3,a4);
48
49
50
// We didn't find a match. Throw an exception
51
MsgStream log(
Athena::getMessageSvc
(),
"RAL"
);
52
std::string errMessage =
"RAL::GetValue: could not find a match for the key '"
+ a_name;
53
log << MSG::FATAL << errMessage <<
endmsg
;
54
throw
std::runtime_error(errMessage);
55
56
// Unreached.
57
}
58
59
}
// namespace LArGeo
endmsg
#define endmsg
Definition
AnalysisConfig_Ntuple.cxx:63
RALEmb.h
RALEmec.h
RALExperimentalHall.h
RALHec.h
RAL.h
VDetectorParameters.h
LArGeo::RAL::m_ExpHall
RALExperimentalHall m_ExpHall
Definition
RAL.h:31
LArGeo::RAL::m_Emec
RALEmec m_Emec
Definition
RAL.h:32
LArGeo::RAL::m_Emb
RALEmb m_Emb
Definition
RAL.h:33
LArGeo::RAL::GetValue
virtual double GetValue(const std::string &, const int i0=INT_MIN, const int i1=INT_MIN, const int i2=INT_MIN, const int i3=INT_MIN, const int i4=INT_MIN) const override
Definition
RAL.cxx:23
LArGeo::RAL::m_Hec
RALHec m_Hec
Definition
RAL.h:34
getMessageSvc.h
singleton-like access to IMessageSvc via open function and helper
a0
double a0
Definition
globals.cxx:27
Athena::getMessageSvc
IMessageSvc * getMessageSvc(bool quiet=false)
Definition
getMessageSvc.cxx:20
LArGeo
Definition
LArDetectorFactory.h:26
Generated on
for ATLAS Offline Software by
1.14.0