CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes
TinyEvent Struct Reference

#include <TinyEvent.h>

Inheritance diagram for TinyEvent:
EventWithHistory

Public Member Functions

long long absoluteBX () const
 
long long absoluteBXinCycle (const int bx0) const
 
long long deltaBX (const TinyEvent &se) const
 
long long deltaBXinCycle (const TinyEvent &se, const int bx0) const
 
int isNextOf (const TinyEvent &se) const
 
int operator< (const TinyEvent &other) const
 
TinyEventoperator= (const TinyEvent &se)
 
int operator== (const TinyEvent &other) const
 
 TinyEvent ()
 
 TinyEvent (const edm::Event &event)
 
 TinyEvent (const edm::EventAuxiliary &eaux)
 
 TinyEvent (const edm::EventNumber_t event, const int orbit, const int bx)
 
 TinyEvent (const edm::EventNumber_t event, const unsigned int orbit, const int bx)
 
 TinyEvent (const TinyEvent &se)
 

Public Attributes

unsigned int _bx
 
edm::EventNumber_t _event
 
unsigned int _orbit
 

Detailed Description

Definition at line 13 of file TinyEvent.h.

Constructor & Destructor Documentation

◆ TinyEvent() [1/6]

TinyEvent::TinyEvent ( )
inline

Definition at line 14 of file TinyEvent.h.

14 : _event(0), _orbit(0), _bx(0) {}

◆ TinyEvent() [2/6]

TinyEvent::TinyEvent ( const edm::EventNumber_t  event,
const int  orbit,
const int  bx 
)
inlineexplicit

Definition at line 16 of file TinyEvent.h.

17  : _event(event), _orbit(orbit < 0 ? 0 : orbit), _bx(bx < 0 ? 0 : bx) {}

◆ TinyEvent() [3/6]

TinyEvent::TinyEvent ( const edm::EventNumber_t  event,
const unsigned int  orbit,
const int  bx 
)
inlineexplicit

Definition at line 19 of file TinyEvent.h.

20  : _event(event), _orbit(orbit), _bx(bx < 0 ? 0 : bx) {}

◆ TinyEvent() [4/6]

TinyEvent::TinyEvent ( const TinyEvent se)
inline

Definition at line 22 of file TinyEvent.h.

22 : _event(se._event), _orbit(se._orbit), _bx(se._bx) {}

◆ TinyEvent() [5/6]

TinyEvent::TinyEvent ( const edm::Event event)

Definition at line 4 of file TinyEvent.cc.

5  : _event(event.id().event()),
6  _orbit(event.orbitNumber() < 0 ? 0 : event.orbitNumber()),
7  _bx(event.bunchCrossing() < 0 ? 0 : event.bunchCrossing()) {}

◆ TinyEvent() [6/6]

TinyEvent::TinyEvent ( const edm::EventAuxiliary eaux)

Definition at line 9 of file TinyEvent.cc.

10  : _event(eaux.event()),
11  _orbit(eaux.orbitNumber() < 0 ? 0 : eaux.orbitNumber()),
12  _bx(eaux.bunchCrossing() < 0 ? 0 : eaux.bunchCrossing()) {}

Member Function Documentation

◆ absoluteBX()

long long TinyEvent::absoluteBX ( ) const
inline

Definition at line 45 of file TinyEvent.h.

45 { return (long long)_orbit * 3564 + _bx; }

References _bx, and _orbit.

Referenced by EventWithHistory::absoluteBX(), absoluteBXinCycle(), and deltaBXinCycle().

◆ absoluteBXinCycle()

long long TinyEvent::absoluteBXinCycle ( const int  bx0) const
inline

Definition at line 47 of file TinyEvent.h.

47 { return (absoluteBX() - bx0); }

References absoluteBX().

Referenced by EventWithHistory::absoluteBXinCycle().

◆ deltaBX()

long long TinyEvent::deltaBX ( const TinyEvent se) const
inline

