ATLAS Offline Software
Classes | Private Types | List of all members
PileUpEventInfo Class Reference

This class provides information about an overlaid event. It extends EventInfo with a list of sub-evts (the original and the bkg ones) More...

#include <PileUpEventInfo.h>

Inheritance diagram for PileUpEventInfo:
Collaboration diagram for PileUpEventInfo:

Classes

class  SubEvent
 a triple allowing access to a sub-event More...
 

Public Types

enum for event flags which indicate the subsystem

detector to which the flags belong

enum  EventFlagSubDet {
  Pixel, SCT, TRT, LAr,
  Tile, Muon, ForwardDet, Core,
  Background, Lumi, nDets
}
 
enum for event errors states
enum  EventFlagErrorState { NotSet, Warning, Error }
 
enum for bits in Background EventFlag word
enum  BackgroundEventFlag {
  MBTSTimeDiffHalo, MBTSTimeDiffCol, LArECTimeDiffHalo, LArECTimeDiffCol,
  PixMultiplicityHuge, PixSPNonEmpty, SCTMultiplicityHuge, SCTSPNonEmpty,
  CSCTimeDiffHalo, CSCTimeDiffCol, BCMTimeDiffHalo, BCMTimeDiffCol,
  MuonTimingCol, MuonTimingCosmic, MBTSBeamVeto, BCMBeamVeto,
  LUCIDBeamVeto, HaloMuonSegment, HaloClusterShape, HaloMuonOneSided,
  HaloMuonTwoSided, HaloTileClusterPattern, BeamGasPixel, CosmicStandAlone,
  CosmicStandAloneTight, CosmicCombined, CosmicCombinedTight, BkgdResvBit1,
  BkgdResvBit2, BkgdResvBit3, BkgdResvBit4, BkgdResvBit5,
  NBackgroundWords
}
 
enum for event flags which indicate the subsystem

detector to which the flags belong

enum  EventFlagSubDet {
  Pixel, SCT, TRT, LAr,
  Tile, Muon, ForwardDet, Core,
  Background, Lumi, nDets
}
 
enum for event errors states
enum  EventFlagErrorState { NotSet, Warning, Error }
 
enum for bits in Background EventFlag word
enum  BackgroundEventFlag {
  MBTSTimeDiffHalo, MBTSTimeDiffCol, LArECTimeDiffHalo, LArECTimeDiffCol,
  PixMultiplicityHuge, PixSPNonEmpty, SCTMultiplicityHuge, SCTSPNonEmpty,
  CSCTimeDiffHalo, CSCTimeDiffCol, BCMTimeDiffHalo, BCMTimeDiffCol,
  MuonTimingCol, MuonTimingCosmic, MBTSBeamVeto, BCMBeamVeto,
  LUCIDBeamVeto, HaloMuonSegment, HaloClusterShape, HaloMuonOneSided,
  HaloMuonTwoSided, HaloTileClusterPattern, BeamGasPixel, CosmicStandAlone,
  CosmicStandAloneTight, CosmicCombined, CosmicCombinedTight, BkgdResvBit1,
  BkgdResvBit2, BkgdResvBit3, BkgdResvBit4, BkgdResvBit5,
  NBackgroundWords
}
 
enum for event flags which indicate the subsystem

detector to which the flags belong

enum  EventFlagSubDet {
  Pixel, SCT, TRT, LAr,
  Tile, Muon, ForwardDet, Core,
  Background, Lumi, nDets
}
 
enum for event errors states
enum  EventFlagErrorState { NotSet, Warning, Error }
 
enum for bits in Background EventFlag word
enum  BackgroundEventFlag {
  MBTSTimeDiffHalo, MBTSTimeDiffCol, LArECTimeDiffHalo, LArECTimeDiffCol,
  PixMultiplicityHuge, PixSPNonEmpty, SCTMultiplicityHuge, SCTSPNonEmpty,
  CSCTimeDiffHalo, CSCTimeDiffCol, BCMTimeDiffHalo, BCMTimeDiffCol,
  MuonTimingCol, MuonTimingCosmic, MBTSBeamVeto, BCMBeamVeto,
  LUCIDBeamVeto, HaloMuonSegment, HaloClusterShape, HaloMuonOneSided,
  HaloMuonTwoSided, HaloTileClusterPattern, BeamGasPixel, CosmicStandAlone,
  CosmicStandAloneTight, CosmicCombined, CosmicCombinedTight, BkgdResvBit1,
  BkgdResvBit2, BkgdResvBit3, BkgdResvBit4, BkgdResvBit5,
  NBackgroundWords
}
 

Public Member Functions

Event information accessors
EventIDevent_ID ()
 the unique identification of the event. More...
 
const EventIDevent_ID () const
 
EventTypeevent_type ()
 the type of the event, e.g. simulation, testbeam, etc More...
 
const EventTypeevent_type () const
 
TriggerInfotrigger_info ()
 trigger information (ptr may be NULL) More...
 
const TriggerInfotrigger_info () const
 
unsigned int eventFlags (EventFlagSubDet subDet) const
 event flags for a particular sub-detector More...
 
