ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
xAOD::EventInfo_v1::SubEvent Class Reference

Class describing the properties of one pileup sub-event. More...

#include <EventInfo_v1.h>

Collaboration diagram for xAOD::EventInfo_v1::SubEvent:

Public Member Functions

 SubEvent (int16_t time, uint16_t index, PileUpType type, const ElementLink< EventInfoContainer_v1 > &link)
 Constructor giving all relevant information to the object. More...
 
int16_t time () const
 Get the time wrt. the signal event (which has time() == 0) More...
 
uint16_t index () const
 Get the index of the sub-event. More...
 
PileUpType type () const
 Get the type of the pileup event. More...
 
const std::string & typeName () const
 The string name of the type. More...
 
const ElementLink< EventInfoContainer_v1 > & link () const
 Get a link to the EventInfo object describing the pileup event. More...
 
const EventInfo_v1ptr () const
 Get a pointer to the EventInfo object describing the pileup event. More...
 

Private Attributes

int16_t m_time
 The time wrt. the signal event. More...
 
uint16_t m_index
 The index of the pileup event. More...
 
PileUpType m_type
 The type of the pileup event. More...
 
ElementLink< EventInfoContainer_v1m_link
 Link to the EventInfo object in question. More...
 

Detailed Description

Class describing the properties of one pileup sub-event.

This class mirrors the setup of PileUpEventInfo::SubEvent. But uses a bit simpler structure on its inside.

Definition at line 286 of file EventInfo_v1.h.

Constructor & Destructor Documentation

◆ SubEvent()

xAOD::EventInfo_v1::SubEvent::SubEvent ( int16_t  time,
uint16_t  index,
PileUpType  type,
const ElementLink< EventInfoContainer_v1 > &  link 
)

Constructor giving all relevant information to the object.

Definition at line 443 of file EventInfo_v1.cxx.

446  : m_time( time ), m_index( index ), m_type( type ), m_link( link ) {
447 
448  }

Member Function Documentation

◆ index()

uint16_t xAOD::EventInfo_v1::SubEvent::index ( ) const

Get the index of the sub-event.

Definition at line 455 of file EventInfo_v1.cxx.

455  {
456 
457  return m_index;
458  }

◆ link()

const ElementLink< EventInfoContainer_v1 > & xAOD::EventInfo_v1::SubEvent::link ( ) const

Get a link to the EventInfo object describing the pileup event.

Definition at line 496 of file EventInfo_v1.cxx.

496  {
497 
498  return m_link;
499  }

◆ ptr()

const EventInfo_v1 * xAOD::EventInfo_v1::SubEvent::ptr ( ) const

Get a pointer to the EventInfo object describing the pileup event.

Definition at line 501 of file EventInfo_v1.cxx.

501  {
502 
503  if( m_link.isValid() ) {
504  return *m_link;
505  } else {
506  return nullptr;
507  }
508  }

◆ time()

int16_t xAOD::EventInfo_v1::SubEvent::time ( ) const

Get the time wrt. the signal event (which has time() == 0)

Definition at line 450 of file EventInfo_v1.cxx.

450  {
451 
452  return m_time;
453  }

◆ type()

EventInfo_v1::PileUpType xAOD::EventInfo_v1::SubEvent::type ( ) const

Get the type of the pileup event.

Definition at line 460 of file EventInfo_v1.cxx.

460  {
461 
462  return m_type;
463  }

◆ typeName()

const std::string & xAOD::EventInfo_v1::SubEvent::typeName ( ) const

The string name of the type.

Definition at line 465 of file EventInfo_v1.cxx.

465  {
466 
467  // This is a really inefficienct implementation, but didn't
468  // feel like writing a short and efficient implementation for C++11,
469  // and a longer but still efficient version for C++03. This is a
470  // medium-sized, slow implementation that works everywhere... :-P
471  if( m_type == Signal ) {
472  static const std::string name = "Signal";
473  return name;
474  } else if( m_type == MinimumBias ) {
475  static const std::string name = "MinimumBias";
476  return name;
477  } else if( m_type == Cavern ) {
478  static const std::string name = "Cavern";
479  return name;
480  } else if( m_type == HaloGas ) {
481  static const std::string name = "HaloGas";
482  return name;
483  } else if( m_type == HighPtMinimumBias ) {
484  static const std::string name = "HighPtMinimumBias";
485  return name;
486  } else if( m_type == ZeroBias ) {
487  static const std::string name = "ZeroBias";
488  return name;
489  } else {
490  static const std::string name = "Unknown";
491  return name;
492  }
493  }

Member Data Documentation

◆ m_index

uint16_t xAOD::EventInfo_v1::SubEvent::m_index
private

The index of the pileup event.

Definition at line 309 of file EventInfo_v1.h.

◆ m_link

ElementLink< EventInfoContainer_v1 > xAOD::EventInfo_v1::SubEvent::m_link
private

Link to the EventInfo object in question.

Definition at line 312 of file EventInfo_v1.h.

◆ m_time

int16_t xAOD::EventInfo_v1::SubEvent::m_time
private

The time wrt. the signal event.

Definition at line 308 of file EventInfo_v1.h.

◆ m_type

PileUpType xAOD::EventInfo_v1::SubEvent::m_type
private

The type of the pileup event.

Definition at line 310 of file EventInfo_v1.h.


The documentation for this class was generated from the following files:
xAOD::name
name
Definition: TriggerMenuJson_v1.cxx:29
index
Definition: index.py:1
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::SubEvent::link
const ElementLink< EventInfoContainer_v1 > & link() const
Get a link to the EventInfo object describing the pileup event.
Definition: EventInfo_v1.cxx:496
xAOD::EventInfo_v1::ZeroBias
@ ZeroBias
Zero bias pileup event.
Definition: EventInfo_v1.h:271
xAOD::EventInfo_v1::SubEvent::m_type
PileUpType m_type
The type of the pileup event.
Definition: EventInfo_v1.h:310
xAOD::EventInfo_v1::SubEvent::time
int16_t time() const
Get the time wrt. the signal event (which has time() == 0)
Definition: EventInfo_v1.cxx:450
xAOD::EventInfo_v1::HaloGas
@ HaloGas
Halo-gas non-collision background.
Definition: EventInfo_v1.h:269
xAOD::EventInfo_v1::SubEvent::m_link
ElementLink< EventInfoContainer_v1 > m_link
Link to the EventInfo object in question.
Definition: EventInfo_v1.h:312
xAOD::EventInfo_v1::SubEvent::m_index
uint16_t m_index
The index of the pileup event.
Definition: EventInfo_v1.h:309
xAOD::EventInfo_v1::Signal
@ Signal
The signal event.
Definition: EventInfo_v1.h:266
xAOD::EventInfo_v1::SubEvent::type
PileUpType type() const
Get the type of the pileup event.
Definition: EventInfo_v1.cxx:460
xAOD::EventInfo_v1::Cavern
@ Cavern
Cavern background pileup event.
Definition: EventInfo_v1.h:268
xAOD::EventInfo_v1::SubEvent::m_time
int16_t m_time
The time wrt. the signal event.
Definition: EventInfo_v1.h:308