Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:53:59

0001 #include "DataFormats/L1Trigger/interface/L1MonitorDigi.h"
0002 #include <iomanip>
0003 
0004 bool L1MonitorDigi::empty() const {
0005   if (m_sid == m_null || m_cid == m_null || m_value == m_null)
0006     return true;
0007   return false;
0008 }
0009 
0010 unsigned L1MonitorDigi::reset() {
0011   m_null = 999;
0012   m_sid = m_null;
0013   m_cid = m_null;
0014   for (int i = 0; i < 3; i++)
0015     m_location[i] = m_null;
0016   m_data = 0;
0017   m_value = m_null;
0018   return m_null;
0019 }
0020 
0021 L1MonitorDigi::L1MonitorDigi() { reset(); }
0022 
0023 L1MonitorDigi::L1MonitorDigi(
0024     unsigned sid, unsigned cid, unsigned x1, unsigned x2, unsigned x3, unsigned value, unsigned data) {
0025   reset();
0026   m_sid = sid;
0027   m_cid = cid;
0028   m_location[0] = x1;
0029   m_location[1] = x2;
0030   m_location[2] = x3;
0031   m_value = value;
0032   m_data = data;
0033 }
0034 
0035 L1MonitorDigi::~L1MonitorDigi() {}
0036 
0037 std::ostream& operator<<(std::ostream& s, const L1MonitorDigi& mon) {
0038   s << "L1Mon "
0039     << " system: " << std::setw(2) << mon.sid() << " (cid." << std::setw(2) << mon.cid() << ")" << std::hex
0040     << std::setfill('0') << " location: "
0041     << "(" << std::setw(5) << std::setprecision(2) << mon.x1() << "," << std::setw(5) << std::setprecision(2)
0042     << mon.x2() << "," << std::setw(5) << std::setprecision(2) << mon.x3() << ")"
0043     << " value: " << std::setw(5) << std::setprecision(2) << mon.value() << " word: " << std::setw(8) << mon.raw()
0044     << std::dec << std::setfill(' ');
0045   return s;
0046 }