ATLAS Offline Software
Public Types | Static Public Member Functions | List of all members
CP::detail::ShallowCopy< xAOD::IParticleContainer > Struct Reference

#include <CopyHelpers.h>

Collaboration diagram for CP::detail::ShallowCopy< xAOD::IParticleContainer >:

Public Types

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

Static Public Member Functions

static StatusCode getCopy (MsgStream &msgStream, StoreType &store, xAOD::IParticleContainer *&object, const xAOD::IParticleContainer *inputObject, const std::string &outputName, const std::string &auxName)
 

Detailed Description

Definition at line 310 of file SystematicsHandles/SystematicsHandles/CopyHelpers.h.

Member Typedef Documentation

◆ StoreType

typedef std::decay<decltype( *(std::declval<EL::AnaAlgorithm>).evtStore()))>::type CP::detail::ShallowCopy< xAOD::IParticleContainer >::StoreType

the type of the event store we use

Definition at line 315 of file SystematicsHandles/SystematicsHandles/CopyHelpers.h.

Member Function Documentation

◆ getCopy()

StatusCode CP::detail::ShallowCopy< xAOD::IParticleContainer >::getCopy ( MsgStream &  msgStream,
StoreType store,
xAOD::IParticleContainer *&  object,
const xAOD::IParticleContainer inputObject,
const std::string &  outputName,
const std::string &  auxName 
)
static

Definition at line 30 of file SystematicsHandles/Root/CopyHelpers.cxx.

35  {
36  // this is probably not the best way to do this, but doing this
37  // the proper way will require an xAOD expert to do it.
38 
39  // Set up a lambda for providing a msg(...) function.
40  // Suppress thread-checker warning because this provides just a wrapper to MsgStream.
41  const auto msg = [&] ATLAS_NOT_THREAD_SAFE (MSG::Level lvl) -> MsgStream& {
42  msgStream << lvl;
43  return msgStream;
44  };
45 
46  // using a macro is a bit awkward, but doing this as a template
47  // is not practical either
48 #define COPY(TYPE) \
49  do { \
50  const TYPE *in = dynamic_cast< const TYPE* >( inputObject ); \
51  if( in ) { \
52  TYPE *out = nullptr; \
53  ANA_CHECK( ShallowCopy<TYPE>::getCopy( msgStream, store, out, in, \
54  outputName, auxName ) ); \
55  object = out; \
56  return StatusCode::SUCCESS; \
57  } \
58  } while( false )
59 
67 
68 #undef COPY
69 
70  ANA_MSG_ERROR ("could not determine type to create shallow copy " << outputName);
71  ANA_MSG_ERROR ("please extend CopyHelpers.cxx with the appropriate type");
72  return StatusCode::FAILURE;
73  }

The documentation for this struct was generated from the following files:
ATLAS_NOT_THREAD_SAFE
#define ATLAS_NOT_THREAD_SAFE
getNoisyStrip() Find noisy strips from hitmaps and write out into xml/db formats
Definition: checker_macros.h:212
ANA_MSG_ERROR
#define ANA_MSG_ERROR(xmsg)
Macro printing error messages.
Definition: Control/AthToolSupport/AsgMessaging/AsgMessaging/MessageCheck.h:294
TrigConf::MSGTC::Level
Level
Definition: Trigger/TrigConfiguration/TrigConfBase/TrigConfBase/MsgStream.h:21
COPY
#define COPY(TYPE)
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
lumiFormat.outputName
string outputName
Definition: lumiFormat.py:71
python.AutoConfigFlags.msg
msg
Definition: AutoConfigFlags.py:7