CMS 3D CMS Logo

Functions
L1GctChannelMask.cc File Reference
#include "CondFormats/L1TObjects/interface/L1GctChannelMask.h"

Go to the source code of this file.

Functions

std::ostream & operator<< (std::ostream &os, const L1GctChannelMask obj)
 

Function Documentation

◆ operator<<()

std::ostream& operator<< ( std::ostream &  os,
const L1GctChannelMask  obj 
)

Definition at line 92 of file L1GctChannelMask.cc.

References TauDecayModes::dec, mps_fire::i, hcalRecHitTable_cff::ieta, hcalRecHitTable_cff::iphi, and getGTfromDQMFile::obj.

92  {
93  os << "L1GctChannelMask :" << std::endl;
94 
95  // get masks without changing interface, sigh
96  unsigned emCrateMask(0), tetMask(0), metMask(0), htMask(0), mhtMask(0);
97  for (unsigned i = 0; i < 18; ++i) {
98  emCrateMask |= ((obj.emCrateMask(i) ? 1 : 0) << i);
99  }
100 
101  for (unsigned i = 0; i < 22; ++i) {
102  tetMask |= ((obj.totalEtMask(i) ? 1 : 0) << i);
103  metMask |= ((obj.missingEtMask(i) ? 1 : 0) << i);
104  htMask |= ((obj.totalHtMask(i) ? 1 : 0) << i);
105  mhtMask |= ((obj.missingHtMask(i) ? 1 : 0) << i);
106  }
107 
108  os << " EM crate mask = " << std::hex << emCrateMask << std::endl;
109  os << " EtTot mask = " << std::hex << tetMask << std::endl;
110  os << " EtMiss mask = " << std::hex << metMask << std::endl;
111  os << " HtTot mask = " << std::hex << htMask << std::endl;
112  os << " HtMiss mask = " << std::hex << mhtMask << std::endl;
113 
114  for (unsigned ieta = 0; ieta < 22; ++ieta) {
115  for (unsigned iphi = 0; iphi < 18; ++iphi) {
116  if (obj.regionMask(ieta, iphi)) {
117  os << " Region mask : " << std::dec << ieta << ", " << iphi << std::endl;
118  }
119  }
120  }
121  return os;
122 }