test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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

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

Definition at line 86 of file L1GctChannelMask.cc.

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

86  {
87  os << "L1GctChannelMask :" << std::endl;
88 
89  // get masks without changing interface, sigh
90  unsigned emCrateMask(0), tetMask(0), metMask(0), htMask(0), mhtMask(0);
91  for (unsigned i=0; i<18; ++i) {
92  emCrateMask |= ((obj.emCrateMask(i)?1:0)<<i);
93  }
94 
95  for (unsigned i=0; i<22; ++i) {
96  tetMask |= ((obj.totalEtMask(i)?1:0)<<i);
97  metMask |= ((obj.missingEtMask(i)?1:0)<<i);
98  htMask |= ((obj.totalHtMask(i)?1:0)<<i);
99  mhtMask |= ((obj.missingHtMask(i)?1:0)<<i);
100  }
101 
102  os << " EM crate mask = " << std::hex << emCrateMask << std::endl;
103  os << " EtTot mask = " << std::hex << tetMask << std::endl;
104  os << " EtMiss mask = " << std::hex << metMask << std::endl;
105  os << " HtTot mask = " << std::hex << htMask << std::endl;
106  os << " HtMiss mask = " << std::hex << mhtMask << std::endl;
107 
108  for (unsigned ieta=0; ieta<22; ++ieta) {
109  for (unsigned iphi=0; iphi<18; ++iphi) {
110  if ( obj.regionMask(ieta, iphi) ) {
111  os << " Region mask : " << std::dec << ieta << ", " << iphi << std::endl;
112  }
113  }
114  }
115  return os;
116 }
int i
Definition: DBlmapReader.cc:9
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