CMS 3D CMS Logo

Classes | Functions
CSCLayerInfo.h File Reference
#include <iomanip>
#include <vector>
#include "DataFormats/MuonDetId/interface/CSCDetId.h"
#include "SimDataFormats/TrackingHit/interface/PSimHitContainer.h"

Go to the source code of this file.

Classes

class  CSCLayerInfo< TYPE >
 

Functions

template<class TYPE >
std::ostream & operator<< (std::ostream &output, const CSCLayerInfo< TYPE > &info)
 

Function Documentation

template<class TYPE >
std::ostream& operator<< ( std::ostream &  output,
const CSCLayerInfo< TYPE > &  info 
)

Definition at line 82 of file CSCLayerInfo.h.

References CSCLayerInfo< TYPE >::getId(), CSCLayerInfo< TYPE >::getRecDigis(), CSCLayerInfo< TYPE >::getSimHits(), mps_fire::i, CSCDetId::layer(), and convertSQLitetoXML_cfg::output.

83  {
84  std::vector<TYPE> thisLayerDigis = info.getRecDigis();
85  // vector<TYPE>::iterator prd; /* upsets pedantic compillation on LINUX */
86  if (thisLayerDigis.size() > 0) {
87  output << "Layer: " << std::setw(1) << info.getId().layer();
88  for (unsigned int i = 0; i < thisLayerDigis.size(); i++) {
89  output << " RecDigi # " << i+1 << ": " << thisLayerDigis[i] << '\t';
90  }
91  }
92  std::vector<PSimHit> thisLayerHits = info.getSimHits();
93  if (thisLayerHits.size() > 0) {
94  output << "Layer: " << std::setw(1) << info.getId().layer();
95  for (unsigned int i = 0; i < thisLayerHits.size(); i++) {
96  output << " SimHit # " << i+1 << ": " << thisLayerHits[i] << '\t';
97  }
98  output << std::endl;
99  }
100  return output;
101 }
std::vector< TYPE > getRecDigis() const
Definition: CSCLayerInfo.h:46
std::vector< PSimHit > getSimHits() const
Definition: CSCLayerInfo.h:49
int layer() const
Definition: CSCDetId.h:61
CSCDetId getId() const
Definition: CSCLayerInfo.h:43