ATLAS Offline Software
Public Member Functions | Private Types | Private Attributes | List of all members
CP::SysReadHandleArray< T > Class Template Referencefinalabstract

a data handle for reading systematics varied input data More...

#include <SysReadHandleArray.h>

Inheritance diagram for CP::SysReadHandleArray< T >:
Collaboration diagram for CP::SysReadHandleArray< T >:

Public Member Functions

template<typename T2 >
 SysReadHandleArray (T2 *owner, const std::string &propertyName, const std::string &propertyDescription)
 standard constructor More...
 
StatusCode initialize ()
 initialize this data handle More...
 
std::size_t size () const noexcept
 the number of read objects configured More...
 
const std::string & getName (const CP::SystematicSet &sys, std::size_t index) const
 get the name we retrieve from the event store More...
 
::StatusCode retrieve (const T *&object, const CP::SystematicSet &sys, std::size_t index) const
 retrieve the object for the given name More...
 
virtual std::string getInputAffecting () const override
 
virtual bool empty () const noexcept=0
 whether this is an empty handle More...
 
virtual std::string getNamePattern () const =0
 get the name pattern before substitution More...
 
virtual CP::SystematicSet getInputAffecting (const ISystematicsSvc &svc) const =0
 get the affecting systematics if this is an input handle More...
 
virtual StatusCode fillSystematics (const ISystematicsSvc &svc, const CP::SystematicSet &fullAffecting, const std::vector< CP::SystematicSet > &sysList)=0
 register and cache the systematics More...
 
bool msgLvl (const MSG::Level lvl) const
 Test the output level of the object. More...
 
MsgStream & msg () const
 The standard message stream. More...
 
MsgStream & msg (const MSG::Level lvl) const
 The standard message stream. More...
 

Private Types

typedef std::decay< decltype(*(std::declval< EL::AnaAlgorithm >).evtStore()))>::type StoreType
 the type of the event store we use More...
 

Private Attributes

std::string m_propertyName
 the name of the property we configured More...
 
bool m_isInitialized {false}
 whether we have been initialized More...
 
std::vector< std::string > m_inputName
 the input name we use More...
 
std::vector< std::string > m_affectingRegex
 the regular expression for affecting systematics More...
 
std::unordered_map< std::pair< CP::SystematicSet, std::size_t >, std::string, boost::hash< std::pair< CP::SystematicSet, std::size_t > > > m_inputNameCache
 the cache of names we use More...
 
StoreTypem_evtStore = nullptr
 the event store we use More...
 
std::function< StoreType *()> m_evtStoreGetter
 the function to retrieve the event store More...
 
std::function< MsgStream &()> m_msg
 the message stream we use More...
 

Detailed Description

template<typename T>
class CP::SysReadHandleArray< T >

a data handle for reading systematics varied input data

Definition at line 28 of file SysReadHandleArray.h.

Member Typedef Documentation

◆ StoreType

template<typename T >
typedef std::decay<decltype( *(std::declval<EL::AnaAlgorithm>).evtStore()))>::type CP::SysReadHandleArray< T >::StoreType
private

the type of the event store we use

Definition at line 104 of file SysReadHandleArray.h.

Constructor & Destructor Documentation

◆ SysReadHandleArray()

template<typename T >
template<typename T2 >
CP::SysReadHandleArray< T >::SysReadHandleArray ( T2 *  owner,
const std::string &  propertyName,
const std::string &  propertyDescription 
)

standard constructor

Member Function Documentation

◆ empty()

virtual bool CP::ISysHandleBase::empty ( ) const
pure virtualnoexceptinherited

◆ fillSystematics()

virtual StatusCode CP::ISysHandleBase::fillSystematics ( const ISystematicsSvc svc,
const CP::SystematicSet fullAffecting,
const std::vector< CP::SystematicSet > &  sysList 
)
pure virtualinherited

register and cache the systematics

