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::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)
 
 TinyEvent (const edm::Event &event)
 
 TinyEvent (const edm::EventAuxiliary &eaux)
 

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) {}
unsigned int _bx
Definition: TinyEvent.h:66
edm::EventNumber_t _event
Definition: TinyEvent.h:64
unsigned int _orbit
Definition: TinyEvent.h:65

◆ 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) {}
unsigned int _bx
Definition: TinyEvent.h:66
edm::EventNumber_t _event
Definition: TinyEvent.h:64
unsigned int _orbit
Definition: TinyEvent.h:65
Definition: event.py:1

◆ 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) {}
unsigned int _bx
Definition: TinyEvent.h:66
edm::EventNumber_t _event
Definition: TinyEvent.h:64
unsigned int _orbit
Definition: TinyEvent.h:65
Definition: event.py:1

◆ 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) {}
unsigned int _bx
Definition: TinyEvent.h:66
edm::EventNumber_t _event
Definition: TinyEvent.h:64
unsigned int _orbit
Definition: TinyEvent.h:65

◆ 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()) {}
unsigned int _bx
Definition: TinyEvent.h:66
edm::EventNumber_t _event
Definition: TinyEvent.h:64
unsigned int _orbit
Definition: TinyEvent.h:65
Definition: event.py:1

◆ 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()) {}
EventNumber_t event() const
unsigned int _bx
Definition: TinyEvent.h:66
int bunchCrossing() const
edm::EventNumber_t _event
Definition: TinyEvent.h:64
unsigned int _orbit
Definition: TinyEvent.h:65
int orbitNumber() const

Member Function Documentation

◆ absoluteBX()

long long TinyEvent::absoluteBX ( ) const
inline

Definition at line 45 of file TinyEvent.h.

References _bx, and _orbit.

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

45 { return (long long)_orbit * 3564 + _bx; }
unsigned int _bx
Definition: TinyEvent.h:66
unsigned int _orbit
Definition: TinyEvent.h:65

◆ absoluteBXinCycle()

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

Definition at line 47 of file TinyEvent.h.

References absoluteBX().

Referenced by EventWithHistory::absoluteBXinCycle().

47 { return (absoluteBX() - bx0); }
long long absoluteBX() const
Definition: TinyEvent.h:45

◆ deltaBX()

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

Definition at line 49 of file TinyEvent.h.

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

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

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  }
unsigned int _bx
Definition: TinyEvent.h:66
edm::EventNumber_t _event
Definition: TinyEvent.h:64
unsigned int _orbit
Definition: TinyEvent.h:65

◆ deltaBXinCycle()

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

Definition at line 58 of file TinyEvent.h.

References absoluteBX(), and deltaBX().

Referenced by EventWithHistory::deltaBXinCycle().

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  }
long long absoluteBX() const
Definition: TinyEvent.h:45
long long deltaBX(const TinyEvent &se) const
Definition: TinyEvent.h:49

◆ isNextOf()

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

Definition at line 43 of file TinyEvent.h.

References _event.

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

43 { return (se._event > 0) && ((se._event + 1) == _event); }
edm::EventNumber_t _event
Definition: TinyEvent.h:64

◆ operator<()

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

Definition at line 37 of file TinyEvent.h.

References _event, and trackingPlots::other.

37 { return _event < other._event; }
edm::EventNumber_t _event
Definition: TinyEvent.h:64

◆ operator=()

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

Definition at line 27 of file TinyEvent.h.

References _bx, _event, and _orbit.

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

27  {
28  if (this != &se) {
29  _event = se._event;
30  _orbit = se._orbit;
31  _bx = se._bx;
32  }
33 
34  return *this;
35  }
unsigned int _bx
Definition: TinyEvent.h:66
edm::EventNumber_t _event
Definition: TinyEvent.h:64
unsigned int _orbit
Definition: TinyEvent.h:65

◆ operator==()

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

Definition at line 39 of file TinyEvent.h.

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

Referenced by EventWithHistory::operator==().

39  {
40  return (_event == other._event) && (_orbit == other._orbit) && (_bx == other._bx);
41  }
unsigned int _bx
Definition: TinyEvent.h:66
edm::EventNumber_t _event
Definition: TinyEvent.h:64
unsigned int _orbit
Definition: TinyEvent.h:65

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