#include <EncodedEventId.h>
Public Member Functions | |
int | bunchCrossing () const |
get the detector field from this detid | |
EncodedEventId () | |
Create an empty or null id (also for persistence) | |
EncodedEventId (uint32_t id) | |
Create an id from a raw number. | |
EncodedEventId (int bunchX, int event) | |
Create an id, filling the bunch crossing and event infomrations. | |
int | event () const |
get the contents of the subdetector field (should be protected?) | |
int | operator!= (const EncodedEventId &id) const |
inequality | |
uint32_t | operator() () |
int | operator< (const EncodedEventId &id) const |
comparison | |
int | operator== (const EncodedEventId &id) const |
equality | |
uint32_t | rawId () const |
get the raw id | |
Protected Attributes | |
uint32_t | id_ |
Static Private Attributes | |
static const unsigned int | bunchNegMask_ = 0x80000000 |
static const unsigned int | bunchXMask_ = 0x10 |
static const unsigned int | bunchXStartBit_ = 16 |
static const unsigned int | eventMask_ = 0x10 |
static const unsigned int | eventStartBit_ = 0 |
Definition at line 11 of file EncodedEventId.h.
EncodedEventId::EncodedEventId | ( | ) |
Create an empty or null id (also for persistence)
Definition at line 3 of file EncodedEventId.cc.
:id_(0) {}
EncodedEventId::EncodedEventId | ( | uint32_t | id | ) | [explicit] |
EncodedEventId::EncodedEventId | ( | int | bunchX, |
int | event | ||
) | [inline] |
Create an id, filling the bunch crossing and event infomrations.
Definition at line 18 of file EncodedEventId.h.
References bunchNegMask_, bunchXStartBit_, event(), and id_.
{ id_ = TMath::Abs(bunchX)<< bunchXStartBit_ |event ; if (bunchX<0) id_=id_ | bunchNegMask_; }
int EncodedEventId::bunchCrossing | ( | ) | const [inline] |
get the detector field from this detid
Definition at line 24 of file EncodedEventId.h.
References bunchNegMask_, bunchXStartBit_, and id_.
Referenced by edm::TestMix::analyze(), DTHitAssociator::DTHitAssociator(), PrimaryVertexAnalyzer4PU::getSimEvents(), TrackingParticleSelector::operator()(), operator<<(), PileupInformation::produce(), TrackingTruthProducer::setTrackingParticle(), VertexClassifier::simulationInformation(), and TrackClassifier::simulationInformation().
{ int bcr= int((id_ >> bunchXStartBit_) & 0x7FFF); return id_ & bunchNegMask_ ? -bcr : bcr; }
int EncodedEventId::event | ( | ) | const [inline] |
get the contents of the subdetector field (should be protected?)
Definition at line 26 of file EncodedEventId.h.
References id_.
Referenced by edm::TestMix::analyze(), DTHitAssociator::DTHitAssociator(), EncodedEventId(), PrimaryVertexAnalyzer4PU::getSimEvents(), TrackingParticleSelector::operator()(), operator<<(), TrackingTruthProducer::setTrackingParticle(), VertexClassifier::simulationInformation(), and TrackClassifier::simulationInformation().
{ return int(id_ & 0xFFFF); }
int EncodedEventId::operator!= | ( | const EncodedEventId & | id | ) | const [inline] |
uint32_t EncodedEventId::operator() | ( | ) | [inline] |
int EncodedEventId::operator< | ( | const EncodedEventId & | id | ) | const [inline] |
int EncodedEventId::operator== | ( | const EncodedEventId & | id | ) | const [inline] |
uint32_t EncodedEventId::rawId | ( | ) | const [inline] |
get the raw id
Definition at line 29 of file EncodedEventId.h.
References id_.
Referenced by TrackingTruthProducer::addCloseGenVertexes(), operator<<(), and TrackingTruthProducer::setTrackingParticle().
{ return id_; }
const unsigned int EncodedEventId::bunchNegMask_ = 0x80000000 [static, private] |
Definition at line 40 of file EncodedEventId.h.
Referenced by bunchCrossing(), and EncodedEventId().
const unsigned int EncodedEventId::bunchXMask_ = 0x10 [static, private] |
Definition at line 39 of file EncodedEventId.h.
const unsigned int EncodedEventId::bunchXStartBit_ = 16 [static, private] |
Definition at line 37 of file EncodedEventId.h.
Referenced by bunchCrossing(), and EncodedEventId().
const unsigned int EncodedEventId::eventMask_ = 0x10 [static, private] |
Definition at line 41 of file EncodedEventId.h.
const unsigned int EncodedEventId::eventStartBit_ = 0 [static, private] |
Definition at line 38 of file EncodedEventId.h.
uint32_t EncodedEventId::id_ [protected] |
Definition at line 43 of file EncodedEventId.h.
Referenced by bunchCrossing(), EncodedEventId(), event(), operator!=(), operator()(), operator<(), operator==(), and rawId().