bool isEventFlagBitSet (EventFlagSubDet subDet, unsigned char bit) const
 check for a event flag bit for a particular sub-detector More...
 
const std::vector< unsigned int > & eventFlags () const
 All event flags. More...
 
EventFlagErrorState errorState (EventFlagSubDet subDet) const
 return error state for a particular sub-detector More...
 
bool setEventFlags (EventFlagSubDet subDet, unsigned int flags)
 Set event flag for a particular sub detector - maximun size is 28 bits. More...
 
bool setEventFlagBit (EventFlagSubDet subDet, unsigned char bit, bool set=true)
 Set a bit for an event flag of a particular sub detector. More...
 
bool setErrorState (EventFlagSubDet subDet, EventFlagErrorState errorState)
 Set error state flag for a particular sub detector. More...
 
float actualInteractionsPerCrossing () const
 Access to number of interactions per crossing: More...
 
float averageInteractionsPerCrossing () const
 average interactions per crossing for all BCIDs - for out-of-time pile-up More...
 
Event information accessors
EventIDevent_ID ()
 the unique identification of the event. More...
 
EventTypeevent_type ()
 the type of the event, e.g. simulation, testbeam, etc More...
 
const EventTypeevent_type () const
 
TriggerInfotrigger_info ()
 trigger information (ptr may be NULL) More...
 
const TriggerInfotrigger_info () const
 
unsigned int eventFlags (EventFlagSubDet subDet) const
 event flags for a particular sub-detector More...
 
const std::vector< unsigned int > & eventFlags () const
 All event flags. More...
 
bool isEventFlagBitSet (EventFlagSubDet subDet, unsigned char bit) const
 check for a event flag bit for a particular sub-detector More...
 
EventFlagErrorState errorState (EventFlagSubDet subDet) const
 return error state for a particular sub-detector More...
 
bool setEventFlags (EventFlagSubDet subDet, unsigned int flags)
 Set event flag for a particular sub detector - maximun size is 28 bits. More...
 
bool setEventFlagBit (EventFlagSubDet subDet, unsigned char bit, bool set=true)
 Set a bit for an event flag of a particular sub detector. More...
 
bool setErrorState (EventFlagSubDet subDet, EventFlagErrorState errorState)
 Set error state flag for a particular sub detector. More...
 
float actualInteractionsPerCrossing () const
 Access to number of interactions per crossing: More...
 
float averageInteractionsPerCrossing () const
 average interactions per crossing for all BCIDs - for out-of-time pile-up More...
 
Event information accessors
EventIDevent_ID ()
 the unique identification of the event. More...
 
const EventIDevent_ID () const
 
EventTypeevent_type ()
 the type of the event, e.g. simulation, testbeam, etc More...
 
const EventTypeevent_type () const
 
TriggerInfotrigger_info ()
 trigger information (ptr may be NULL) More...
 
const TriggerInfotrigger_info () const
 
unsigned int eventFlags (EventFlagSubDet subDet) const
 event flags for a particular sub-detector More...
 
const std::vector< unsigned int > & eventFlags () const
 All event flags. More...
 
bool isEventFlagBitSet (EventFlagSubDet subDet, unsigned char bit) const
 check for a event flag bit for a particular sub-detector More...
 
EventFlagErrorState errorState (EventFlagSubDet subDet) const
 return error state for a particular sub-detector More...
 
bool setEventFlags (EventFlagSubDet subDet, unsigned int flags)
 Set event flag for a particular sub detector - maximun size is 28 bits. More...
 
bool setEventFlagBit (EventFlagSubDet subDet, unsigned char bit, bool set=true)
 Set a bit for an event flag of a particular sub detector. More...
 
bool setErrorState (EventFlagSubDet subDet, EventFlagErrorState errorState)
 Set error state flag for a particular sub detector. More...
 
float actualInteractionsPerCrossing () const
 Access to number of interactions per crossing: More...
 
float averageInteractionsPerCrossing () const
 average interactions per crossing for all BCIDs - for out-of-time pile-up More...
 

Private Types

template<class T >
using owner = T
 

DataObject-like clid accessors

const CLIDclID () const
 
static const CLIDclassID ()
 

Event information setting

std::unique_ptr< EventIDm_event_ID
 
std::unique_ptr< EventTypem_event_type
 
std::unique_ptr< TriggerInfom_trigger_info
 
std::vector< unsigned int > m_event_flags {std::vector<unsigned int>(nDets, 0)}
 
void setTriggerInfo (owner< TriggerInfo * > pTrig)
 Add TriggerInfo to existing object. More...
 
void setTriggerInfo (std::unique_ptr< TriggerInfo > pTrig)
 
void setActualInteractionsPerCrossing (float interactions)
 Setting the number of interactions per crossing: More...
 
void setAverageInteractionsPerCrossing (float interactions)
 average interactions per crossing for all BCIDs - for out-of-time pile-up More...
 
enum  {
  EF_BITS = 0x0FFFFFFF, EF_ERROR_BITS = 0xF0000000, EF_ERROR_SHIFT = 28, ACTUAL_INTERACTS_BITS = 0x0000FFFF,
  AVE_INTERACTS_BITS = 0xFFFF0000, AVE_INTERACTS_SHIFT = 16
}
 
