CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_6_2_5/src/DataFormats/L1Trigger/src/L1MonitorDigi.cc

Go to the documentation of this file.
00001 #include "DataFormats/L1Trigger/interface/L1MonitorDigi.h"
00002 #include <iomanip>
00003 
00004 bool L1MonitorDigi::empty() const {
00005   if(m_sid == m_null  || m_cid == m_null || m_value==m_null ) 
00006     return true;
00007   return false;
00008 }
00009 
00010 unsigned L1MonitorDigi::reset() {
00011   m_null = 999;
00012   m_sid = m_null; 
00013   m_cid = m_null;
00014   for(int i=0; i<3; i++) 
00015     m_location[i]=m_null;
00016   m_data=0;
00017   m_value=m_null;
00018   return m_null;
00019 }
00020 
00021 L1MonitorDigi::L1MonitorDigi() {
00022   reset();
00023 }
00024 
00025 L1MonitorDigi::L1MonitorDigi(unsigned sid, unsigned cid, 
00026                              unsigned x1, unsigned x2, unsigned x3, 
00027                              unsigned value, unsigned data) {
00028   reset();
00029   m_sid = sid; m_cid = cid;
00030   m_location[0]=x1; m_location[1]=x2; m_location[2]=x3;
00031   m_value = value; 
00032   m_data = data; 
00033 }
00034 
00035 L1MonitorDigi::~L1MonitorDigi() {}
00036 
00037 std::ostream& operator<<(std::ostream& s, const L1MonitorDigi& mon) {
00038   s << "L1Mon "
00039     << " system: "  << std::setw(2) << mon.sid()
00040     << " (cid."        << std::setw(2) << mon.cid() << ")"
00041     << std::hex << std::setfill('0')
00042     << " location: " 
00043     << "(" << std::setw(5) << std::setprecision(2) << mon.x1() 
00044     << "," << std::setw(5) << std::setprecision(2) << mon.x2() 
00045     << "," << std::setw(5) << std::setprecision(2) << mon.x3() << ")"
00046     << " value: " << std::setw(5) << std::setprecision(2) << mon.value()
00047     << " word: " << std::setw(8) << mon.raw()   
00048     << std::dec << std::setfill(' ');
00049   return s;
00050 }