Implemented in CP::SysCopyHandle< T >, CP::SysCopyHandle< DataVector >, CP::SysCopyHandle< xAOD::MissingETContainer_v1 >, CP::SysCopyHandle< const DataVector >, CP::SysWriteDecorHandle< T >, CP::SysWriteDecorHandle< uint32_t >, CP::SysWriteDecorHandle< double >, CP::SysWriteDecorHandle< float >, CP::SysWriteDecorHandle< int >, CP::SysWriteDecorHandle< TLorentzVector >, CP::SysWriteDecorHandle< char >, CP::SysWriteDecorHandle< ElementLink< DataVector > >, CP::SysWriteDecorHandle< bool >, CP::SysWriteDecorHandle< std::vector< std::uint8_t > >, CP::SysWriteHandle< T, Aux >, CP::SysWriteHandle< ConstDataVector< xAOD::DiTauJetContainer > >, CP::SysWriteHandle< DataVector >, CP::SysWriteHandle< xAOD::MissingETContainer_v1, xAOD::MissingETAuxContainer_v1 >, CP::SysWriteHandle< ConstDataVector< C > >, CP::SysWriteHandle< ConstDataVector< xAOD::PhotonContainer > >, CP::SysWriteHandle< ConstDataVector< xAOD::TauJetContainer > >, CP::SysWriteHandle< ConstDataVector< xAOD::ElectronContainer > >, CP::SysWriteHandle< ConstDataVector< xAOD::JetContainer > >, CP::SysWriteHandle< ConstDataVector< xAOD::MuonContainer > >, CP::SysReadDecorHandle< T >, CP::SysReadDecorHandle< float >, CP::SysReadHandle< T >, CP::SysReadHandle< xAOD::ElectronContainer >, CP::SysReadHandle< xAOD::MuonContainer >, CP::SysReadHandle< xAOD::MissingETContainer_v1 >, CP::SysReadHandle< DataVector >, CP::SysReadHandle< xAOD::DiTauJetContainer >, CP::SysReadHandle< xAOD::PhotonContainer >, CP::SysReadHandle< C >, CP::SysReadHandle< xAOD::TauJetContainer >, CP::SysReadHandle< xAOD::EventInfo_v1 >, CP::SysReadHandle< xAOD::JetContainer >, CP::SysReadSelectionHandle, and CP::SysWriteSelectionHandle.

◆ getInputAffecting() [1/2]

template<typename T >
virtual std::string CP::SysReadHandleArray< T >::getInputAffecting ( ) const
overridevirtual

◆ getInputAffecting() [2/2]

virtual CP::SystematicSet CP::ISysHandleBase::getInputAffecting ( const ISystematicsSvc svc) const
pure virtualinherited

get the affecting systematics if this is an input handle

This returns the empty set if this is either not an input handle, or if the input handle is not affected by systematics.

Implemented in CP::SysCopyHandle< T >, CP::SysCopyHandle< DataVector >, CP::SysCopyHandle< xAOD::MissingETContainer_v1 >, CP::SysCopyHandle< const DataVector >, CP::SysWriteDecorHandle< T >, CP::SysWriteDecorHandle< uint32_t >, CP::SysWriteDecorHandle< double >, CP::SysWriteDecorHandle< float >, CP::SysWriteDecorHandle< int >, CP::SysWriteDecorHandle< TLorentzVector >, CP::SysWriteDecorHandle< char >, CP::SysWriteDecorHandle< ElementLink< DataVector > >, CP::SysWriteDecorHandle< bool >, CP::SysWriteDecorHandle< std::vector< std::uint8_t > >, CP::SysWriteHandle< T, Aux >, CP::SysWriteHandle< ConstDataVector< xAOD::DiTauJetContainer > >, CP::SysWriteHandle< DataVector >, CP::SysWriteHandle< xAOD::MissingETContainer_v1, xAOD::MissingETAuxContainer_v1 >, CP::SysWriteHandle< ConstDataVector< C > >, CP::SysWriteHandle< ConstDataVector< xAOD::PhotonContainer > >, CP::SysWriteHandle< ConstDataVector< xAOD::TauJetContainer > >, CP::SysWriteHandle< ConstDataVector< xAOD::ElectronContainer > >, CP::SysWriteHandle< ConstDataVector< xAOD::JetContainer > >, CP::SysWriteHandle< ConstDataVector< xAOD::MuonContainer > >, CP::SysReadDecorHandle< T >, CP::SysReadDecorHandle< float >, CP::SysReadHandle< T >, CP::SysReadHandle< xAOD::ElectronContainer >, CP::SysReadHandle< xAOD::MuonContainer >, CP::SysReadHandle< xAOD::MissingETContainer_v1 >, CP::SysReadHandle< DataVector >, CP::SysReadHandle< xAOD::DiTauJetContainer >, CP::SysReadHandle< xAOD::PhotonContainer >, CP::SysReadHandle< C >, CP::SysReadHandle< xAOD::TauJetContainer >, CP::SysReadHandle< xAOD::EventInfo_v1 >, CP::SysReadHandle< xAOD::JetContainer >, CP::SysReadSelectionHandle, and CP::SysWriteSelectionHandle.

◆ getName()

