CMS 3D CMS Logo

Classes | Typedefs | Functions
CaloSamples.h File Reference
#include <ostream>
#include <vector>
#include "DataFormats/DetId/interface/DetId.h"

Go to the source code of this file.

Classes

class  CaloSamples
 

Typedefs

typedef std::vector< CaloSamplesCaloSamplesCollection
 

Functions

std::ostream & operator<< (std::ostream &s, const CaloSamples &samps)
 

Typedef Documentation

typedef std::vector<CaloSamples> CaloSamplesCollection

Definition at line 86 of file CaloSamples.h.

Function Documentation

std::ostream& operator<< ( std::ostream &  s,
const CaloSamples samps 
)

Definition at line 106 of file CaloSamples.cc.

References mps_fire::i, CaloSamples::id(), CaloSamples::preciseSize(), alignCSCRings::s, and CaloSamples::size().

106  {
107  s << "DetId " << samples.id();
108  // print out every so many precise samples
109  float preciseStep = samples.preciseSize()/samples.size();
110  s << ", "<< samples.size() << " samples";
111  if (preciseStep > 0)
112  s << ", " << samples.preciseSize() << " preciseSamples"
113  << ", " << preciseStep << " preciseStep";
114  s << '\n';
115  for (int i=0; i<samples.size(); i++) {
116  s << i << ":" << samples[i] << " precise:";
117  int precise_start(i*preciseStep), precise_end(precise_start + preciseStep);
118  for (int j(precise_start); ((j<precise_end) && (j< samples.preciseSize()));
119  ++j)
120  s << " " << samples.preciseAt(j);
121  s << std::endl;
122  }
123  return s;
124 }