ATLAS Offline Software
Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
xAODMaker::EventInfoCnvTool Class Reference

Implementation for the IEventInfoCnvTool interface. More...

#include <EventInfoCnvTool.h>

Inheritance diagram for xAODMaker::EventInfoCnvTool:
Collaboration diagram for xAODMaker::EventInfoCnvTool:

Public Member Functions

 EventInfoCnvTool (const std::string &type, const std::string &name, const IInterface *parent)
 Regular AlgTool constructor. More...
 
virtual StatusCode initialize () override
 Function initialising the tool. More...
 
virtual StatusCode convert (const EventInfo *aod, xAOD::EventInfo *xaod, bool pileUpInfo=false, bool copyPileUpLinks=true, const EventContext &ctx=Gaudi::Hive::currentContext()) const override
 Function that fills an existing xAOD::EventInfo object with data. More...
 
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & evtStore () const
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc. More...
 
virtual StatusCode sysInitialize () override
 Perform system initialization for an algorithm. More...
 
virtual StatusCode sysStart () override
 Handle START transition. More...
 
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles. More...
 
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles. More...
 
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T > &t)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc="none")
 Declare a new Gaudi property. More...
 
void updateVHKA (Gaudi::Details::PropertyBase &)
 
MsgStream & msg () const
 
MsgStream & msg (const MSG::Level lvl) const
 
bool msgLvl (const MSG::Level lvl) const
 

Static Public Member Functions

static const InterfaceID & interfaceID ()
 Gaudi interface definition. More...
 

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution More...
 
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
 
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed. More...
 

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &)
 specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
 

Private Attributes

SG::ReadCondHandleKey< InDet::BeamSpotDatam_beamSpotKey { this, "BeamSpotKey", "BeamSpotData", "SG key for beam spot" }
 
Gaudi::Property< bool > m_disableBeamSpot { this, "DisableBeamSpot", false, "disable beamspot" }
 
bool m_beamSpotInformationAvailable {}
 Internal flag for the availability of the beam spot information. More...
 
SG::ReadCondHandleKey< LuminosityCondDatam_lumiDataKey { this, "LumiDataKey", "", "SG key for luminosity data" }
 
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default) More...
 
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default) More...
 
std::vector< SG::VarHandleKeyArray * > m_vhka
 
bool m_varHandleArraysDeclared
 

Detailed Description

Implementation for the IEventInfoCnvTool interface.

   This is a simple tool that implements the converter function
   defined in IEventInfoCnvTool.
Author
Attila Krasznahorkay Attil.nosp@m.a.Kr.nosp@m.aszna.nosp@m.hork.nosp@m.ay@ce.nosp@m.rn.c.nosp@m.h

Definition at line 42 of file EventInfoCnvTool.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< AlgTool > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ EventInfoCnvTool()

xAODMaker::EventInfoCnvTool::EventInfoCnvTool ( const std::string &  type,
const std::string &  name,
const IInterface *  parent 
)

Regular AlgTool constructor.

Definition at line 52 of file EventInfoCnvTool.cxx.

55  : AthAlgTool( type, name, parent )
56  {
57  // Declare the interface(s) provided by the tool:
58  declareInterface< IEventInfoCnvTool >( this );
59  }

Member Function Documentation

◆ convert()

StatusCode xAODMaker::EventInfoCnvTool::convert ( const EventInfo aod,
xAOD::EventInfo xaod,
bool  pileUpInfo = false,
bool  copyPileUpLinks = true,
const EventContext &  ctx = Gaudi::Hive::currentContext() 
) const
overridevirtual

Function that fills an existing xAOD::EventInfo object with data.

This is the important function of the tool.

It takes the EventInfo object available in Athena, and fills an xAOD::EventInfo object with its contents.

Parameters
aodThe AOD's EventInfo object
xaodThe xAOD::EventInfo object to fill
pileUpInfotrue for pile-up EventInfo objects
copyPileUpLinksAllows to turn the ElementLink creation on or off
ctxEvent context.
Returns
StatusCode::SUCCESS if all went fine, something else if not

Implements xAODMaker::IEventInfoCnvTool.

Definition at line 103 of file EventInfoCnvTool.cxx.

