CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
L1CaloMipQuietRegion.cc
Go to the documentation of this file.
2 
3 // Namespace resolution
4 using std::dec;
5 using std::endl;
6 using std::hex;
7 using std::noshowbase;
8 using std::ostream;
9 using std::showbase;
10 
12 
13 L1CaloMipQuietRegion::L1CaloMipQuietRegion(bool mip, bool quiet, unsigned crate, unsigned card, unsigned rgn, int16_t bx)
14  : m_id(crate, card, rgn),
15  m_data(0), // Over-ridden below
16  m_bx(bx) {
17  pack(mip, quiet);
18 }
19 
20 L1CaloMipQuietRegion::L1CaloMipQuietRegion(bool mip, bool quiet, unsigned ieta, unsigned iphi, int16_t bx)
21  : m_id(ieta, iphi),
22  m_data(0), // Over-ridden below
23  m_bx(bx) {
24  pack(mip, quiet);
25 }
26 
28  return (m_data == rhs.raw() && m_bx == rhs.bx() && m_id == rhs.id());
29 }
30 
31 ostream& operator<<(ostream& os, const L1CaloMipQuietRegion& rhs) {
32  os << "L1CaloMipQuietRegion:"
33  << " MIP=" << rhs.mip() << " Quiet=" << rhs.quiet() << endl
34  << " RCT crate=" << rhs.rctCrate() << " RCT card=" << rhs.rctCard() << " RCT rgn=" << rhs.rctRegionIndex()
35  << " RCT eta=" << rhs.rctEta() << " RCT phi=" << rhs.rctPhi() << endl
36  << " GCT eta=" << rhs.gctEta() << " GCT phi=" << rhs.gctPhi() << " BX=" << rhs.bx() << endl;
37  return os;
38 }
L1CaloRegionDetId id() const
Get global region ID.
unsigned gctPhi() const
Get GCT phi index.
unsigned rctRegionIndex() const
Get RCT region index.
int16_t bx() const
Get bunch crossing.
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:167
unsigned gctEta() const
Get GCT eta index.
unsigned rctCard() const
Get RCT reciever card ID.
unsigned rctPhi() const
Get local phi index (within RCT crate).
unsigned rctEta() const
Get local eta index (within RCT crate).
uint8_t m_data
MIP and Quiet bits for the region, packed in bit0 + bit1 respectively.
L1CaloMipQuietRegion()
Default constructor.
int16_t m_bx
Bunch crossing.
bool mip() const
Get MIP bit.
bool operator==(const L1CaloMipQuietRegion &rhs) const
Equality operator; compares all data: MIP/Quiet bits, bunch crossing &amp; geographical.
L1CaloRegionDetId m_id
Geographical info: region ID.
Miniumum Ionising Particle (MIP) and Quiet bits for a calorimeter trigger region. ...
m_id("(unknown)")
uint8_t raw() const
Get raw data.
void pack(bool mip, bool quiet)
For use in constructors - packs MIP/Quiet bools up into m_data;.
bool quiet() const
Get Quiet bit.
unsigned rctCrate() const
Get RCT crate ID.