void setEventID (owner< EventID * > pid)
 
void setEventID (std::unique_ptr< EventID > pid)
 
void setEventType (owner< EventType * >)
 
void setEventType (std::unique_ptr< EventType > pType)
 

structors (same as EventInfo)

typedef SubEvent::time_type time_type
 
typedef SubEvent::index_type index_type
 
 PileUpEventInfo ()
 
 PileUpEventInfo (EventID *id, EventType *type)
 
 PileUpEventInfo (EventID *id, EventType *type, TriggerInfo *trig_info)
 
virtual ~PileUpEventInfo ()
 
void addSubEvt (time_type t, PileUpTimeEventIndex::PileUpType puType, const EventInfo *pse, StoreGateSvc *psg)
 setter for the subEvt collection t=0(ns) for the original event More...
 
void addSubEvt (time_type t, PileUpTimeEventIndex::PileUpType puType, std::unique_ptr< EventInfo > pse, StoreGateSvc *psg)
 
void addSubEvt (time_type t, unsigned int BCID, PileUpTimeEventIndex::PileUpType puType, const EventInfo &rse, StoreGateSvc *psg)
 setter for the subEvt collection t=0(ns) for the original event More...
 
void addSubEvt (time_type t, unsigned int BCID, PileUpTimeEventIndex::PileUpType puType, std::unique_ptr< EventInfo > &pse, StoreGateSvc *psg)
 

accessors to the subEvt collection

std::list< SubEventm_subEvents
 
SubEvent::iterator beginSubEvt ()
 
SubEvent::iterator endSubEvt ()
 
SubEvent::const_iterator beginSubEvt () const
 
SubEvent::const_iterator endSubEvt () const
 

Detailed Description

This class provides information about an overlaid event. It extends EventInfo with a list of sub-evts (the original and the bkg ones)

Definition at line 37 of file PileUpEventInfo.h.

Member Typedef Documentation

◆ index_type

typedef SubEvent::index_type PileUpEventInfo::index_type

Definition at line 102 of file PileUpEventInfo.h.

◆ owner

template<class T >
using EventInfo::owner = T
privateinherited

Definition at line 54 of file EventInfo/EventInfo/EventInfo.h.

◆ time_type

typedef SubEvent::time_type PileUpEventInfo::time_type

Definition at line 101 of file PileUpEventInfo.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
privateinherited
Enumerator
EF_BITS 
EF_ERROR_BITS 
EF_ERROR_SHIFT 
ACTUAL_INTERACTS_BITS 
AVE_INTERACTS_BITS 
AVE_INTERACTS_SHIFT 

Definition at line 207 of file EventInfo/EventInfo/EventInfo.h.

207  {
208  EF_BITS = 0x0FFFFFFF,
209  EF_ERROR_BITS = 0xF0000000,
210  EF_ERROR_SHIFT = 28,
211  ACTUAL_INTERACTS_BITS = 0x0000FFFF,
212  AVE_INTERACTS_BITS = 0xFFFF0000,
214  };

◆ BackgroundEventFlag

Enumerator
MBTSTimeDiffHalo 
MBTSTimeDiffCol 
LArECTimeDiffHalo 
LArECTimeDiffCol 
PixMultiplicityHuge 
PixSPNonEmpty 
SCTMultiplicityHuge 
SCTSPNonEmpty 
CSCTimeDiffHalo 
CSCTimeDiffCol 
BCMTimeDiffHalo 
BCMTimeDiffCol 
MuonTimingCol 
MuonTimingCosmic 
MBTSBeamVeto 
BCMBeamVeto 
LUCIDBeamVeto 
HaloMuonSegment 
HaloClusterShape 
HaloMuonOneSided 
HaloMuonTwoSided 
HaloTileClusterPattern 
BeamGasPixel 
CosmicStandAlone 
CosmicStandAloneTight 
CosmicCombined 
CosmicCombinedTight 
BkgdResvBit1 
BkgdResvBit2 
BkgdResvBit3 
BkgdResvBit4 
BkgdResvBit5 
NBackgroundWords 

Definition at line 76 of file EventInfo/EventInfo/EventInfo.h.

◆ EventFlagErrorState

Enumerator
NotSet 
Warning 
Error 

Definition at line 66 of file EventInfo/EventInfo/EventInfo.h.

66  {
68  };

◆ EventFlagSubDet

Enumerator
Pixel 
SCT 
TRT 
LAr 
Tile 
Muon 
ForwardDet 
Core 
Background 
Lumi 
nDets 

Definition at line 60 of file EventInfo/EventInfo/EventInfo.h.

60  {
62  };

Constructor & Destructor Documentation

◆ PileUpEventInfo() [1/3]

PileUpEventInfo::PileUpEventInfo ( )

Definition at line 18 of file PileUpEventInfo.cxx.

18  :
19  EventInfo()
20 {}

◆ PileUpEventInfo() [2/3]

PileUpEventInfo::PileUpEventInfo ( EventID id,
EventType type 
)

