CMS 3D CMS Logo

Functions
CaloSamples.cc File Reference
#include "CalibFormats/CaloObjects/interface/CaloSamples.h"
#include "FWCore/MessageLogger/interface/MessageLogger.h"
#include <cmath>
#include <iostream>

Go to the source code of this file.

Functions

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

Function Documentation

◆ operator<<()

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

Definition at line 115 of file CaloSamples.cc.

References mps_fire::i, dqmiolumiharvest::j, alignCSCRings::s, and EgammaValidation_cff::samples.

115  {
116  s << "DetId " << samples.id();
117  // print out every so many precise samples
118  float preciseStep = samples.preciseSize() / samples.size();
119  s << ", " << samples.size() << " samples";
120  if (preciseStep > 0)
121  s << ", " << samples.preciseSize() << " preciseSamples"
122  << ", " << preciseStep << " preciseStep";
123  s << '\n';
124  for (int i = 0; i < samples.size(); i++) {
125  s << i << ":" << samples[i] << " precise:";
126  int precise_start(i * preciseStep), precise_end(precise_start + preciseStep);
127  for (int j(precise_start); ((j < precise_end) && (j < samples.preciseSize())); ++j)
128  s << " " << samples.preciseAt(j);
129  s << std::endl;
130  }
131  return s;
132 }