CMS 3D CMS Logo

Classes | Functions

CMSSW_4_4_3_patch1/src/DataFormats/SiStripDetId/interface/TECDetId.h File Reference

#include <ostream>
#include <vector>
#include "DataFormats/SiStripDetId/interface/SiStripDetId.h"
#include "DataFormats/SiStripDetId/interface/StripSubdetector.h"

Go to the source code of this file.

Classes

class  TECDetId

Functions

std::ostream & operator<< (std::ostream &s, const TECDetId &id)

Function Documentation

std::ostream& operator<< ( std::ostream &  s,
const TECDetId id 
)

Definition at line 23 of file TECDetId.cc.

                                                          {
  unsigned int              theWheel  = id.wheel();
  unsigned int              theModule = id.module();
  std::vector<unsigned int> thePetal  = id.petal();
  unsigned int              theRing   = id.ring();
  std::string side;
  std::string petal;
  side  = (id.side() == 1 ) ? "-" : "+";
  petal = (thePetal[0] == 1 ) ? "back" : "front";
  std::string type;
  type = (id.stereo() == 0) ? "r-phi" : "stereo";
  type = (id.glued() == 0) ? type : type+" glued";
  type = (id.isDoubleSide()) ? "double side" : type;
  return os << "TEC" << side
            << " Wheel " << theWheel
            << " Petal " << thePetal[1] << " " << petal
            << " Ring " << theRing
            << " Module " << theModule << " " << type
            << " (" << id.rawId() << ")";
}