Definition at line 49 of file TinyEvent.h.

49  {
50  int sign = 1;
51  if (se._event > _event)
52  sign = -1;
53 
54  long long dorb = (int)(_orbit) - (int)(se._orbit);
55  return (dorb * 3564 + (int)_bx - (int)se._bx) * sign;
56  }

References _bx, _event, _orbit, createfilelist::int, and Validation_hcalonly_cfi::sign.

Referenced by EventWithHistory::deltaBX(), and deltaBXinCycle().

◆ deltaBXinCycle()

long long TinyEvent::deltaBXinCycle ( const TinyEvent se,
const int  bx0 
) const
inline

Definition at line 58 of file TinyEvent.h.

58  {
59  long long dbx = deltaBX(se);
60 
61  return dbx + (69 + se.absoluteBX() - bx0 % 70) % 70; // I could use: dbx+(69+se.absoluteBXinCycle(bx0))%70
62  }

References absoluteBX(), and deltaBX().

Referenced by EventWithHistory::deltaBXinCycle().

◆ isNextOf()

int TinyEvent::isNextOf ( const TinyEvent se) const
inline

Definition at line 43 of file TinyEvent.h.

43 { return (se._event > 0) && ((se._event + 1) == _event); }

References _event.

Referenced by EventWithHistory::add(), and EventWithHistory::isFutureHistory().

◆ operator<()

int TinyEvent::operator< ( const TinyEvent other) const
inline

Definition at line 37 of file TinyEvent.h.

37 { return _event < other._event; }

References _event, and trackingPlots::other.

◆ operator=()

TinyEvent& TinyEvent::operator= ( const TinyEvent se)
inline

Definition at line 27 of file TinyEvent.h.

27  {
28  if (this != &se) {
29  _event = se._event;
30  _orbit = se._orbit;
31  _bx = se._bx;
32  }
33 
34  return *this;
35  }

References _bx, _event, and _orbit.

Referenced by EventWithHistory::EventWithHistory(), and EventWithHistory::operator=().

◆ operator==()

int TinyEvent::operator== ( const TinyEvent other) const
inline

Definition at line 39 of file TinyEvent.h.

39  {
40  return (_event == other._event) && (_orbit == other._orbit) && (_bx == other._bx);
41  }

References _bx, _event, _orbit, and trackingPlots::other.

Referenced by EventWithHistory::operator==().

Member Data Documentation

◆ _bx

unsigned int TinyEvent::_bx

Definition at line 66 of file TinyEvent.h.

Referenced by absoluteBX(), EventWithHistory::bx(), deltaBX(), operator=(), and operator==().

◆ _event

edm::EventNumber_t TinyEvent::_event

◆ _orbit

unsigned int TinyEvent::_orbit
edm::EventAuxiliary::event
EventNumber_t event() const
Definition: EventAuxiliary.h:72
l1GtPatternGenerator_cfi.bx
bx
Definition: l1GtPatternGenerator_cfi.py:18
TinyEvent::_event
edm::EventNumber_t _event
Definition: TinyEvent.h:64
Validation_hcalonly_cfi.sign
sign
Definition: Validation_hcalonly_cfi.py:32
edm::EventAuxiliary::bunchCrossing
int bunchCrossing() const
Definition: EventAuxiliary.h:76
TinyEvent::_orbit
unsigned int _orbit
Definition: TinyEvent.h:65
TinyEvent::absoluteBX
long long absoluteBX() const
Definition: TinyEvent.h:45
TinyEvent::deltaBX
long long deltaBX(const TinyEvent &se) const
Definition: TinyEvent.h:49
trackingPlots.other
other
Definition: trackingPlots.py:1464
edm::EventAuxiliary::orbitNumber
int orbitNumber() const
Definition: EventAuxiliary.h:77
createfilelist.int
int
Definition: createfilelist.py:10
TinyEvent::_bx
unsigned int _bx
Definition: TinyEvent.h:66
event
Definition: event.py:1