Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:04:12

0001 #include "DataFormats/GEMDigi/interface/ME0TriggerDigi.h"
0002 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0003 #include <iostream>
0004 
0005 ME0TriggerDigi::ME0TriggerDigi(const int ichamberid,
0006                                const int iquality,
0007                                const int iphiposition,
0008                                const int ipartition,
0009                                const int ideltaphi,
0010                                const int ibend,
0011                                const int ibx)
0012     : chamberid_(ichamberid),
0013       quality_(iquality),
0014       phiposition_(iphiposition),
0015       partition_(ipartition),
0016       deltaphi_(ideltaphi),
0017       bend_(ibend),
0018       bx_(ibx) {}
0019 
0020 ME0TriggerDigi::ME0TriggerDigi() {
0021   clear();  // set contents to zero
0022 }
0023 
0024 void ME0TriggerDigi::clear() {
0025   chamberid_ = 0;
0026   quality_ = 0;
0027   phiposition_ = 0;
0028   partition_ = 0;
0029   deltaphi_ = 0;
0030   bend_ = 0;
0031   bx_ = 0;
0032 }
0033 
0034 bool ME0TriggerDigi::operator==(const ME0TriggerDigi& rhs) const {
0035   return ((chamberid_ == rhs.chamberid_) && (quality_ == rhs.quality_) && (phiposition_ == rhs.phiposition_) &&
0036           (partition_ == rhs.partition_) && (deltaphi_ == rhs.deltaphi_) && (bend_ == rhs.bend_) && (bx_ == rhs.bx_));
0037 }
0038 
0039 std::ostream& operator<<(std::ostream& o, const ME0TriggerDigi& digi) {
0040   return o << "ME0 chamber id #" << digi.getChamberid() << " Partition = " << digi.getPartition()
0041            << ": Quality = " << digi.getQuality() << " Phiposition = " << digi.getPhiposition()
0042            << " Strip = " << digi.getStrip() << " deltaPhi = " << digi.getDeltaphi()
0043            << " Bend = " << ((digi.getBend() == 0) ? 'L' : 'R') << "\n"
0044            << " BX = " << digi.getBX() << "\n";
0045 }