CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Member Functions | Private Attributes
CSCShowerDigi Class Reference

#include <CSCShowerDigi.h>

Public Types

enum  BitMask { kInTimeMask = 0x2, kOutTimeMask = 0x2 }
 
enum  BitShift { kInTimeShift = 0, kOutTimeShift = 2 }
 
enum  Run3Shower { kInvalid = 0, kLoose = 1, kNominal = 2, kTight = 3 }
 

Public Member Functions

uint16_t bits () const
 
uint16_t bitsInTime () const
 
uint16_t bitsOutTime () const
 
void clear ()
 clear this Shower More...
 
 CSCShowerDigi ()
 default More...
 
 CSCShowerDigi (const uint16_t inTimeBits, const uint16_t outTimeBits, const uint16_t cscID)
 Constructors. More...
 
uint16_t getCSCID () const
 
bool isLooseInTime () const
 
bool isLooseOutTime () const
 
bool isNominalInTime () const
 
bool isNominalOutTime () const
 
bool isTightInTime () const
 
bool isTightOutTime () const
 
bool isValid () const
 data More...
 
void setCSCID (const uint16_t c)
 set cscID More...
 

Private Member Functions

uint16_t getDataWord (const uint16_t word, const unsigned shift, const unsigned mask) const
 
void setDataWord (const uint16_t newWord, uint16_t &word, const unsigned shift, const unsigned mask)
 

Private Attributes

uint16_t bits_
 
uint16_t cscID_
 

Detailed Description

Definition at line 9 of file CSCShowerDigi.h.

Member Enumeration Documentation

◆ BitMask

Enumerator
kInTimeMask 
kOutTimeMask 

Definition at line 13 of file CSCShowerDigi.h.

13 { kInTimeMask = 0x2, kOutTimeMask = 0x2 };

◆ BitShift

Enumerator
kInTimeShift 
kOutTimeShift 

Definition at line 14 of file CSCShowerDigi.h.

14 { kInTimeShift = 0, kOutTimeShift = 2 };

◆ Run3Shower

Enumerator
kInvalid 
kLoose 
kNominal 
kTight 

Definition at line 12 of file CSCShowerDigi.h.

12 { kInvalid = 0, kLoose = 1, kNominal = 2, kTight = 3 };

Constructor & Destructor Documentation

◆ CSCShowerDigi() [1/2]

CSCShowerDigi::CSCShowerDigi ( const uint16_t  inTimeBits,
const uint16_t  outTimeBits,
const uint16_t  cscID 
)

◆ CSCShowerDigi() [2/2]

CSCShowerDigi::CSCShowerDigi ( )

default

Default.

Definition at line 16 of file CSCShowerDigi.cc.

16 : bits_(0), cscID_(0) {}

Member Function Documentation

◆ bits()

uint16_t CSCShowerDigi::bits ( ) const
inline

Definition at line 34 of file CSCShowerDigi.h.

34 { return bits_; }

References bits_.

Referenced by operator<<().

◆ bitsInTime()

uint16_t CSCShowerDigi::bitsInTime ( ) const

◆ bitsOutTime()

uint16_t CSCShowerDigi::bitsOutTime ( ) const

◆ clear()

void CSCShowerDigi::clear ( void  )
inline

clear this Shower

Definition at line 22 of file CSCShowerDigi.h.

22 { bits_ = 0; }

References bits_.

Referenced by BeautifulSoup.Tag::setString().

◆ getCSCID()

uint16_t CSCShowerDigi::getCSCID ( ) const
inline

Definition at line 38 of file CSCShowerDigi.h.

38 { return cscID_; }

References cscID_.

◆ getDataWord()

uint16_t CSCShowerDigi::getDataWord ( const uint16_t  word,
const unsigned  shift,
const unsigned  mask 
) const
private

Definition at line 47 of file CSCShowerDigi.cc.

47  {
48  return (word >> shift) & mask;
49 }

References edm::shift.

Referenced by bitsInTime(), and bitsOutTime().

◆ isLooseInTime()

bool CSCShowerDigi::isLooseInTime ( ) const

Definition at line 23 of file CSCShowerDigi.cc.

23 { return bitsInTime() >= kLoose; }

References bitsInTime(), and kLoose.

Referenced by isValid().

◆ isLooseOutTime()

bool CSCShowerDigi::isLooseOutTime ( ) const

Definition at line 29 of file CSCShowerDigi.cc.

29 { return bitsOutTime() >= kLoose; }

References bitsOutTime(), and kLoose.

Referenced by isValid().

◆ isNominalInTime()

