4#ifndef _ExpressionEvaluation_Utils_h_
5#define _ExpressionEvaluation_Utils_h_
8#include "GaudiKernel/DataHandle.h"
16 template <
class T_Key>
17 void initializeHandle(T_Key *key, std::vector<Gaudi::DataHandle *> &new_input_handles) {
19 if (key->initialize().isFailure()) {
20 std::stringstream
msg;
21 msg <<
"Failed to initialize read handle " << key->key();
22 throw std::runtime_error(
msg.str());
25 new_input_handles.push_back( key);
31 template <
class T_Aux>
48 static std::size_t
getSize(
const T &cont) {
57 static std::size_t
getSize(
const std::vector<T> &cont) {
return cont.size(); }
87 template <
class T_Derived>
92 s_instance.set(std::make_unique<T_Derived>());
99 template <
class T_Derived>
Base class for elements of a container that can have aux data.
Manage index tracking and synchronization of auxiliary data.
Define macros for attributes used to control the static checker.
Cached pointer with atomic update.
static CxxUtils::CachedUniquePtrT< T_Derived > s_instance ATLAS_THREAD_SAFE
static T_Derived & instance()
static std::size_t getSize(const SG::AuxElement &cont)
static std::size_t getSize(const SG::AuxVectorBase &cont)
static std::size_t getSize(const std::vector< T > &cont)
static std::size_t getSize(const T &cont)
Base class for elements of a container that can have aux data.
const SG::AuxVectorData * container() const
Return the container holding this element.
Manage index tracking and synchronization of auxiliary data.
bool isAvailable(const std::string &name, const std::string &clsname="") const
Test to see if a variable exists in the store.
Manage lookup of vectors of auxiliary data.
bool isAvailable(auxid_t id) const
Test to see if a variable exists in the store.
virtual size_t size_v() const =0
Return the size of the container.
Namespace holding all the expression evaluation code.
bool isAvailable(const T_Aux &cont, SG::auxid_t auxid)
const SG::AuxVectorData * getVectorData(const T &cont)
const SG::AuxVectorData * getVectorData< SG::AuxElement >(const SG::AuxElement &cont)
bool isAvailable< SG::AuxVectorBase >(const SG::AuxVectorBase &cont, SG::auxid_t auxid)
CxxUtils::CachedUniquePtrT< T_Derived > Singleton< T_Derived >::s_instance ATLAS_THREAD_SAFE
void initializeHandle(T_Key *key, std::vector< Gaudi::DataHandle * > &new_input_handles)
Auxiliary function to initialize newly create data handles.
bool isAvailable< SG::AuxElement >(const SG::AuxElement &cont, SG::auxid_t auxid)
std::size_t getContainerSize(const T &cont)
size_t auxid_t
Identifier for a particular aux data item.