CMS 3D CMS Logo

Public Member Functions | Public Attributes

TinyEvent Struct Reference

#include <TinyEvent.h>

Inheritance diagram for TinyEvent:
EventWithHistory

List of all members.

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 unsigned int event, const unsigned int orbit, const int bx)
 TinyEvent (const edm::Event &event)
 TinyEvent (const unsigned int event, const int orbit, const int bx)
 TinyEvent (const edm::EventAuxiliary &eaux)
 TinyEvent (const TinyEvent &se)

Public Attributes

unsigned int _bx
unsigned int _event
unsigned int _orbit

Detailed Description

Definition at line 13 of file TinyEvent.h.


Constructor & Destructor Documentation

TinyEvent::TinyEvent ( ) [inline]

Definition at line 15 of file TinyEvent.h.

:_event(0), _orbit(0), _bx(0) { }
TinyEvent::TinyEvent ( const unsigned int  event,
const int  orbit,
const int  bx 
) [inline, explicit]

Definition at line 17 of file TinyEvent.h.

                                                                           :
    _event(event), _orbit(orbit<0 ? 0 : orbit ), _bx(bx<0 ? 0 : bx) { }
TinyEvent::TinyEvent ( const unsigned int  event,
const unsigned int  orbit,
const int  bx 
) [inline, explicit]

Definition at line 20 of file TinyEvent.h.

                                                                                    :
    _event(event), _orbit(orbit), _bx(bx<0 ? 0 : bx) { }
TinyEvent::TinyEvent ( const TinyEvent se) [inline]

Definition at line 23 of file TinyEvent.h.

                                :
    _event(se._event), _orbit(se._orbit), _bx(se._bx) { }
TinyEvent::TinyEvent ( const edm::Event event)

Definition at line 6 of file TinyEvent.cc.

                                         :
  _event(event.id().event()),
  _orbit(event.orbitNumber() < 0 ? 0 : event.orbitNumber()),
  _bx(event.bunchCrossing() < 0 ? 0 : event.bunchCrossing()) { }
TinyEvent::TinyEvent ( const edm::EventAuxiliary eaux)

Definition at line 11 of file TinyEvent.cc.

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

Member Function Documentation

long long TinyEvent::absoluteBX ( ) const [inline]

Reimplemented in EventWithHistory.

Definition at line 57 of file TinyEvent.h.

References _bx, and _orbit.

Referenced by absoluteBXinCycle(), and deltaBXinCycle().

                               {

    return (long long)_orbit * 3564 + _bx;

  }
long long TinyEvent::absoluteBXinCycle ( const int  bx0) const [inline]

Reimplemented in EventWithHistory.

Definition at line 63 of file TinyEvent.h.

References absoluteBX().

                                                   {

    return (absoluteBX()-bx0);

  }
long long TinyEvent::deltaBX ( const TinyEvent se) const [inline]

Reimplemented in EventWithHistory.

Definition at line 69 of file TinyEvent.h.

References _bx, _event, and _orbit.

Referenced by deltaBXinCycle().

                                               {

    int sign = 1;
    if(se._event > _event) sign = -1;
      
    long long dorb = (int)(_orbit) - (int)(se._orbit);
    return (dorb*3564 + (int)_bx - (int)se._bx) * sign;

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

Reimplemented in EventWithHistory.

Definition at line 79 of file TinyEvent.h.

References absoluteBX(), and deltaBX().

                                                                     {

    long long dbx = deltaBX(se);

    return dbx+(69 + se.absoluteBX() -bx0%70 )%70; // I could use: dbx+(69+se.absoluteBXinCycle(bx0))%70

  }
int TinyEvent::isNextOf ( const TinyEvent se) const [inline]

Definition at line 51 of file TinyEvent.h.

References _event.

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

                                          {

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

  }
int TinyEvent::operator< ( const TinyEvent other) const [inline]

Definition at line 41 of file TinyEvent.h.

References _event.

                                              { 
    return _event < other._event;
  }
TinyEvent& TinyEvent::operator= ( const TinyEvent se) [inline]

Definition at line 29 of file TinyEvent.h.

References _bx, _event, and _orbit.

                                            {

    if(this != &se) {
      _event = se._event;
      _orbit = se._orbit;
      _bx = se._bx;
    }
    
    return *this;

  }
int TinyEvent::operator== ( const TinyEvent other) const [inline]

Definition at line 45 of file TinyEvent.h.

References _bx, _event, and _orbit.

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

Member Data Documentation

unsigned int TinyEvent::_bx

Definition at line 89 of file TinyEvent.h.

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

unsigned int TinyEvent::_event
unsigned int TinyEvent::_orbit

Definition at line 88 of file TinyEvent.h.

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