ATLAS Offline Software
Public Member Functions | Static Public Member Functions | Private Attributes | Static Private Attributes | List of all members
LArGeo::RAL Class Reference

#include <RAL.h>

Inheritance diagram for LArGeo::RAL:
Collaboration diagram for LArGeo::RAL:

Public Member Functions

 RAL ()=default
 
virtual ~RAL ()=default
 
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
 

Static Public Member Functions

static void SetInstance (std::unique_ptr< VDetectorParameters >)
 
static const VDetectorParametersGetInstance ()
 

Private Attributes

RALExperimentalHall m_ExpHall {}
 
RALEmec m_Emec {}
 
RALEmb m_Emb {}
 
RALHec m_Hec {}
 

Static Private Attributes

static CxxUtils::CachedUniquePtr< VDetectorParameters > s_instance ATLAS_THREAD_SAFE
 

Detailed Description

Definition at line 17 of file RAL.h.

Constructor & Destructor Documentation

◆ RAL()

LArGeo::RAL::RAL ( )
default

◆ ~RAL()

virtual LArGeo::RAL::~RAL ( )
virtualdefault

Member Function Documentation

◆ GetInstance()

const LArGeo::VDetectorParameters * LArGeo::VDetectorParameters::GetInstance ( )
staticinherited

Definition at line 29 of file VDetectorParameters.cxx.

30 {
31  const VDetectorParameters* p = s_instance.get();
32  if(p==nullptr)
33  std::cerr << "LArGeo::VDetectorParameters::GetInstance was called, but "
34  << "the pointer to the detector-parameter access object is 0."
35  << std::endl;
36 
37  return p;
38 }

◆ GetValue()

double LArGeo::RAL::GetValue ( const std::string &  a_name,
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
overridevirtual

Implements LArGeo::VDetectorParameters.

Definition at line 23 of file RAL.cxx.

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  }

◆ SetInstance()

void LArGeo::VDetectorParameters::SetInstance ( std::unique_ptr< VDetectorParameters p)
staticinherited

Definition at line 24 of file VDetectorParameters.cxx.

25 {
26  s_instance.set (std::move (p));
27 }

Member Data Documentation

◆ ATLAS_THREAD_SAFE

CxxUtils::CachedUniquePtr<VDetectorParameters> s_instance LArGeo::VDetectorParameters::ATLAS_THREAD_SAFE
staticprivateinherited

Definition at line 64 of file VDetectorParameters.h.

◆ m_Emb

RALEmb LArGeo::RAL::m_Emb {}
private

Definition at line 33 of file RAL.h.

◆ m_Emec

RALEmec LArGeo::RAL::m_Emec {}
private

Definition at line 32 of file RAL.h.

◆ m_ExpHall

RALExperimentalHall LArGeo::RAL::m_ExpHall {}
private

Definition at line 31 of file RAL.h.

◆ m_Hec

RALHec LArGeo::RAL::m_Hec {}
private

Definition at line 34 of file RAL.h.


The documentation for this class was generated from the following files:
LArGeo::RAL::m_ExpHall
RALExperimentalHall m_ExpHall
Definition: RAL.h:31
python.Constants.FATAL
int FATAL
Definition: Control/AthenaCommon/python/Constants.py:19
Athena::getMessageSvc
IMessageSvc * getMessageSvc(bool quiet=false)
Definition: getMessageSvc.cxx:20
LArGeo::VDetectorParameters::VDetectorParameters
VDetectorParameters()
Definition: VDetectorParameters.h:61
LArGeo::RAL::m_Emb
RALEmb m_Emb
Definition: RAL.h:33
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
LArGeo::RALEmec::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: RALEmec.cxx:102
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
a0
double a0
Definition: globals.cxx:27
LArGeo::RAL::m_Hec
RALHec m_Hec
Definition: RAL.h:34
LArGeo::RAL::m_Emec
RALEmec m_Emec
Definition: RAL.h:32
LArGeo::RALHec::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: RALHec.cxx:92
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
LArGeo::RALExperimentalHall::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: RALExperimentalHall.cxx:81
LArGeo::RALEmb::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: RALEmb.cxx:147