Definition at line 22 of file PileUpEventInfo.cxx.

22  :
23  EventInfo(id, type)
24 {}

◆ PileUpEventInfo() [3/3]

PileUpEventInfo::PileUpEventInfo ( EventID id,
EventType type,
TriggerInfo trig_info 
)

Definition at line 26 of file PileUpEventInfo.cxx.

27  :
28  EventInfo(id, type, trig_info)
29 {}

◆ ~PileUpEventInfo()

PileUpEventInfo::~PileUpEventInfo ( )
virtual

Definition at line 31 of file PileUpEventInfo.cxx.

32 {}

Member Function Documentation

◆ actualInteractionsPerCrossing()

float EventInfo::actualInteractionsPerCrossing ( ) const
inlineinherited

Access to number of interactions per crossing:

actual interactions per crossing for the current BCID - for in-time pile-up

average interactions per crossing for the current (or actual) BCID - for in-time pile-up

Definition at line 283 of file EventInfo/EventInfo/EventInfo.h.

283  {
284  float result = -999.99f;
285 
286  if (Lumi < m_event_flags.size()) {
287  unsigned int interactions = m_event_flags[Lumi];
288  result = (float) (interactions & ACTUAL_INTERACTS_BITS);
289  result *= 0.01;
290  }
291  return result;
292 }

◆ addSubEvt() [1/4]

void PileUpEventInfo::addSubEvt ( time_type  t,
PileUpTimeEventIndex::PileUpType  puType,
const EventInfo pse,
StoreGateSvc psg 
)
inline

setter for the subEvt collection t=0(ns) for the original event

Definition at line 104 of file PileUpEventInfo.h.

105  {
106  m_subEvents.emplace_back(t, m_subEvents.size(), puType, pse, psg);
107  }

◆ addSubEvt() [2/4]

void PileUpEventInfo::addSubEvt ( time_type  t,
PileUpTimeEventIndex::PileUpType  puType,
std::unique_ptr< EventInfo pse,
StoreGateSvc psg 
)
inline

Definition at line 109 of file PileUpEventInfo.h.

110  {
111  m_subEvents.emplace_back(t, m_subEvents.size(), puType, std::move(pse), psg);
112  }

◆ addSubEvt() [3/4]

void PileUpEventInfo::addSubEvt ( time_type  t,
unsigned int  BCID,
PileUpTimeEventIndex::PileUpType  puType,
const EventInfo rse,
StoreGateSvc psg 
)
inline

setter for the subEvt collection t=0(ns) for the original event

Definition at line 115 of file PileUpEventInfo.h.

117  {
118  m_subEvents.emplace_back(t, BCID, m_subEvents.size(), puType, rse, psg);
119  }

◆ addSubEvt() [4/4]

void PileUpEventInfo::addSubEvt ( time_type  t,
unsigned int  BCID,
PileUpTimeEventIndex::PileUpType  puType,
std::unique_ptr< EventInfo > &  pse,
StoreGateSvc psg 
)
inline

Definition at line 121 of file PileUpEventInfo.h.

123  {
124  m_subEvents.emplace_back(t, BCID, m_subEvents.size(), puType, std::move(pse), psg);
125  }

◆ averageInteractionsPerCrossing()

float EventInfo::averageInteractionsPerCrossing ( ) const
inlineinherited

average interactions per crossing for all BCIDs - for out-of-time pile-up

Definition at line 296 of file EventInfo/EventInfo/EventInfo.h.

296  {
297  float result = -999.99f;
298 
299  if (Lumi < m_event_flags.size()) {
300  unsigned int interactions = m_event_flags[Lumi];
301  result = (float) ((interactions & AVE_INTERACTS_BITS) >> AVE_INTERACTS_SHIFT);
302  result *= 0.01;
303  }
304  return result;
305 }

◆ beginSubEvt() [1/2]

SubEvent::iterator PileUpEventInfo::beginSubEvt ( )
inline

Definition at line 131 of file PileUpEventInfo.h.

131 {return m_subEvents.begin();}

◆ beginSubEvt() [2/2]

SubEvent::const_iterator PileUpEventInfo::beginSubEvt ( ) const
inline

Definition at line 133 of file PileUpEventInfo.h.

133 {return m_subEvents.begin();}

◆ classID()

const CLID & EventInfo::classID ( )
inlinestaticinherited

Definition at line 316 of file EventInfo/EventInfo/EventInfo.h.

316  {
318 }

◆ clID()

const CLID & EventInfo::clID ( ) const
inlineinherited

Definition at line 308 of file EventInfo/EventInfo/EventInfo.h.

308  {
309  return classID();
310 }

◆ endSubEvt() [1/2]

SubEvent::iterator PileUpEventInfo::endSubEvt ( )
inline

Definition at line 132 of file PileUpEventInfo.h.

132 {return m_subEvents.end();}

◆ endSubEvt() [2/2]

SubEvent::const_iterator PileUpEventInfo::endSubEvt ( ) const
inline

Definition at line 134 of file PileUpEventInfo.h.

134 {return m_subEvents.end();}

◆ errorState()

EventInfo::EventFlagErrorState EventInfo::errorState ( EventFlagSubDet  subDet) const
inlineinherited