bool CSCShowerDigi::isNominalInTime ( ) const

Definition at line 25 of file CSCShowerDigi.cc.

25 { return bitsInTime() >= kNominal; }

References bitsInTime(), and kNominal.

◆ isNominalOutTime()

bool CSCShowerDigi::isNominalOutTime ( ) const

Definition at line 31 of file CSCShowerDigi.cc.

31 { return bitsOutTime() >= kNominal; }

References bitsOutTime(), and kNominal.

◆ isTightInTime()

bool CSCShowerDigi::isTightInTime ( ) const

Definition at line 27 of file CSCShowerDigi.cc.

27 { return bitsInTime() >= kTight; }

References bitsInTime(), and kTight.

◆ isTightOutTime()

bool CSCShowerDigi::isTightOutTime ( ) const

Definition at line 33 of file CSCShowerDigi.cc.

33 { return bitsOutTime() >= kTight; }

References bitsOutTime(), and kTight.

◆ isValid()

bool CSCShowerDigi::isValid ( void  ) const

data

Definition at line 18 of file CSCShowerDigi.cc.

18  {
19  // any loose shower is valid
20  return isLooseInTime() or isLooseOutTime();
21 }

References isLooseInTime(), isLooseOutTime(), and or.

Referenced by ntupleDataFormat._Object::_checkIsValid(), and core.AutoHandle.AutoHandle::ReallyLoad().

◆ setCSCID()

void CSCShowerDigi::setCSCID ( const uint16_t  c)
inline

set cscID

Definition at line 41 of file CSCShowerDigi.h.

41 { cscID_ = c; }

References c, and cscID_.

◆ setDataWord()

void CSCShowerDigi::setDataWord ( const uint16_t  newWord,
uint16_t &  word,
const unsigned  shift,
const unsigned  mask 
)
private

Definition at line 39 of file CSCShowerDigi.cc.

39  {
40  // clear the old value
41  word &= ~(mask << shift);
42 
43  // set the new value
44  word |= newWord << shift;
45 }

References edm::shift.

Referenced by CSCShowerDigi().

Member Data Documentation

◆ bits_

uint16_t CSCShowerDigi::bits_
private

Definition at line 47 of file CSCShowerDigi.h.

Referenced by bits(), bitsInTime(), bitsOutTime(), clear(), and CSCShowerDigi().

◆ cscID_

uint16_t CSCShowerDigi::cscID_
private

Definition at line 49 of file CSCShowerDigi.h.

Referenced by getCSCID(), and setCSCID().

CSCShowerDigi::isLooseOutTime
bool isLooseOutTime() const
Definition: CSCShowerDigi.cc:29
CSCShowerDigi::getDataWord
uint16_t getDataWord(const uint16_t word, const unsigned shift, const unsigned mask) const
Definition: CSCShowerDigi.cc:47
CSCShowerDigi::kInTimeMask
Definition: CSCShowerDigi.h:13
CSCShowerDigi::kTight
Definition: CSCShowerDigi.h:12
CSCShowerDigi::isLooseInTime
bool isLooseInTime() const
Definition: CSCShowerDigi.cc:23
CSCShowerDigi::setDataWord
void setDataWord(const uint16_t newWord, uint16_t &word, const unsigned shift, const unsigned mask)
Definition: CSCShowerDigi.cc:39
CSCShowerDigi::kNominal
Definition: CSCShowerDigi.h:12
word
uint64_t word
Definition: CTPPSTotemDataFormatter.cc:29
CSCShowerDigi::kLoose
Definition: CSCShowerDigi.h:12
CSCShowerDigi::bits_
uint16_t bits_
Definition: CSCShowerDigi.h:47
CSCShowerDigi::kOutTimeShift
Definition: CSCShowerDigi.h:14
CSCShowerDigi::kInTimeShift
Definition: CSCShowerDigi.h:14
CSCShowerDigi::bitsInTime
uint16_t bitsInTime() const
Definition: CSCShowerDigi.cc:35
CSCShowerDigi::kInvalid
Definition: CSCShowerDigi.h:12
CSCShowerDigi::kOutTimeMask
Definition: CSCShowerDigi.h:13
edm::shift
static unsigned const int shift
Definition: LuminosityBlockID.cc:7
CSCShowerDigi::bitsOutTime
uint16_t bitsOutTime() const
Definition: CSCShowerDigi.cc:37
or
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12
c
auto & c
Definition: CAHitNtupletGeneratorKernelsImpl.h:46
CSCShowerDigi::cscID_
uint16_t cscID_
Definition: CSCShowerDigi.h:49