template<typename T >
const std::string& CP::SysReadHandleArray< T >::getName ( const CP::SystematicSet sys,
std::size_t  index 
) const

get the name we retrieve from the event store

◆ getNamePattern()

virtual std::string CP::ISysHandleBase::getNamePattern ( ) const
pure virtualinherited

◆ initialize()

template<typename T >
StatusCode CP::SysReadHandleArray< T >::initialize ( )

initialize this data handle

◆ msg() [1/2]

MsgStream & asg::AsgMessagingForward::msg ( ) const
inherited

The standard message stream.

Returns
A reference to the default message stream of this object.

Definition at line 24 of file AsgMessagingForward.cxx.

25  {
26  return m_msg();
27  }

◆ msg() [2/2]

MsgStream & asg::AsgMessagingForward::msg ( const MSG::Level  lvl) const
inherited

The standard message stream.

Parameters
lvlThe message level to set the stream to
Returns
A reference to the default message stream, set to level "lvl"

Definition at line 29 of file AsgMessagingForward.cxx.

30  {
31  MsgStream& msg = m_msg ();
32  msg << lvl;
33  return msg;
34  }

◆ msgLvl()

bool asg::AsgMessagingForward::msgLvl ( const MSG::Level  lvl) const
inherited

Test the output level of the object.

Parameters
lvlThe message level to test against
Returns
boolean Indicting if messages at given level will be printed
true If messages at level "lvl" will be printed

Definition at line 11 of file AsgMessagingForward.cxx.

12  {
13  MsgStream& msg = m_msg();
14  if (msg.level() <= lvl)
15  {
16  msg << lvl;
17  return true;
18  } else
19  {
20  return false;
21  }
22  }

◆ retrieve()

template<typename T >
::StatusCode CP::SysReadHandleArray< T >::retrieve ( const T *&  object,
const CP::SystematicSet sys,
std::size_t  index 
) const

retrieve the object for the given name

◆ size()

template<typename T >
std::size_t CP::SysReadHandleArray< T >::size ( ) const
noexcept

the number of read objects configured

Member Data Documentation

◆ m_affectingRegex

template<typename T >
std::vector<std::string> CP::SysReadHandleArray< T >::m_affectingRegex
private

the regular expression for affecting systematics

Definition at line 94 of file SysReadHandleArray.h.

◆ m_evtStore

template<typename T >
StoreType* CP::SysReadHandleArray< T >::m_evtStore = nullptr
mutableprivate

the event store we use

Definition at line 108 of file SysReadHandleArray.h.

◆ m_evtStoreGetter

template<typename T >
std::function<StoreType*()> CP::SysReadHandleArray< T >::m_evtStoreGetter
private

the function to retrieve the event store

This is an std::function to allow the parent to be either a tool or an algorithm. Though we are not really supporting tools as parents when using SysListHandle, so in principle this could be replaced with a pointer to the algorithm instead.

Definition at line 118 of file SysReadHandleArray.h.

◆ m_inputName

template<typename T >
std::vector<std::string> CP::SysReadHandleArray< T >::m_inputName
private

the input name we use

Definition at line 90 of file SysReadHandleArray.h.

◆ m_inputNameCache

template<typename T >
std::unordered_map<std::pair<CP::SystematicSet,std::size_t>,std::string,boost::hash<std::pair<CP::SystematicSet,std::size_t> > > CP::SysReadHandleArray< T >::m_inputNameCache
mutableprivate

the cache of names we use

Definition at line 98 of file SysReadHandleArray.h.

◆ m_isInitialized

template<typename T >
bool CP::SysReadHandleArray< T >::m_isInitialized {false}
private

whether we have been initialized

Definition at line 85 of file SysReadHandleArray.h.

◆ m_msg

std::function<MsgStream& ()> asg::AsgMessagingForward::m_msg
privateinherited

the message stream we use

This used to be a simple pointer to the MsgStream itself, but in AthenaMT the actual object used is local to the thread. So instead of pointing to it directly we are now using a function to look it up, which will get the thread-local object.

Definition at line 77 of file AsgMessagingForward.h.

◆ m_propertyName

template<typename T >
std::string CP::SysReadHandleArray< T >::m_propertyName
private

the name of the property we configured

Definition at line 81 of file SysReadHandleArray.h.


The documentation for this class was generated from the following file:
asg::AsgMessagingForward::m_msg
std::function< MsgStream &()> m_msg
the message stream we use
Definition: AsgMessagingForward.h:77
asg::AsgMessagingForward::msg
MsgStream & msg() const
The standard message stream.
Definition: AsgMessagingForward.cxx:24