ATLAS Offline Software
EventInfoAccessors_v1.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 // $Id: EventInfoAccessors_v1.cxx 579930 2014-01-24 10:36:54Z krasznaa $
6 
7 // System include(s):
8 #include <iostream>
9 
10 // Local include(s):
11 #include "EventInfoAccessors_v1.h"
12 
14 #define DEFINE_ACCESSOR( ENUM_NAME, AUX_NAME ) \
15  case EventInfo_v1::ENUM_NAME: \
16  { \
17  static const SG::AtomicDecorator< uint32_t > a( #AUX_NAME ); \
18  return &a; \
19  } \
20  break
21 
23 #define DEFINE_CONST_ACCESSOR( ENUM_NAME, AUX_NAME ) \
24  case EventInfo_v1::ENUM_NAME: \
25  { \
26  static const SG::AtomicConstAccessor< uint32_t > a( #AUX_NAME ); \
27  return &a; \
28  } \
29  break
30 
31 namespace xAOD {
32 
35 
36  switch( subDet ) {
37 
38  DEFINE_ACCESSOR( Pixel, pixelFlags );
39  DEFINE_ACCESSOR( SCT, sctFlags );
40  DEFINE_ACCESSOR( TRT, trtFlags );
41  DEFINE_ACCESSOR( LAr, larFlags );
42  DEFINE_ACCESSOR( Tile, tileFlags );
43  DEFINE_ACCESSOR( Muon, muonFlags );
44  DEFINE_ACCESSOR( ForwardDet, forwardDetFlags );
45  DEFINE_ACCESSOR( Core, coreFlags );
46  DEFINE_ACCESSOR( Background, backgroundFlags );
47  DEFINE_ACCESSOR( Lumi, lumiFlags );
48 
49  default:
50  std::cerr << "xAOD::EventInfo_v1 ERROR Unknown sub-detector ("
51  << subDet << ") requested" << std::endl;
52  return nullptr;
53  }
54  }
55 
56 
59 
60  switch( subDet ) {
61 
62  DEFINE_CONST_ACCESSOR( Pixel, pixelFlags );
63  DEFINE_CONST_ACCESSOR( SCT, sctFlags );
64  DEFINE_CONST_ACCESSOR( TRT, trtFlags );
65  DEFINE_CONST_ACCESSOR( LAr, larFlags );
66  DEFINE_CONST_ACCESSOR( Tile, tileFlags );
67  DEFINE_CONST_ACCESSOR( Muon, muonFlags );
68  DEFINE_CONST_ACCESSOR( ForwardDet, forwardDetFlags );
69  DEFINE_CONST_ACCESSOR( Core, coreFlags );
70  DEFINE_CONST_ACCESSOR( Background, backgroundFlags );
71  DEFINE_CONST_ACCESSOR( Lumi, lumiFlags );
72 
73  default:
74  std::cerr << "xAOD::EventInfo_v1 ERROR Unknown sub-detector ("
75  << subDet << ") requested" << std::endl;
76  return nullptr;
77  }
78  }
79 
80 } // namespace xAOD
EventInfoAccessors_v1.h
DEFINE_ACCESSOR
#define DEFINE_ACCESSOR(ENUM_NAME, AUX_NAME)
Helper macro for defining the different accessor objects.
Definition: EventInfoAccessors_v1.cxx:14
Pixel
Definition: PixelFEUtils.h:16
LAr
Definition: LArVolumeBuilder.h:36
xAOD::eventFlagsAccessorsV1
const SG::AtomicDecorator< uint32_t > * eventFlagsAccessorsV1(EventInfo_v1::EventFlagSubDet subDet)
Helper function for accessing event flag variables.
Definition: EventInfoAccessors_v1.cxx:34
xAOD
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Definition: ICaloAffectedTool.h:24
Muon
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.
Definition: TrackSystemController.h:45
xAOD::eventFlagsConstAccessorsV1
const SG::AtomicConstAccessor< uint32_t > * eventFlagsConstAccessorsV1(EventInfo_v1::EventFlagSubDet subDet)
Helper function for accessing event flag variables, for const access.
Definition: EventInfoAccessors_v1.cxx:58
Tile
Definition: TileVolumeBuilder.h:43
TRT
Definition: HitInfo.h:33
SG::AtomicConstAccessor
Access an auxiliary variable atomically.
Definition: AtomicConstAccessor.h:45
SCT
Definition: SCT_ChipUtils.h:14
xAOD::EventInfo_v1::EventFlagSubDet
EventFlagSubDet
Sub-detector types for which we store event-level flags.
Definition: EventInfo_v1.h:331
DEFINE_CONST_ACCESSOR
#define DEFINE_CONST_ACCESSOR(ENUM_NAME, AUX_NAME)
Helper macro for defining the different accessor objects.
Definition: EventInfoAccessors_v1.cxx:23
SG::AtomicDecorator
Access an auxiliary variable atomically.
Definition: AtomicDecorator.h:44