ATLAS Offline Software
Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
ExpressionParsing::BaseAccessor Class Referenceabstract

Base class of xAOD object content accessors. More...

#include <BaseAccessor.h>

Inheritance diagram for ExpressionParsing::BaseAccessor:
Collaboration diagram for ExpressionParsing::BaseAccessor:

Public Member Functions

 BaseAccessor (IProxyLoader::VariableType variable_type)
 
virtual IProxyLoader::VariableType variableType () const override
 
virtual int loadInt (const EventContext &ctx) const =0
 
virtual double loadDouble (const EventContext &ctx) const =0
 
virtual std::vector< int > loadVecInt (const EventContext &ctx) const =0
 
virtual std::vector< double > loadVec (const EventContext &ctx) const =0
 

Static Public Member Functions

static void throwInvalidHandle (const std::string &key)
 
static void throwVectorContainsNotOneElement (const std::string &key, std::size_t n_elements)
 

Private Attributes

IProxyLoader::VariableType m_variableType
 

Detailed Description

Base class of xAOD object content accessors.

Definition at line 16 of file BaseAccessor.h.

Constructor & Destructor Documentation

◆ BaseAccessor()

ExpressionParsing::BaseAccessor::BaseAccessor ( IProxyLoader::VariableType  variable_type)
inline

Definition at line 18 of file BaseAccessor.h.

18 : m_variableType(variable_type) {}

Member Function Documentation

◆ loadDouble()

virtual double ExpressionParsing::IAccessor::loadDouble ( const EventContext &  ctx) const
pure virtualinherited

◆ loadInt()

virtual int ExpressionParsing::IAccessor::loadInt ( const EventContext &  ctx) const
pure virtualinherited

◆ loadVec()

virtual std::vector<double> ExpressionParsing::IAccessor::loadVec ( const EventContext &  ctx) const
pure virtualinherited

◆ loadVecInt()

virtual std::vector<int> ExpressionParsing::IAccessor::loadVecInt ( const EventContext &  ctx) const
pure virtualinherited

◆ throwInvalidHandle()

static void ExpressionParsing::BaseAccessor::throwInvalidHandle ( const std::string &  key)
inlinestatic

Definition at line 20 of file BaseAccessor.h.

20  {
21  std::stringstream msg;
22  msg << "Failed to create read handle for " << key;
23  throw std::runtime_error(key);
24  }

◆ throwVectorContainsNotOneElement()

static void ExpressionParsing::BaseAccessor::throwVectorContainsNotOneElement ( const std::string &  key,
std::size_t  n_elements 
)
inlinestatic

Definition at line 25 of file BaseAccessor.h.

25  {
26  std::stringstream msg;
27  msg << "Cannot convert to scalar since the aux vector data container " << key << " does not contain exactly one element but " << n_elements;
28  throw std::runtime_error(key);
29  }

◆ variableType()

virtual IProxyLoader::VariableType ExpressionParsing::BaseAccessor::variableType ( ) const
inlineoverridevirtual

Implements ExpressionParsing::IAccessor.

Definition at line 30 of file BaseAccessor.h.

30  {
31  return m_variableType;
32  }

Member Data Documentation

◆ m_variableType

IProxyLoader::VariableType ExpressionParsing::BaseAccessor::m_variableType
private

Definition at line 35 of file BaseAccessor.h.


The documentation for this class was generated from the following file:
ExpressionParsing::BaseAccessor::m_variableType
IProxyLoader::VariableType m_variableType
Definition: BaseAccessor.h:35
python.AutoConfigFlags.msg
msg
Definition: AutoConfigFlags.py:7
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37