108  {
109 
110  if( ! aod ) {
111  ATH_MSG_WARNING( "Null pointer received for input!" );
112  return StatusCode::SUCCESS;
113  }
114 
115  // Copy the basic properties into the xAOD object:
116  if( aod->event_ID() ) {
117  xaod->setRunNumber( aod->event_ID()->run_number() );
118  xaod->setEventNumber( aod->event_ID()->event_number() );
119  xaod->setLumiBlock( aod->event_ID()->lumi_block() );
120  xaod->setTimeStamp( aod->event_ID()->time_stamp() );
121  xaod->setTimeStampNSOffset( aod->event_ID()->time_stamp_ns_offset() );
122  xaod->setBCID( aod->event_ID()->bunch_crossing_id() );
123  xaod->setDetectorMask( aod->event_ID()->detector_mask0(),
124  aod->event_ID()->detector_mask1() );
125  xaod->setDetectorMaskExt( aod->event_ID()->detector_mask2(),
126  aod->event_ID()->detector_mask3() );
127  }
128 
129  // Copy the event type properties:
130  std::vector< float > eventWeights;
131  if( aod->event_type() ) {
132  EventType::NameTagPairVec detDescrTags;
133  aod->event_type()->get_detdescr_tags( detDescrTags );
134  xaod->setDetDescrTags( detDescrTags );
135  uint32_t eventTypeBitmask = 0;
136  if( aod->event_type()->test( EventType::IS_SIMULATION ) ) {
137  eventTypeBitmask |= xAOD::EventInfo::IS_SIMULATION;
138  }
139  if( aod->event_type()->test( EventType::IS_TESTBEAM ) ) {
140  eventTypeBitmask |= xAOD::EventInfo::IS_TESTBEAM;
141  }
142  if( aod->event_type()->test( EventType::IS_CALIBRATION ) ) {
143  eventTypeBitmask |= xAOD::EventInfo::IS_CALIBRATION;
144  }
145  xaod->setEventTypeBitmask( eventTypeBitmask );
146  // Only add MC information for simulation files:
149  xaod->setMCEventNumber( aod->event_type()->mc_event_number() );
150  eventWeights.resize( aod->event_type()->n_mc_event_weights(), 0.0 );
151  for( unsigned int i = 0; i < aod->event_type()->n_mc_event_weights();
152  ++i ) {
153  eventWeights[ i ] = aod->event_type()->mc_event_weight( i );
154  }
155  }
156  }
157 
158  // Copy the trigger properties into the xAOD object:
159  if( aod->trigger_info() && !pileUpInfo ) {
160  xaod->setStatusElement( aod->trigger_info()->statusElement() );
163  std::vector< xAOD::EventInfo::StreamTag > streamTags;
164  std::vector< TriggerInfo::StreamTag >::const_iterator st_itr =
165  aod->trigger_info()->streamTags().begin();
166  std::vector< TriggerInfo::StreamTag >::const_iterator st_end =
167  aod->trigger_info()->streamTags().end();
168  for( ; st_itr != st_end; ++st_itr ) {
169  streamTags.emplace_back( st_itr->name(), st_itr->type(),
170  st_itr->obeysLumiblock(),
171  st_itr->robs(), st_itr->dets() );
172  }
173  xaod->setStreamTags( streamTags );
174  }
175 
176  // Copy/calculate the pileup information:
177  if( ! pileUpInfo ) {
178  bool haveLumi = false;
179 #if !defined(XAOD_ANALYSIS) && !defined(SIMULATIONBASE) && !defined(GENERATIONBASE)
180  if (!m_lumiDataKey.empty()) {
182  if (lumiData->lbAverageLuminosity() != 0 ||
183  lumiData->lbAverageInteractionsPerCrossing() != 0)
184  {
185  float actualMu = 0.0;
186  const float muToLumi = lumiData->muToLumi();
187  if( std::abs( muToLumi ) > 0.00001 ) {
188  unsigned int bcid = ctx.eventID().bunch_crossing_id();
189  actualMu = lumiData->lbLuminosityPerBCIDVector().at(bcid) / muToLumi;
190  }
191  xaod->setActualInteractionsPerCrossing( actualMu );
193  lumiData->lbAverageInteractionsPerCrossing() );
194  }
195  haveLumi = true;
196  }
197 #endif // not XAOD_ANALYSIS or SIMULATIONBASE or GENERATIONBASE
198  if (!haveLumi) {
203  }
204  }
205 
206  // Copy the sub-detector flags:
208  EventInfo::EventFlagSubDet >::const_iterator sd_itr =
209  subDetMap.begin();
211  EventInfo::EventFlagSubDet >::const_iterator sd_end =
212  subDetMap.end();
213  for( ; sd_itr != sd_end; ++sd_itr ) {
214 
215  // Lumi does not store event flags, or an error state:
216  if( (int)sd_itr->first == (int)EventInfo::Lumi ) {
217  continue;
218  }
219 
220  // Set the event flags for this sub-detector:
221  xaod->setEventFlags( sd_itr->first, aod->eventFlags( sd_itr->second ) );
222 
223  // Look up the error state of this sub-detector:
225  xAOD::EventInfo::EventFlagErrorState >::const_iterator state =
226  errorStateMap.find( aod->errorState( sd_itr->second ) );
227  if( state == errorStateMap.end() ) {
229  << "Unknown error state found for sub-detector "
230  << sd_itr->second << ": " << aod->errorState( sd_itr->second );
231  return StatusCode::FAILURE;
232  }
233 
234  // Set the error state for the sub-detector:
235  xaod->setErrorState( sd_itr->first, state->second );
236  }
237 
238  // Check if it is a PileUpEventInfo object:
239  const PileUpEventInfo* puei =
240  dynamic_cast< const PileUpEventInfo* >( aod );
241  if( puei && copyPileUpLinks ) {
242  // Create the sub-event objects to fill into the output object:
243  std::vector< xAOD::EventInfo::SubEvent > subEvents;
246  for( ; itr != end; ++itr ) {
247  // Look up the sub-event type:
248 
250  switch (itr->type()) {
253  break;
256  break;
259  break;
262  break;
265  break;
268  break;
270  break;
271  default:
272  ATH_MSG_WARNING( "Unknown sub-event type ("
273  << itr->type() << ") encountered" );
274  break;
275  }
276 
277  // Construct the link to the pile-up EventInfo object:
279  link.resetWithKeyAndIndex( "PileUpEventInfo", itr->index() );
280 
281  // Add the new object
282  subEvents.emplace_back( itr->time(),
283  itr->index(),
284  type, link );
285  }
286 
287  // Add the vector to the EventInfo:
288  xaod->setSubEvents( subEvents );
289  }
290 
291 #if !defined(XAOD_ANALYSIS) && !defined(GENERATIONBASE)
292  // Fill the beam spot variables if the necessary service is available:
293  if( m_beamSpotInformationAvailable && ( ! pileUpInfo ) ) {
295  xaod->setBeamPos( beamSpotHandle->beamPos()[ Amg::x ],
296  beamSpotHandle->beamPos()[ Amg::y ],
297  beamSpotHandle->beamPos()[ Amg::z ] );
298  xaod->setBeamPosSigma( beamSpotHandle->beamSigma( 0 ),
299  beamSpotHandle->beamSigma( 1 ),
300  beamSpotHandle->beamSigma( 2 ) );
301  xaod->setBeamPosSigmaXY( beamSpotHandle->beamSigmaXY() );
302  xaod->setBeamTiltXZ( beamSpotHandle->beamTilt( 0 ) );
303  xaod->setBeamTiltYZ( beamSpotHandle->beamTilt( 1 ) );
304  xaod->setBeamStatus( beamSpotHandle->beamStatus() );
305  }
306 #endif // not XAOD_ANALYSIS or GENERATIONBASE
307 
308  if (!eventWeights.empty()) {
309  if (xaod->getStore()) {
310  // Ensure that this gets added as a decoration.
311  xaod->getStore()->lock();
312  }
313  static const xAOD::EventInfo::Decorator<std::vector<float> > ew ("mcEventWeights");
314  ew (*xaod) = std::move (eventWeights);
315  }
316 
317  // Finish with some printout:
318  ATH_MSG_DEBUG( "Finished conversion EventInfo="<<aod<<" xAOD::EventInfo="<<xaod<<" content=" << *xaod );
319 
320  // Return gracefully:
321  return StatusCode::SUCCESS;
322  }

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyArrayType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKeyArray>

