ATLAS Offline Software
Namespaces | Typedefs | Functions
SafeDecorator.h File Reference

Helper functions to perform safe decoration of xAOD objects in this package. More...

#include "AthContainers/AuxElement.h"
#include "StoreGate/WriteDecorHandleKey.h"
#include "StoreGate/WriteDecorHandle.h"
#include "StoreGate/ReadDecorHandleKey.h"
#include "StoreGate/ReadDecorHandle.h"
#include "GaudiKernel/EventContext.h"
#include "CxxUtils/fpcompare.h"
#include <iostream>
#include <utility>
#include <vector>
#include <cmath>
#include <cstdlib>
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 IDTPM
 Athena include(s).
 

Typedefs

template<class ContainerType , class VariableType >
using IDTPM::WriteKeyAccessorPair = std::pair< SG::WriteDecorHandleKey< ContainerType >, SG::AuxElement::ConstAccessor< VariableType > >
 Useful declarations. More...
 
template<class ContainerType , class VariableType >
using IDTPM::WriteAccessorRefPair = std::pair< SG::WriteDecorHandle< ContainerType, VariableType >, SG::AuxElement::ConstAccessor< VariableType > & >
 
template<class ContainerType , class VariableType >
using IDTPM::OptionalDecoration = std::pair< SG::WriteDecorHandle< ContainerType, VariableType >, bool >
 

Functions

template<class T_Parent , class T_Cont , class T >
void IDTPM::createDecoratorKeysAndAccessor (T_Parent &parent, const SG::ReadHandleKey< T_Cont > &container_key, const std::string &prefix, const std::vector< std::string > &decor_names, std::vector< WriteKeyAccessorPair< T_Cont, T > > &decor_out)
 create a pair composed of a WriteDecorHandleKey to create a decorator handle and an accessor to check the availablilty of a decoration More...
 
template<class T_Parent , class T_Cont >
void IDTPM::createDecoratorKeys (T_Parent &parent, const SG::ReadHandleKey< T_Cont > &container_key, const std::string &prefix, const std::vector< std::string > &decor_names, std::vector< SG::WriteDecorHandleKey< T_Cont > > &decor_out)
 like createDecoratorKeysAndAccessor but without the accessor to check the availablilty of a decoration More...
 
template<class T_Cont , class T >
bool IDTPM::decorationsAllExist (const T_Cont &container, const std::vector< WriteKeyAccessorPair< T_Cont, T > > &keys, bool verbose=false)
 Like above - FIXME: maybe not needed. More...
 
template<class T_Cont , class T >
std::vector< OptionalDecoration< T_Cont, T > > IDTPM::createDecoratorsIfNeeded (const T_Cont &container, const std::vector< WriteKeyAccessorPair< T_Cont, T > > &keys, const EventContext &ctx, bool verbose=false)
 create/book the decorations if they do not exist already More...
 
template<class T_Cont , class T >
std::vector< SG::WriteDecorHandle< T_Cont, T > > IDTPM::createDecorators (const std::vector< SG::WriteDecorHandleKey< T_Cont > > &keys, const EventContext &ctx)
 similar to createDecoratorsIfNeeded, but without the checking if decorations already exist More...
 
template<class T_Cont , class T_Cont_Elm , class T >
void IDTPM::decorateOrWarnIfUnequal (const T_Cont_Elm &particle, WriteAccessorRefPair< T_Cont, T > &decorator, const T &value)
 Fill the decoration if it deas not exist or it has a different value. More...
 
template<class T_Cont , class T_Cont_Elm , class T >
void IDTPM::decorateOrRejectQuietly (const T_Cont_Elm &particle, OptionalDecoration< T_Cont, T > &decorator, const T &value)
 Safe method to fill the decoration if decor flag is true. More...
 
template<class T_Cont , class T_Cont_Elm , class T >
void IDTPM::decorate (const T_Cont_Elm &particle, OptionalDecoration< T_Cont, T > &decorator, const T &value)
 unsafe fill decoration method for convenience More...
 

Detailed Description

Helper functions to perform safe decoration of xAOD objects in this package.

header file for function of same name adapted from original IDPVM implementation

Author
shaun roe
Date
20 July 2016

Definition in file SafeDecorator.h.