CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
L1CaloMipQuietRegion.cc
Go to the documentation of this file.
2 
3 
4 // Namespace resolution
5 using std::ostream;
6 using std::endl;
7 using std::hex;
8 using std::dec;
9 using std::showbase;
10 using std::noshowbase;
11 
12 
14  m_id(),
15  m_data(0),
16  m_bx(0)
17 {
18 }
19 
20 L1CaloMipQuietRegion::L1CaloMipQuietRegion(bool mip, bool quiet, unsigned crate,
21  unsigned card, unsigned rgn, int16_t bx):
22  m_id(crate, card, rgn),
23  m_data(0), // Over-ridden below
24  m_bx(bx)
25 {
26  pack(mip, quiet);
27 }
28 
29 L1CaloMipQuietRegion::L1CaloMipQuietRegion(bool mip, bool quiet, unsigned ieta,
30  unsigned iphi, int16_t bx):
31  m_id(ieta, iphi),
32  m_data(0), // Over-ridden below
33  m_bx(bx)
34 {
35  pack(mip, quiet);
36 }
37 
39 {
40  return ( m_data==rhs.raw() && m_bx==rhs.bx() && m_id==rhs.id() );
41 }
42 
43 ostream& operator<< (ostream& os, const L1CaloMipQuietRegion& rhs)
44 {
45  os <<"L1CaloMipQuietRegion:"
46  << " MIP=" << rhs.mip()
47  << " Quiet=" << rhs.quiet() << endl
48  << " RCT crate=" << rhs.rctCrate()
49  << " RCT card=" << rhs.rctCard()
50  << " RCT rgn=" << rhs.rctRegionIndex()
51  << " RCT eta=" << rhs.rctEta()
52  << " RCT phi=" << rhs.rctPhi() << endl
53  << " GCT eta=" << rhs.gctEta()
54  << " GCT phi=" << rhs.gctPhi()
55  << " BX=" << rhs.bx() << endl;
56  return os;
57 }
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:188
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.