CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Classes | Functions
L1GctChannelMask.h File Reference
#include "CondFormats/Serialization/interface/Serializable.h"
#include <ostream>

Go to the source code of this file.

Classes

class  L1GctChannelMask
 

Functions

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

Function Documentation

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

Definition at line 92 of file L1GctChannelMask.cc.

References TauDecayModes::dec, L1GctChannelMask::emCrateMask(), mps_fire::i, L1GctChannelMask::missingEtMask(), L1GctChannelMask::missingHtMask(), L1GctChannelMask::regionMask(), L1GctChannelMask::totalEtMask(), and L1GctChannelMask::totalHtMask().

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 }
bool totalHtMask(unsigned ieta) const
bool missingHtMask(unsigned ieta) const
bool emCrateMask(unsigned crate) const
get EM masks for an RCT crate
bool regionMask(unsigned ieta, unsigned iphi) const
get region masks
bool totalEtMask(unsigned ieta) const
bool missingEtMask(unsigned ieta) const