return error state for a particular sub-detector

test for error state for a particular sub-detector

Definition at line 274 of file EventInfo/EventInfo/EventInfo.h.

274  {
275  if ((unsigned) subDet < m_event_flags.size()) {
277  }
278  return NotSet;
279 }

◆ event_ID() [1/2]

EventID * EventInfo::event_ID ( )
inlineinherited

the unique identification of the event.

Definition at line 224 of file EventInfo/EventInfo/EventInfo.h.

224  {
225  return m_event_ID.get();
226 }

◆ event_ID() [2/2]

const EventID * EventInfo::event_ID ( ) const
inlineinherited

Definition at line 229 of file EventInfo/EventInfo/EventInfo.h.

229  {
230  return m_event_ID.get();
231 }

◆ event_type() [1/2]

EventType * EventInfo::event_type ( )
inlineinherited

the type of the event, e.g. simulation, testbeam, etc

Definition at line 234 of file EventInfo/EventInfo/EventInfo.h.

234  {
235  return m_event_type.get();
236 }

◆ event_type() [2/2]

const EventType * EventInfo::event_type ( ) const
inlineinherited

Definition at line 239 of file EventInfo/EventInfo/EventInfo.h.

239  {
240  return m_event_type.get();
241 }

◆ eventFlags() [1/2]

const std::vector< unsigned int > & EventInfo::eventFlags ( ) const
inlineinherited

All event flags.

Definition at line 268 of file EventInfo/EventInfo/EventInfo.h.

268  {
269  return m_event_flags;
270 }

◆ eventFlags() [2/2]

unsigned int EventInfo::eventFlags ( EventFlagSubDet  subDet) const
inlineinherited

event flags for a particular sub-detector

Definition at line 254 of file EventInfo/EventInfo/EventInfo.h.

254  {
255  if ((unsigned) subDet < m_event_flags.size()) return(EF_BITS & m_event_flags[subDet]);
256 
257  return(0xFFFFFFFF);
258 }

◆ isEventFlagBitSet()

bool EventInfo::isEventFlagBitSet ( EventFlagSubDet  subDet,
unsigned char  bit 
) const
inlineinherited

check for a event flag bit for a particular sub-detector

Definition at line 261 of file EventInfo/EventInfo/EventInfo.h.

261  {
262  if (subDet < m_event_flags.size() && bit < EF_ERROR_SHIFT) return((1u << bit) & m_event_flags[subDet]);
263 
264  return(false);
265 }

◆ setActualInteractionsPerCrossing()

void EventInfo::setActualInteractionsPerCrossing ( float  interactions)
inherited

Setting the number of interactions per crossing:

actual interactions per crossing for the current BCID - for in-time pile-up

Definition at line 156 of file EventInfo.cxx.

156  {
157  // pack interaction into 16 bits saving the precision to the 0.01
158  // level
159  unsigned int ivalue = (unsigned int) (interactions * 100.f);
160 
161  if (ivalue > ACTUAL_INTERACTS_BITS) {
162  std::cout <<
163  "EventInfo::setActualInteractionsPerCrossing *** ERROR ***: trying to store too large of value: interactions/ivalue/max value: "
164  << interactions << " " << ivalue << " " << ACTUAL_INTERACTS_BITS << std::endl;
165  }
166  ivalue &= ACTUAL_INTERACTS_BITS;
167  // If event_flags has been cleared on input, reset size AND INCLUDE lumi
168  if (m_event_flags.size() < nDets) m_event_flags.resize(nDets, 0);
169  m_event_flags[Lumi] |= ivalue; // store lower 16 bits
170 }

◆ setAverageInteractionsPerCrossing()

void EventInfo::setAverageInteractionsPerCrossing ( float  interactions)
inherited

average interactions per crossing for all BCIDs - for out-of-time pile-up

Definition at line 173 of file EventInfo.cxx.

173  {
174  // pack interaction into 16 bits saving the precision to the 0.01
175  // level
176  unsigned int ivalue = (unsigned int) (interactions * 100.f);
177 
178  if (ivalue > ACTUAL_INTERACTS_BITS) {
179  std::cout <<
180  "EventInfo::setAverageInteractionsPerCrossing *** ERROR ***: trying to store too large of value: interactions/ivalue/max value: "
181  << interactions << " " << ivalue << " " << ACTUAL_INTERACTS_BITS << std::endl;
182  }
183  ivalue = (ivalue << AVE_INTERACTS_SHIFT) & AVE_INTERACTS_BITS;
184  // If event_flags has been cleared on input, reset size AND INCLUDE lumi
185  if (m_event_flags.size() < nDets) m_event_flags.resize(nDets, 0);
186  m_event_flags[Lumi] |= ivalue; // store upper 16 bits
187 }

◆ setErrorState()

bool EventInfo::setErrorState ( EventFlagSubDet  subDet,
EventFlagErrorState  errorState 
)
inherited

Set error state flag for a particular sub detector.

Returns true is successfully inserted (i.e. valid subDet).

Definition at line 139 of file EventInfo.cxx.

