ATLAS Offline Software
Public Member Functions | Private Member Functions | List of all members
ExpressionParsing::EmptyVectorAccessor Class Reference

Special accessor to handle empty containers until the correct accessor can be created. More...

#include <BaseAccessor.h>

Inheritance diagram for ExpressionParsing::EmptyVectorAccessor:
Collaboration diagram for ExpressionParsing::EmptyVectorAccessor:

Public Member Functions

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

Private Member Functions

void throwEmptyVector () const
 

Detailed Description

Special accessor to handle empty containers until the correct accessor can be created.

Definition at line 40 of file BaseAccessor.h.

Member Function Documentation

◆ loadDouble()

virtual double ExpressionParsing::EmptyVectorAccessor::loadDouble ( const EventContext &  ctx) const
inlineoverridevirtual

Implements ExpressionParsing::IAccessor.

Definition at line 44 of file BaseAccessor.h.

44 { (void) ctx; throwEmptyVector(); return 0.;}

◆ loadInt()

virtual int ExpressionParsing::EmptyVectorAccessor::loadInt ( const EventContext &  ctx) const
inlineoverridevirtual

Implements ExpressionParsing::IAccessor.

Definition at line 43 of file BaseAccessor.h.

43 { (void) ctx; throwEmptyVector(); return 0; }

◆ loadVec()

virtual std::vector<double> ExpressionParsing::EmptyVectorAccessor::loadVec ( const EventContext &  ctx) const
inlineoverridevirtual

Implements ExpressionParsing::IAccessor.

Definition at line 46 of file BaseAccessor.h.

46 { (void) ctx; return std::vector<double>(); }

◆ loadVecInt()

virtual std::vector<int> ExpressionParsing::EmptyVectorAccessor::loadVecInt ( const EventContext &  ctx) const
inlineoverridevirtual

Implements ExpressionParsing::IAccessor.

Definition at line 45 of file BaseAccessor.h.

45 { (void) ctx; return std::vector<int>(); }

◆ throwEmptyVector()

void ExpressionParsing::EmptyVectorAccessor::throwEmptyVector ( ) const
inlineprivate

Definition at line 48 of file BaseAccessor.h.

48  {
49  throw std::runtime_error("Attempt to convert empty vector into scalar.");
50  }

◆ variableType()

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

Implements ExpressionParsing::IAccessor.

Definition at line 42 of file BaseAccessor.h.

42 { return IProxyLoader::VT_VECEMPTY; }

The documentation for this class was generated from the following file:
ExpressionParsing::IProxyLoader::VT_VECEMPTY
@ VT_VECEMPTY
Definition: IProxyLoader.h:21
ExpressionParsing::EmptyVectorAccessor::throwEmptyVector
void throwEmptyVector() const
Definition: BaseAccessor.h:48