Definition at line 170 of file AthCommonDataStore.h.

172  {
173  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
174  hndl.value(),
175  hndl.documentation());
176 
177  }

◆ declareGaudiProperty() [2/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158  {
159  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
160  hndl.value(),
161  hndl.documentation());
162 
163  }

◆ declareGaudiProperty() [3/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleBase>

Definition at line 184 of file AthCommonDataStore.h.

186  {
187  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
188  hndl.value(),
189  hndl.documentation());
190  }

◆ declareGaudiProperty() [4/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  t,
const SG::NotHandleType  
)
inlineprivateinherited

specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray>

Definition at line 199 of file AthCommonDataStore.h.

200  {
201  return PBASE::declareProperty(t);
202  }

◆ declareProperty() [1/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleBase hndl,
const std::string &  doc,
const SG::VarHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleBase. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 245 of file AthCommonDataStore.h.

249  {
250  this->declare(hndl.vhKey());
251  hndl.vhKey().setOwner(this);
252 
253  return PBASE::declareProperty(name,hndl,doc);
254  }

◆ declareProperty() [2/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKey hndl,
const std::string &  doc,
const SG::VarHandleKeyType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleKey. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 221 of file AthCommonDataStore.h.

225  {
226  this->declare(hndl);
227  hndl.setOwner(this);
228 
229  return PBASE::declareProperty(name,hndl,doc);
230  }

◆ declareProperty() [3/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKeyArray hndArr,
const std::string &  doc,
const SG::VarHandleKeyArrayType  
)
inlineinherited

Definition at line 259 of file AthCommonDataStore.h.

263  {
264 
265  // std::ostringstream ost;
266  // ost << Algorithm::name() << " VHKA declareProp: " << name
267  // << " size: " << hndArr.keys().size()
268  // << " mode: " << hndArr.mode()
269  // << " vhka size: " << m_vhka.size()
270  // << "\n";
271  // debug() << ost.str() << endmsg;
272 
273  hndArr.setOwner(this);
274  m_vhka.push_back(&hndArr);
275 
276  Gaudi::Details::PropertyBase* p = PBASE::declareProperty(name, hndArr, doc);
277  if (p != 0) {
278  p->declareUpdateHandler(&AthCommonDataStore<PBASE>::updateVHKA, this);
279  } else {
280  ATH_MSG_ERROR("unable to call declareProperty on VarHandleKeyArray "
281  << name);
282  }
283 
284  return p;
285 
286  }

◆ declareProperty() [4/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc,
const SG::NotHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This is the generic version, for types that do not derive from SG::VarHandleKey. It just forwards to the base class version of declareProperty.

Definition at line 333 of file AthCommonDataStore.h.

337  {
338  return PBASE::declareProperty(name, property, doc);
339  }

◆ declareProperty() [5/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc = "none" 
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This dispatches to either the generic declareProperty or the one for VarHandle/Key/KeyArray.

Definition at line 352 of file AthCommonDataStore.h.

355  {
356  typedef typename SG::HandleClassifier<T>::type htype;
357  return declareProperty (name, property, doc, htype());
358  }

◆ declareProperty() [6/6]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( Gaudi::Property< T > &  t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145  {
146  typedef typename SG::HandleClassifier<T>::type htype;
148  }

◆ detStore()

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

95 { return m_detStore; }

◆ evtStore() [1/2]

ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

85 { return m_evtStore; }

◆ evtStore() [2/2]

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( ) const
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 90 of file AthCommonDataStore.h.

90 { return m_evtStore; }

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase &  ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ initialize()

StatusCode xAODMaker::EventInfoCnvTool::initialize ( )
overridevirtual

Function initialising the tool.

Definition at line 61 of file EventInfoCnvTool.cxx.

62  {
63 
64 #if !defined(XAOD_ANALYSIS) && !defined(GENERATIONBASE)
65  // Check if the beam position will be available or not:
66  if( detStore()->contains< AthenaAttributeList >( INDET_BEAMPOS ) ) {
68  } else {
69  // This is normal in some cases, but tell the user anyway
70  ATH_MSG_INFO( "Beam spot information not available" );
71  ATH_MSG_INFO( "Will not fill beam spot information into "
72  "xAOD::EventInfo" );
74  }
76  ATH_MSG_WARNING( "Beam spot information manually disabled on EventInfo object" );
78  }
79 
81 #endif // not XAOD_ANALYSIS or GENERATIONBASE
82 
83 #if !defined(XAOD_ANALYSIS) && !defined(SIMULATIONBASE) && !defined(GENERATIONBASE)
85 #endif // not XAOD_ANALYSIS or GENERATIONBASE
86 
87  // Return gracefully:
88  return StatusCode::SUCCESS;
89  }

◆ inputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< AlgTool > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ interfaceID()

static const InterfaceID& xAODMaker::IEventInfoCnvTool::interfaceID ( )
inlinestaticinherited

Gaudi interface definition.

Definition at line 51 of file IEventInfoCnvTool.h.

51  {
52  return IID_IEventInfoCnvTool;
53  }

◆ msg() [1/2]

MsgStream& AthCommonMsg< AlgTool >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24  {
25  return this->msgStream();
26  }

◆ msg() [2/2]

MsgStream& AthCommonMsg< AlgTool >::msg ( const MSG::Level  lvl) const
inlineinherited

Definition at line 27 of file AthCommonMsg.h.

27  {
28  return this->msgStream(lvl);
29  }

◆ msgLvl()

bool AthCommonMsg< AlgTool >::msgLvl ( const MSG::Level  lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30  {
31  return this->msgLevel(lvl);
32  }

◆ outputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< AlgTool > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ renounce()

std::enable_if_t<std::is_void_v<std::result_of_t<decltype(&T::renounce)(T)> > && !std::is_base_of_v<SG::VarHandleKeyArray, T> && std::is_base_of_v<Gaudi::DataHandle, T>, void> AthCommonDataStore< AthCommonMsg< AlgTool > >::renounce ( T &  h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381  {
382  h.renounce();
383  PBASE::renounce (h);
384  }

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::renounceArray ( SG::VarHandleKeyArray handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364  {
365  handlesArray.renounce();
366  }

◆ sysInitialize()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysInitialize ( )
overridevirtualinherited

Perform system initialization for an algorithm.

We override this to declare all the elements of handle key arrays at the end of initialization. See comments on updateVHKA.

Reimplemented in DerivationFramework::CfAthAlgTool, AthCheckedComponent< AthAlgTool >, AthCheckedComponent<::AthAlgTool >, and asg::AsgMetadataTool.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::updateVHKA ( Gaudi::Details::PropertyBase &  )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308  {
309  // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310  // << " size: " << m_vhka.size() << endmsg;
311  for (auto &a : m_vhka) {
312  std::vector<SG::VarHandleKey*> keys = a->keys();
313  for (auto k : keys) {
314  k->setOwner(this);
315  }
316  }
317  }

Member Data Documentation

◆ m_beamSpotInformationAvailable

bool xAODMaker::EventInfoCnvTool::m_beamSpotInformationAvailable {}
private

Internal flag for the availability of the beam spot information.

Definition at line 66 of file EventInfoCnvTool.h.

◆ m_beamSpotKey

SG::ReadCondHandleKey<InDet::BeamSpotData> xAODMaker::EventInfoCnvTool::m_beamSpotKey { this, "BeamSpotKey", "BeamSpotData", "SG key for beam spot" }
private

Definition at line 62 of file EventInfoCnvTool.h.

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_disableBeamSpot

Gaudi::Property<bool> xAODMaker::EventInfoCnvTool::m_disableBeamSpot { this, "DisableBeamSpot", false, "disable beamspot" }
private

Definition at line 63 of file EventInfoCnvTool.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_lumiDataKey

SG::ReadCondHandleKey<LuminosityCondData> xAODMaker::EventInfoCnvTool::m_lumiDataKey { this, "LumiDataKey", "", "SG key for luminosity data" }
private

Definition at line 70 of file EventInfoCnvTool.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< AlgTool > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files:
xAODMaker::EventInfoCnvTool::m_beamSpotInformationAvailable
bool m_beamSpotInformationAvailable
Internal flag for the availability of the beam spot information.
Definition: EventInfoCnvTool.h:66
xAOD::EventInfo_v1::setActualInteractionsPerCrossing
void setActualInteractionsPerCrossing(float value)
Set average interactions per crossing for the current BCID.
Definition: EventInfo_v1.cxx:391
xAOD::EventInfo_v1::setSubEvents
void setSubEvents(const std::vector< SubEvent > &value)
Set the pileup events that were used in the simulation.
Definition: EventInfo_v1.cxx:607
TriggerInfo::streamTags
const std::vector< StreamTag > & streamTags() const
get stream tags
Definition: TriggerInfo.cxx:158
EventType::get_detdescr_tags
void get_detdescr_tags(NameTagPairVec &pairs) const
Access DetDescr tags.
Definition: EventType.cxx:113
xAOD::EventInfo_v1::setEventNumber
void setEventNumber(uint64_t value)
Set the current event's event number.
EventInfo::averageInteractionsPerCrossing
float averageInteractionsPerCrossing() const
average interactions per crossing for all BCIDs - for out-of-time pile-up
Definition: EventInfo/EventInfo/EventInfo.h:296
python.Constants.FATAL
int FATAL
Definition: Control/AthenaCommon/python/Constants.py:19
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
PileUpTimeEventIndex::Cavern
@ Cavern
Definition: PileUpTimeEventIndex.h:18
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
xAOD::EventInfo_v1::HighPtMinimumBias
@ HighPtMinimumBias
High pT Minimum bias pileup event.
Definition: EventInfo_v1.h:270
xAOD::EventInfo_v1::MinimumBias
@ MinimumBias
(Low pT) Minimum bias pileup event
Definition: EventInfo_v1.h:267
xAOD::EventInfo_v1::IS_CALIBRATION
@ IS_CALIBRATION
true: calibration, false: physics
Definition: EventInfo_v1.h:155
xAOD::EventInfo_v1::setBeamPos
void setBeamPos(float x, float y, float z)
Set the beam spot position.
Definition: EventInfo_v1.cxx:916
Amg::y
@ y
Definition: GeoPrimitives.h:35
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
xAOD::EventInfo_v1::PileUpType
PileUpType
Enumerator describing the types of pileup events.
Definition: EventInfo_v1.h:264
xAOD::EventInfo_v1::setExtendedLevel1ID
void setExtendedLevel1ID(uint32_t value)
Set the extended Level-1 identifier.
xAOD::EventInfo_v1::ZeroBias
@ ZeroBias
Zero bias pileup event.
Definition: EventInfo_v1.h:271
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
xAOD::EventInfo_v1::setBeamPosSigma
void setBeamPosSigma(float x, float y, float z)
Set the size of the beam spot.
Definition: EventInfo_v1.cxx:935
xAOD::EventInfo_v1::setDetDescrTags
void setDetDescrTags(const DetDescrTags_t &value)
Set the detector description tags.
SG::VarHandleKey::empty
bool empty() const
Test if the key is blank.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:150
xAOD::EventInfo_v1::IS_SIMULATION
@ IS_SIMULATION
true: simulation, false: data
Definition: EventInfo_v1.h:151
EventID::detector_mask2
number_type detector_mask2(void) const
detector mask0 - bit field indicating which TTC zones have been built into the event,...
Definition: EventID.h:138
EventType::mc_event_weight
float mc_event_weight(unsigned int iweight=0) const
Access to MC weight.
Definition: EventType.cxx:175
SG::AuxElement::getStore
SG::IAuxStore * getStore() const
Return the current store, as a non-const interface.
Definition: AuxElement.cxx:319
EventType::mc_channel_number
number_type mc_channel_number() const
Access to the MC generator channel number (was used as run number for generator events)
Definition: EventType.cxx:165
EventID::detector_mask0
number_type detector_mask0(void) const
detector mask0 - bit field indicating which TTC zones have been built into the event,...
Definition: EventID.h:126
mergePhysValFiles.end
end
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:93
EventInfo::errorState
EventFlagErrorState errorState(EventFlagSubDet subDet) const
return error state for a particular sub-detector
Definition: EventInfo/EventInfo/EventInfo.h:274
AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:95
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:29
PileUpTimeEventIndex::MinimumBias
@ MinimumBias
Definition: PileUpTimeEventIndex.h:17
xAOD::EventInfo_v1::setBeamTiltYZ
void setBeamTiltYZ(float value)
Set the beam's tilt in radians in YZ.
xAOD::EventInfo_v1::setBeamStatus
void setBeamStatus(uint32_t value)
Set the beam spot's status word.
xAOD::EventInfo_v1::setEventFlags
bool setEventFlags(EventFlagSubDet subDet, uint32_t flags)
Set the event flags for a particular sub-detector.
Definition: EventInfo_v1.cxx:719
EventInfo::EventFlagErrorState
EventFlagErrorState
Definition: EventInfo/EventInfo/EventInfo.h:66
xAOD::EventInfo_v1::setStreamTags
void setStreamTags(const std::vector< StreamTag > &value)
Set the streams that the event was put in.
Definition: EventInfo_v1.cxx:342
PileUpEventInfo::beginSubEvt
SubEvent::iterator beginSubEvt()
Definition: PileUpEventInfo.h:131
Amg::z
@ z
Definition: GeoPrimitives.h:36
xAOD::EventInfo_v1::setLevel1TriggerType
void setLevel1TriggerType(uint16_t value)
Set the Level-1 trigger type.
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
AthCommonDataStore
Definition: AthCommonDataStore.h:52
xAOD::EventInfo_v1::setErrorState
bool setErrorState(EventFlagSubDet subDet, EventFlagErrorState state)
Set the error state for a particular sub-detector.
Definition: EventInfo_v1.cxx:825
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
xAOD::EventInfo_v1::setMCEventNumber
void setMCEventNumber(uint64_t value)
Set the MC generator's event number.
xAOD::EventInfo_v1::setEventTypeBitmask
void setEventTypeBitmask(uint32_t value)
Set the event type bitmask.
SG::Decorator
Helper class to provide type-safe access to aux data.
Definition: Decorator.h:59
PileUpTimeEventIndex::HaloGas
@ HaloGas
Definition: PileUpTimeEventIndex.h:19
lumiFormat.i
int i
Definition: lumiFormat.py:85
EventType::NameTagPairVec
std::vector< NameTagPair > NameTagPairVec
Definition: EventType.h:101
EventInfo::eventFlags
unsigned int eventFlags(EventFlagSubDet subDet) const
event flags for a particular sub-detector
Definition: EventInfo/EventInfo/EventInfo.h:254
xAOD::EventInfo_v1::setDetectorMask
void setDetectorMask(uint32_t mask0, uint32_t mask1)
Set the bit fields indicating with TTC timezones were present.
Definition: EventInfo_v1.cxx:149
xAOD::EventInfo_v1::Unknown
@ Unknown
Type not known/specified.
Definition: EventInfo_v1.h:265
PileUpTimeEventIndex::ZeroBias
@ ZeroBias
Definition: PileUpTimeEventIndex.h:21
EventType::IS_CALIBRATION
static const EventTypeCode IS_CALIBRATION
true: IS_CALIBRATION, false: IS_PHYSICS
Definition: EventType.h:157
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
Amg::x
@ x
Definition: GeoPrimitives.h:34
EventInfo::event_ID
EventID * event_ID()
the unique identification of the event.
Definition: EventInfo/EventInfo/EventInfo.h:224
xAOD::EventInfo_v1::HaloGas
@ HaloGas
Halo-gas non-collision background.
Definition: EventInfo_v1.h:269
EventID::detector_mask3
number_type detector_mask3(void) const
detector mask1 - bit field indicating which TTC zones have been built into the event,...
Definition: EventID.h:144
xAODMaker::EventInfoCnvTool::m_beamSpotKey
SG::ReadCondHandleKey< InDet::BeamSpotData > m_beamSpotKey
Definition: EventInfoCnvTool.h:62
PileUpTimeEventIndex::Signal
@ Signal
Definition: PileUpTimeEventIndex.h:16
test_pyathena.parent
parent
Definition: test_pyathena.py:15
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
CHECK
#define CHECK(...)
Evaluate an expression and check for errors.
Definition: Control/AthenaKernel/AthenaKernel/errorcheck.h:422
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
xAOD::EventInfo_v1::setStatusElement
void setStatusElement(uint32_t value)
Set the trigger status element.
xAOD::EventInfo_v1::setTimeStamp
void setTimeStamp(uint32_t value)
Set the POSIX time of the event.
xAOD::EventInfo_v1::setBCID
void setBCID(uint32_t value)
Set the bunch crossing ID of the event.
xAOD::EventInfo_v1::EventFlagErrorState
EventFlagErrorState
States that a given sub-detector could be in.
Definition: EventInfo_v1.h:346
xAOD::EventInfo_v1::setBeamPosSigmaXY
void setBeamPosSigmaXY(float value)
Set the beam spot shape's X-Y correlation.
TriggerInfo::level1TriggerType
number_type level1TriggerType() const
get level1 trigger type
Definition: TriggerInfo.cxx:138
EventType::IS_SIMULATION
static const EventTypeCode IS_SIMULATION
true: IS_SIMULATION, false: IS_DATA
Definition: EventType.h:151
AthAlgTool::AthAlgTool
AthAlgTool()
Default constructor:
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
xAOD::EventInfo_v1::setDetectorMaskExt
void setDetectorMaskExt(uint32_t mask2, uint32_t mask3)
Set the bit fields indicating with TTC timezones were present.
Definition: EventInfo_v1.cxx:170
xAOD::EventInfo_v1::EventFlagSubDet
EventFlagSubDet
Sub-detector types for which we store event-level flags.
Definition: EventInfo_v1.h:331
xAOD::EventInfo_v1::setAverageInteractionsPerCrossing
void setAverageInteractionsPerCrossing(float value)
Set average interactions per crossing for all BCIDs.
Definition: EventInfo_v1.cxx:408
SG::CondHandleKey::initialize
StatusCode initialize(bool used=true)
xAOD::bcid
setEventNumber setTimeStamp bcid
Definition: EventInfo_v1.cxx:133
REPORT_MESSAGE
#define REPORT_MESSAGE(LVL)
Report a message.
Definition: Control/AthenaKernel/AthenaKernel/errorcheck.h:365
xAOD::EventInfo_v1::setTimeStampNSOffset
void setTimeStampNSOffset(uint32_t value)
Set the nanosecond offset wrt. the time stamp.
xAOD::EventInfo_v1::setMCChannelNumber
void setMCChannelNumber(uint32_t value)
Set the MC generator's channel number.
xAOD::EventInfo_v1::Signal
@ Signal
The signal event.
Definition: EventInfo_v1.h:266
PileUpEventInfo
This class provides information about an overlaid event. It extends EventInfo with a list of sub-evts...
Definition: PileUpEventInfo.h:37
TriggerInfo::extendedLevel1ID
number_type extendedLevel1ID() const
get extended level1 ID
Definition: TriggerInfo.cxx:133
EventType::IS_TESTBEAM
static const EventTypeCode IS_TESTBEAM
true: IS_TESTBEAM, false: IS_FROM_ATLAS_DET
Definition: EventType.h:154
a
TList * a
Definition: liststreamerinfos.cxx:10
h
EventInfo::Lumi
@ Lumi
Definition: EventInfo/EventInfo/EventInfo.h:61
EventType::mc_event_number
uint64_t mc_event_number() const
Access to the MC generator event number.
Definition: EventType.cxx:170
EventType::test
bool test(EventTypeCode type_code) const
Tests for standard characteristics.
Definition: EventType.cxx:62
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
xAOD::EventInfo_v1::setRunNumber
void setRunNumber(uint32_t value)
Set the current event's run number.
PileUpEventInfo::SubEvent::const_iterator
std::list< SubEvent >::const_iterator const_iterator
Definition: PileUpEventInfo.h:97
EventInfo::trigger_info
TriggerInfo * trigger_info()
trigger information (ptr may be NULL)
Definition: EventInfo/EventInfo/EventInfo.h:244
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
xAOD::EventInfo_v1::setBeamTiltXZ
void setBeamTiltXZ(float value)
Set the beam's tilt in radians in XZ.
xAOD::EventInfo_v1::Cavern
@ Cavern
Cavern background pileup event.
Definition: EventInfo_v1.h:268
EventType::n_mc_event_weights
unsigned int n_mc_event_weights() const
Total number of MC weights.
Definition: EventType.cxx:214
SG::IConstAuxStore::lock
virtual void lock()=0
Lock the container.
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:623
EventInfo::EventFlagSubDet
EventFlagSubDet
Definition: EventInfo/EventInfo/EventInfo.h:60
xAODMaker::EventInfoCnvTool::m_lumiDataKey
SG::ReadCondHandleKey< LuminosityCondData > m_lumiDataKey
Definition: EventInfoCnvTool.h:71
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
xAODMaker::EventInfoCnvTool::m_disableBeamSpot
Gaudi::Property< bool > m_disableBeamSpot
Definition: EventInfoCnvTool.h:63
PileUpTimeEventIndex::HighPtMinimumBias
@ HighPtMinimumBias
Definition: PileUpTimeEventIndex.h:20
xAOD::EventInfo_v1::setLumiBlock
void setLumiBlock(uint32_t value)
Set the current event's luminosity block number.
SG::AllowEmpty
@ AllowEmpty
Definition: StoreGate/StoreGate/VarHandleKey.h:30
TriggerInfo::statusElement
number_type statusElement() const
get status element
Definition: TriggerInfo.cxx:128
xAOD::EventInfo_v1::IS_TESTBEAM
@ IS_TESTBEAM
true: testbeam, false: full detector
Definition: EventInfo_v1.h:153
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
EventInfo::event_type
EventType * event_type()
the type of the event, e.g. simulation, testbeam, etc
Definition: EventInfo/EventInfo/EventInfo.h:234
PileUpEventInfo::endSubEvt
SubEvent::iterator endSubEvt()
Definition: PileUpEventInfo.h:132
EventID::detector_mask1
number_type detector_mask1(void) const
detector mask1 - bit field indicating which TTC zones have been built into the event,...
Definition: EventID.h:132
PileUpTimeEventIndex::Unknown
@ Unknown
Definition: PileUpTimeEventIndex.h:15
fitman.k
k
Definition: fitman.py:528
xAOD::EventInfo_v1::eventType
bool eventType(EventType type) const
Check for one particular bitmask value.
EventInfo::actualInteractionsPerCrossing
float actualInteractionsPerCrossing() const
Access to number of interactions per crossing:
Definition: EventInfo/EventInfo/EventInfo.h:283