139  {
140  // If event_flags has been cleared on input, reset size to just
141  // before lumi
142  if (m_event_flags.size() < (unsigned int) Lumi) m_event_flags.resize(Lumi, 0);
143  // check that subdet index is in range and that we have a valid error state
144  if ((unsigned) subDet < m_event_flags.size() &&
145  (errorState == NotSet || errorState == Warning || errorState == Error)) {
146  // Combine potentially-existing flags with new error states
147  m_event_flags[subDet] =
148  (unsigned int) ((EF_BITS & m_event_flags[subDet]) | ((unsigned int) errorState << EF_ERROR_SHIFT));
149  return(true);
150  }
151  return(false);
152 }

◆ setEventFlagBit()

bool EventInfo::setEventFlagBit ( EventFlagSubDet  subDet,
unsigned char  bit,
bool  set = true 
)
inherited

Set a bit for an event flag of a particular sub detector.

bit range is 0 - 27. Returns true is successfully inserted (i.e. valid subDet and bit value). Use 'set = false' to unset the bit, default it true.

Definition at line 120 of file EventInfo.cxx.

120  {
121  // If event_flags has been cleared on input, reset size to just
122  // before lumi
123  if (m_event_flags.size() < (unsigned int) Lumi) m_event_flags.resize(Lumi, 0);
124  if ((unsigned) subDet < m_event_flags.size() && bit < EF_ERROR_SHIFT) {
125  if (set) {
126  m_event_flags[subDet] = (EF_ERROR_BITS & m_event_flags[subDet]) |
127  ((1u << bit) | m_event_flags[subDet]);
128  } else {
129  unsigned int mask = EF_BITS ^ (1u << bit);
130  m_event_flags[subDet] = (EF_ERROR_BITS & m_event_flags[subDet]) |
131  (mask & m_event_flags[subDet]);
132  }
133  return(true);
134  }
135  return(false);
136 }

◆ setEventFlags()

bool EventInfo::setEventFlags ( EventFlagSubDet  subDet,
unsigned int  flags 
)
inherited

Set event flag for a particular sub detector - maximun size is 28 bits.

The bits beyond this will be ignored. Returns true is successfully inserted (i.e. valid subDet).

Definition at line 107 of file EventInfo.cxx.

107  {
108  // If event_flags has been cleared on input, reset size to just
109  // before lumi
110  if (m_event_flags.size() < (unsigned int) Lumi) m_event_flags.resize(Lumi, 0);
111  if ((unsigned) subDet < m_event_flags.size()) {
112  // Combine potentially-existing error states with new flags
113  m_event_flags[subDet] = (EF_ERROR_BITS & m_event_flags[subDet]) | (EF_BITS & flags);
114  return(true);
115  }
116  return(false);
117 }

◆ setEventID() [1/2]

void EventInfo::setEventID ( owner< EventID * >  pid)
protectedinherited

Definition at line 82 of file EventInfo.cxx.

82  {
83  m_event_ID.reset(pid);
84 }

◆ setEventID() [2/2]

void EventInfo::setEventID ( std::unique_ptr< EventID pid)
protectedinherited

Definition at line 86 of file EventInfo.cxx.

86  {
87  m_event_ID = std::move(pid);
88 }

◆ setEventType() [1/2]

void EventInfo::setEventType ( owner< EventType * >  pType)
protectedinherited

Definition at line 90 of file EventInfo.cxx.

90  {
91  m_event_type.reset(pType);
92 }

◆ setEventType() [2/2]

void EventInfo::setEventType ( std::unique_ptr< EventType pType)
protectedinherited

Definition at line 94 of file EventInfo.cxx.

94  {
95  m_event_type = std::move(pType);
96 }

◆ setTriggerInfo() [1/2]

void EventInfo::setTriggerInfo ( owner< TriggerInfo * >  pTrig)
inherited

Add TriggerInfo to existing object.

Definition at line 98 of file EventInfo.cxx.

98  {
99  m_trigger_info.reset(pTrig);
100 }

◆ setTriggerInfo() [2/2]

void EventInfo::setTriggerInfo ( std::unique_ptr< TriggerInfo pTrig)
inherited

Definition at line 102 of file EventInfo.cxx.

102  {
103  m_trigger_info = std::move(pTrig);
104 }

◆ trigger_info() [1/2]

TriggerInfo * EventInfo::trigger_info ( )
inlineinherited

trigger information (ptr may be NULL)

Definition at line 244 of file EventInfo/EventInfo/EventInfo.h.

244  {
245  return m_trigger_info.get();
246 }

◆ trigger_info() [2/2]

const TriggerInfo * EventInfo::trigger_info ( ) const
inlineinherited

Definition at line 249 of file EventInfo/EventInfo/EventInfo.h.

249  {
250  return m_trigger_info.get();
251 }

Member Data Documentation

◆ m_event_flags

std::vector<unsigned int> EventInfo::m_event_flags {std::vector<unsigned int>(nDets, 0)}
privateinherited

Definition at line 218 of file EventInfo/EventInfo/EventInfo.h.

◆ m_event_ID

std::unique_ptr<EventID> EventInfo::m_event_ID
privateinherited

