ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
PhysicsAnalysis
CommonTools
ExpressionEvaluation
ExpressionEvaluation
MultipleProxyLoader.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3
*/
4
6
// MultipleProxyLoader.h, (c) ATLAS Detector software
8
// Author: Thomas Gillam (thomas.gillam@cern.ch)
9
// ExpressionParsing library
11
12
#ifndef MULTIPLE_PROXY_LOADER_H
13
#define MULTIPLE_PROXY_LOADER_H
14
15
#include "
CxxUtils/checker_macros.h
"
16
#include "
CxxUtils/ConcurrentStrMap.h
"
17
#include "
CxxUtils/SimpleUpdater.h
"
18
#include "
ExpressionEvaluation/IProxyLoader.h
"
19
20
#include <vector>
21
#include <map>
22
#include <utility>
23
24
namespace
ExpressionParsing
{
25
class
MultipleProxyLoader
:
public
IProxyLoader
{
26
public
:
27
MultipleProxyLoader
();
28
virtual
~MultipleProxyLoader
();
29
30
IProxyLoader
*
push_back
(std::unique_ptr<IProxyLoader> proxyLoader);
31
32
virtual
void
reset
()
override
;
33
virtual
IAccessor::VariableType
variableType
(
const
std::string &var_name)
const override
;
34
35
virtual
std::pair< IAccessor::VariableType, const IAccessor &>
36
getAccessorFromString
(
const
EventContext &ctx,
const
std::string &varname)
const override
;
37
38
virtual
int
loadInt
(
const
EventContext& ctx,
const
std::string &varname)
const override
;
39
virtual
double
loadDouble
(
const
EventContext& ctx,
const
std::string &varname)
const override
;
40
virtual
std::vector<int>
loadVecInt
(
const
EventContext& ctx,
const
std::string &varname)
const override
;
41
virtual
std::vector<double>
loadVec
(
const
EventContext& ctx,
const
std::string &varname)
const override
;
42
43
private
:
44
std::vector<std::unique_ptr<IProxyLoader> >
m_proxyLoaders
;
45
46
using
proxyCache_t
=
CxxUtils::ConcurrentStrMap<const IAccessor *, CxxUtils::SimpleUpdater>
;
47
mutable
proxyCache_t
m_varnameToProxyLoader
ATLAS_THREAD_SAFE
;
48
};
49
}
50
51
#endif
// MULTIPLE_PROXY_LOADER_H
ConcurrentStrMap.h
Hash map from strings allowing concurrent, lockless reads.
IProxyLoader.h
SimpleUpdater.h
Simple (non-deleting) Updater implementation.
checker_macros.h
Define macros for attributes used to control the static checker.
CxxUtils::ConcurrentStrMap
Hash map from strings allowing concurrent, lockless reads.
Definition
ConcurrentStrMap.h:77
ExpressionParsing::IAccessor::VariableType
VariableType
Definition
IAccessor.h:19
ExpressionParsing::IProxyLoader
Definition
IProxyLoader.h:21
ExpressionParsing::MultipleProxyLoader::loadDouble
virtual double loadDouble(const EventContext &ctx, const std::string &varname) const override
Definition
MultipleProxyLoader.cxx:91
ExpressionParsing::MultipleProxyLoader::ATLAS_THREAD_SAFE
proxyCache_t m_varnameToProxyLoader ATLAS_THREAD_SAFE
Definition
MultipleProxyLoader.h:47
ExpressionParsing::MultipleProxyLoader::push_back
IProxyLoader * push_back(std::unique_ptr< IProxyLoader > proxyLoader)
Definition
MultipleProxyLoader.cxx:31
ExpressionParsing::MultipleProxyLoader::getAccessorFromString
virtual std::pair< IAccessor::VariableType, const IAccessor & > getAccessorFromString(const EventContext &ctx, const std::string &varname) const override
Definition
MultipleProxyLoader.cxx:52
ExpressionParsing::MultipleProxyLoader::~MultipleProxyLoader
virtual ~MultipleProxyLoader()
Definition
MultipleProxyLoader.cxx:26
ExpressionParsing::MultipleProxyLoader::m_proxyLoaders
std::vector< std::unique_ptr< IProxyLoader > > m_proxyLoaders
Definition
MultipleProxyLoader.h:44
ExpressionParsing::MultipleProxyLoader::loadVec
virtual std::vector< double > loadVec(const EventContext &ctx, const std::string &varname) const override
Definition
MultipleProxyLoader.cxx:101
ExpressionParsing::MultipleProxyLoader::variableType
virtual IAccessor::VariableType variableType(const std::string &var_name) const override
Definition
MultipleProxyLoader.cxx:44
ExpressionParsing::MultipleProxyLoader::reset
virtual void reset() override
Definition
MultipleProxyLoader.cxx:37
ExpressionParsing::MultipleProxyLoader::loadVecInt
virtual std::vector< int > loadVecInt(const EventContext &ctx, const std::string &varname) const override
Definition
MultipleProxyLoader.cxx:96
ExpressionParsing::MultipleProxyLoader::loadInt
virtual int loadInt(const EventContext &ctx, const std::string &varname) const override
Definition
MultipleProxyLoader.cxx:86
ExpressionParsing::MultipleProxyLoader::proxyCache_t
CxxUtils::ConcurrentStrMap< const IAccessor *, CxxUtils::SimpleUpdater > proxyCache_t
Definition
MultipleProxyLoader.h:46
ExpressionParsing::MultipleProxyLoader::MultipleProxyLoader
MultipleProxyLoader()
Definition
MultipleProxyLoader.cxx:21
ExpressionParsing
Namespace holding all the expression evaluation code.
Definition
ExpressionParser.h:26
Generated on
for ATLAS Offline Software by
1.17.0