CMS 3D CMS Logo

L1CaloEmCand.cc
Go to the documentation of this file.
2 
3 #include <iostream>
4 
5 using std::dec;
6 using std::endl;
7 using std::hex;
8 using std::ostream;
9 
10 // default constructor
11 L1CaloEmCand::L1CaloEmCand() : m_data(0), m_rctCrate(0), m_iso(false), m_index(0), m_bx(0) {}
12 
13 // construct from raw data (for use in unpacking)
14 // last bool argument is a hack to distinguish this constructor from the next one!
15 L1CaloEmCand::L1CaloEmCand(uint16_t data, unsigned crate, bool iso)
16  : m_data(data), m_rctCrate(crate), m_iso(iso), m_index(0), m_bx(0) {}
17 
18 // construct from raw data (for use in unpacking)
19 // last bool argument is a hack to distinguish this constructor from the next one!
20 L1CaloEmCand::L1CaloEmCand(uint16_t data, unsigned crate, bool iso, uint16_t index, int16_t bx, bool dummy)
21  : m_data(data), m_rctCrate(crate), m_iso(iso), m_index(index), m_bx(bx) {}
22 
23 // construct from content (for use in emulator)
24 L1CaloEmCand::L1CaloEmCand(unsigned rank, unsigned region, unsigned card, unsigned crate, bool iso)
25  : m_data(0), // over-ridden below
26  m_rctCrate(crate),
27  m_iso(iso),
28  m_index(0),
29  m_bx(0)
30 
31 {
32  m_data = (rank & 0x3f) + ((region & 0x1) << 6) + ((card & 0x7) << 7);
33 }
34 
35 // construct from content (for use in emulator)
37  unsigned rank, unsigned region, unsigned card, unsigned crate, bool iso, uint16_t index, int16_t bx)
38  : m_data(0), // over-ridden below
39  m_rctCrate(crate),
40  m_iso(iso),
41  m_index(index),
42  m_bx(bx) {
43  m_data = (rank & 0x3f) + ((region & 0x1) << 6) + ((card & 0x7) << 7);
44 }
45 
46 // destructor
48 
49 void L1CaloEmCand::setBx(int16_t bx) { m_bx = bx; }
50 
51 // pretty print
52 ostream& operator<<(ostream& s, const L1CaloEmCand& cand) {
53  s << "L1CaloEmCand : ";
54  s << "rank=" << cand.rank();
55  s << ", region=" << cand.rctRegion() << ", card=" << cand.rctCard() << ", crate=" << cand.rctCrate();
56  s << ", iso=" << cand.isolated();
57  s << ", index=" << cand.index() << ", BX=" << cand.bx();
58  return s;
59 }
L1CaloEmCand.h
L1CaloEmCand::bx
int16_t bx() const
get bunch-crossing index
Definition: L1CaloEmCand.h:60
funct::false
false
Definition: Factorize.h:29
l1GtPatternGenerator_cfi.bx
bx
Definition: l1GtPatternGenerator_cfi.py:18
L1CaloEmCand::L1CaloEmCand
L1CaloEmCand()
default constructor (for vector initialisation etc.)
Definition: L1CaloEmCand.cc:11
L1CaloEmCand::~L1CaloEmCand
~L1CaloEmCand()
destructor
Definition: L1CaloEmCand.cc:47
L1CaloEmCand::setBx
void setBx(int16_t bx)
set BX
Definition: L1CaloEmCand.cc:49
testProducerWithPsetDescEmpty_cfi.x1
x1
Definition: testProducerWithPsetDescEmpty_cfi.py:33
alignCSCRings.s
s
Definition: alignCSCRings.py:92
L1CaloEmCand::m_data
uint16_t m_data
Definition: L1CaloEmCand.h:83
operator<<
ostream & operator<<(ostream &s, const L1CaloEmCand &cand)
Definition: L1CaloEmCand.cc:52
cand
Definition: decayParser.h:32
L1CaloEmCand::m_bx
int16_t m_bx
Definition: L1CaloEmCand.h:90
HLT_FULL_cff.region
region
Definition: HLT_FULL_cff.py:88271
L1CaloEmCand::rank
unsigned rank() const
get rank bits
Definition: L1CaloEmCand.h:42
data
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
dummy
Definition: DummySelector.h:38
L1CaloEmCand
Level-1 Region Calorimeter Trigger EM candidate.
Definition: L1CaloEmCand.h:17
TauDecayModes.dec
dec
Definition: TauDecayModes.py:143