CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Functions
CaloSamples.cc File Reference
#include "CalibFormats/CaloObjects/interface/CaloSamples.h"
#include "FWCore/MessageLogger/interface/MessageLogger.h"
#include <math.h>
#include <iostream>

Go to the source code of this file.

Functions

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

Function Documentation

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

Definition at line 104 of file CaloSamples.cc.

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

104  {
105  s << "DetId=" << samples.id();
106  // print out every so many precise samples
107  float preciseStep = samples.preciseSize()/samples.size();
108  s << ", "<< samples.size() << " samples";
109  if (preciseStep > 0)
110  s << ", " << samples.preciseSize() << " preciseSamples"
111  << ", " << preciseStep << " precise step";
112  s << '\n';
113  for (int i=0; i<samples.size(); i++) {
114  s << i << ":" << samples[i];
115  int precisei = i*preciseStep;
116  if(precisei < samples.preciseSize()) {
117  s << " " << samples.preciseAt(precisei) ;
118  }
119  s << std::endl;
120  }
121  return s;
122 }
int i
Definition: DBlmapReader.cc:9
int preciseSize() const
get the size
Definition: CaloSamples.h:64
int size() const
get the size
Definition: CaloSamples.h:26
DetId id() const
get the (generic) id
Definition: CaloSamples.h:23