Definition at line 215 of file EventInfo/EventInfo/EventInfo.h.

◆ m_event_type

std::unique_ptr<EventType> EventInfo::m_event_type
privateinherited

Definition at line 216 of file EventInfo/EventInfo/EventInfo.h.

◆ m_subEvents

std::list<SubEvent> PileUpEventInfo::m_subEvents
private

Definition at line 137 of file PileUpEventInfo.h.

◆ m_trigger_info

std::unique_ptr<TriggerInfo> EventInfo::m_trigger_info
privateinherited

Definition at line 217 of file EventInfo/EventInfo/EventInfo.h.


The documentation for this class was generated from the following files:
EventInfo::Error
@ Error
Definition: EventInfo/EventInfo/EventInfo.h:67
EventInfo::BCMBeamVeto
@ BCMBeamVeto
Definition: EventInfo/EventInfo/EventInfo.h:85
EventInfo::MBTSBeamVeto
@ MBTSBeamVeto
Definition: EventInfo/EventInfo/EventInfo.h:84
EventInfo::m_event_type
std::unique_ptr< EventType > m_event_type
Definition: EventInfo/EventInfo/EventInfo.h:216
get_generator_info.result
result
Definition: get_generator_info.py:21
EventInfo::Warning
@ Warning
Definition: EventInfo/EventInfo/EventInfo.h:67
EventInfo::CosmicCombinedTight
@ CosmicCombinedTight
Definition: EventInfo/EventInfo/EventInfo.h:92
EventInfo::m_trigger_info
std::unique_ptr< TriggerInfo > m_trigger_info
Definition: EventInfo/EventInfo/EventInfo.h:217
EventInfo::HaloTileClusterPattern
@ HaloTileClusterPattern
Definition: EventInfo/EventInfo/EventInfo.h:89
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
EventInfo::m_event_flags
std::vector< unsigned int > m_event_flags
Definition: EventInfo/EventInfo/EventInfo.h:218
EventInfo::PixSPNonEmpty
@ PixSPNonEmpty
Definition: EventInfo/EventInfo/EventInfo.h:79
EventInfo::CSCTimeDiffHalo
@ CSCTimeDiffHalo
Definition: EventInfo/EventInfo/EventInfo.h:81
AthenaPoolTestRead.flags
flags
Definition: AthenaPoolTestRead.py:8
EventInfo::MBTSTimeDiffCol
@ MBTSTimeDiffCol
Definition: EventInfo/EventInfo/EventInfo.h:77
EventInfo::Tile
@ Tile
Definition: EventInfo/EventInfo/EventInfo.h:61
EventInfo::BkgdResvBit5
@ BkgdResvBit5
Definition: EventInfo/EventInfo/EventInfo.h:95
EventInfo::SCTSPNonEmpty
@ SCTSPNonEmpty
Definition: EventInfo/EventInfo/EventInfo.h:80
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
EventInfo::AVE_INTERACTS_BITS
@ AVE_INTERACTS_BITS
Definition: EventInfo/EventInfo/EventInfo.h:212
Trk::u
@ u
Enums for curvilinear frames.
Definition: ParamDefs.h:77
EventInfo::NBackgroundWords
@ NBackgroundWords
Definition: EventInfo/EventInfo/EventInfo.h:96
EventInfo::EF_ERROR_BITS
@ EF_ERROR_BITS
Definition: EventInfo/EventInfo/EventInfo.h:209
python.utils.AtlRunQueryLookup.mask
string mask
Definition: AtlRunQueryLookup.py:460
EventInfo::SCT
@ SCT
Definition: EventInfo/EventInfo/EventInfo.h:61
EventInfo::EF_BITS
@ EF_BITS
Definition: EventInfo/EventInfo/EventInfo.h:208
EventInfo::errorState
EventFlagErrorState errorState(EventFlagSubDet subDet) const
return error state for a particular sub-detector
Definition: EventInfo/EventInfo/EventInfo.h:274
EventInfo::classID
static const CLID & classID()
Definition: EventInfo/EventInfo/EventInfo.h:316
EventInfo::TRT
@ TRT
Definition: EventInfo/EventInfo/EventInfo.h:61
EventInfo::m_event_ID
std::unique_ptr< EventID > m_event_ID
Definition: EventInfo/EventInfo/EventInfo.h:215
EventInfo::PixMultiplicityHuge
@ PixMultiplicityHuge
Definition: EventInfo/EventInfo/EventInfo.h:79
EventInfo::ForwardDet
@ ForwardDet
Definition: EventInfo/EventInfo/EventInfo.h:61
PixelByteStreamErrors::BCID
@ BCID
Definition: PixelByteStreamErrors.h:13
EventInfo::nDets
@ nDets
Definition: EventInfo/EventInfo/EventInfo.h:61
ClassID_traits::ID
static const CLID & ID()
the CLID of T
Definition: Control/AthenaKernel/AthenaKernel/ClassID_traits.h:50
EventInfo::EventFlagErrorState
EventFlagErrorState
Definition: EventInfo/EventInfo/EventInfo.h:66
EventInfo::BkgdResvBit4
@ BkgdResvBit4
Definition: EventInfo/EventInfo/EventInfo.h:94
EventInfo::HaloMuonOneSided
@ HaloMuonOneSided
Definition: EventInfo/EventInfo/EventInfo.h:88
python.LArBadChannelDBAlg.xFFFFFFFF
xFFFFFFFF
Definition: LArBadChannelDBAlg.py:73
EventInfo::NotSet
@ NotSet
Definition: EventInfo/EventInfo/EventInfo.h:67
EventInfo::LUCIDBeamVeto
@ LUCIDBeamVeto
Definition: EventInfo/EventInfo/EventInfo.h:86
PileUpEventInfo::m_subEvents
std::list< SubEvent > m_subEvents
Definition: PileUpEventInfo.h:137
EventInfo::SCTMultiplicityHuge
@ SCTMultiplicityHuge
Definition: EventInfo/EventInfo/EventInfo.h:80
EventInfo::Core
@ Core
Definition: EventInfo/EventInfo/EventInfo.h:61
EventInfo::BCMTimeDiffHalo
@ BCMTimeDiffHalo
Definition: EventInfo/EventInfo/EventInfo.h:82
ParticleGun_EoverP_Config.pid
pid
Definition: ParticleGun_EoverP_Config.py:62
EventInfo::BkgdResvBit1
@ BkgdResvBit1
Definition: EventInfo/EventInfo/EventInfo.h:93
hist_file_dump.f
f
Definition: hist_file_dump.py:135
EventInfo::HaloClusterShape
@ HaloClusterShape
Definition: EventInfo/EventInfo/EventInfo.h:87
EventInfo::BkgdResvBit3
@ BkgdResvBit3
Definition: EventInfo/EventInfo/EventInfo.h:94
CxxUtils::set
constexpr std::enable_if_t< is_bitmask_v< E >, E & > set(E &lhs, E rhs)
Convenience function to set bits in a class enum bitmask.
Definition: bitmask.h:232
EventInfo::CosmicCombined
@ CosmicCombined
Definition: EventInfo/EventInfo/EventInfo.h:92
EventInfo::BeamGasPixel
@ BeamGasPixel
Definition: EventInfo/EventInfo/EventInfo.h:90
EventInfo::EventInfo
EventInfo()
Definition: EventInfo.cxx:21
EventInfo::CSCTimeDiffCol
@ CSCTimeDiffCol
Definition: EventInfo/EventInfo/EventInfo.h:81
EventInfo::ACTUAL_INTERACTS_BITS
@ ACTUAL_INTERACTS_BITS
Definition: EventInfo/EventInfo/EventInfo.h:211
EventInfo::BkgdResvBit2
@ BkgdResvBit2
Definition: EventInfo/EventInfo/EventInfo.h:93
EventInfo::HaloMuonTwoSided
@ HaloMuonTwoSided
Definition: EventInfo/EventInfo/EventInfo.h:88
EventInfo::EF_ERROR_SHIFT
@ EF_ERROR_SHIFT
Definition: EventInfo/EventInfo/EventInfo.h:210
EventInfo::MuonTimingCosmic
@ MuonTimingCosmic
Definition: EventInfo/EventInfo/EventInfo.h:83
EventInfo::Muon
@ Muon
Definition: EventInfo/EventInfo/EventInfo.h:61
EventInfo::Lumi
@ Lumi
Definition: EventInfo/EventInfo/EventInfo.h:61
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
EventInfo::LArECTimeDiffHalo
@ LArECTimeDiffHalo
Definition: EventInfo/EventInfo/EventInfo.h:78
EventInfo::CosmicStandAloneTight
@ CosmicStandAloneTight
Definition: EventInfo/EventInfo/EventInfo.h:91
EventInfo::LAr
@ LAr
Definition: EventInfo/EventInfo/EventInfo.h:61
EventInfo::AVE_INTERACTS_SHIFT
@ AVE_INTERACTS_SHIFT
Definition: EventInfo/EventInfo/EventInfo.h:213
EventInfo::MuonTimingCol
@ MuonTimingCol
Definition: EventInfo/EventInfo/EventInfo.h:83
EventInfo::Pixel
@ Pixel
Definition: EventInfo/EventInfo/EventInfo.h:61
EventInfo::HaloMuonSegment
@ HaloMuonSegment
Definition: EventInfo/EventInfo/EventInfo.h:87
EventInfo::BCMTimeDiffCol
@ BCMTimeDiffCol
Definition: EventInfo/EventInfo/EventInfo.h:82
EventInfo::LArECTimeDiffCol
@ LArECTimeDiffCol
Definition: EventInfo/EventInfo/EventInfo.h:78
readCCLHist.float
float
Definition: readCCLHist.py:83
EventInfo::CosmicStandAlone
@ CosmicStandAlone
Definition: EventInfo/EventInfo/EventInfo.h:91
EventInfo::MBTSTimeDiffHalo
@ MBTSTimeDiffHalo
Definition: EventInfo/EventInfo/EventInfo.h:77
EventInfo::Background
@ Background
Definition: EventInfo/EventInfo/EventInfo.h:61