CMS 3D CMS Logo

CSCShowerDigi.cc
Go to the documentation of this file.
3 #include <iomanip>
4 #include <iostream>
5 
6 using namespace std;
7 
9 CSCShowerDigi::CSCShowerDigi(const uint16_t bitsInTime, const uint16_t bitsOutTime, const uint16_t cscID)
10  : cscID_(cscID) {
13 }
14 
16 CSCShowerDigi::CSCShowerDigi() : bits_(0), cscID_(0) {}
17 
18 bool CSCShowerDigi::isValid() const {
19  // any loose shower is valid
20  return isLooseInTime() or isLooseOutTime();
21 }
22 
23 bool CSCShowerDigi::isLooseInTime() const { return bitsInTime() >= kLoose; }
24 
25 bool CSCShowerDigi::isNominalInTime() const { return bitsInTime() >= kNominal; }
26 
27 bool CSCShowerDigi::isTightInTime() const { return bitsInTime() >= kTight; }
28 
29 bool CSCShowerDigi::isLooseOutTime() const { return bitsOutTime() >= kLoose; }
30 
32 
33 bool CSCShowerDigi::isTightOutTime() const { return bitsOutTime() >= kTight; }
34 
36 
38 
39 void CSCShowerDigi::setDataWord(const uint16_t newWord, uint16_t& word, const unsigned shift, const unsigned mask) {
40  // clear the old value
41  word &= ~(mask << shift);
42 
43  // set the new value
44  word |= newWord << shift;
45 }
46 
47 uint16_t CSCShowerDigi::getDataWord(const uint16_t word, const unsigned shift, const unsigned mask) const {
48  return (word >> shift) & mask;
49 }
50 
51 std::ostream& operator<<(std::ostream& o, const CSCShowerDigi& digi) { return o << "CSC Shower: " << digi.bits(); }
CSCShowerDigi::isLooseOutTime
bool isLooseOutTime() const
Definition: CSCShowerDigi.cc:29
CSCShowerDigi.h
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
MessageLogger.h
CSCShowerDigi::kTight
Definition: CSCShowerDigi.h:12
CSCShowerDigi
Definition: CSCShowerDigi.h:9
CSCShowerDigi::isLooseInTime
bool isLooseInTime() const
Definition: CSCShowerDigi.cc:23
CSCShowerDigi::isTightOutTime
bool isTightOutTime() const
Definition: CSCShowerDigi.cc:33
CSCShowerDigi::setDataWord
void setDataWord(const uint16_t newWord, uint16_t &word, const unsigned shift, const unsigned mask)
Definition: CSCShowerDigi.cc:39
operator<<
std::ostream & operator<<(std::ostream &o, const CSCShowerDigi &digi)
Definition: CSCShowerDigi.cc:51
CSCShowerDigi::kNominal
Definition: CSCShowerDigi.h:12
EcalTangentSkim_cfg.o
o
Definition: EcalTangentSkim_cfg.py:42
word
uint64_t word
Definition: CTPPSTotemDataFormatter.cc:29
CSCShowerDigi::isNominalOutTime
bool isNominalOutTime() const
Definition: CSCShowerDigi.cc:31
CSCShowerDigi::bits
uint16_t bits() const
Definition: CSCShowerDigi.h:34
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::CSCShowerDigi
CSCShowerDigi()
default
Definition: CSCShowerDigi.cc:16
CSCShowerDigi::isValid
bool isValid() const
data
Definition: CSCShowerDigi.cc:18
CSCShowerDigi::kOutTimeMask
Definition: CSCShowerDigi.h:13
std
Definition: JetResolutionObject.h:76
CSCShowerDigi::isTightInTime
bool isTightInTime() const
Definition: CSCShowerDigi.cc:27
CSCShowerDigi::isNominalInTime
bool isNominalInTime() const
Definition: CSCShowerDigi.cc:25
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