CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Functions | Variables
LumiDetails.cc File Reference
#include "DataFormats/Luminosity/interface/LumiDetails.h"
#include "FWCore/Utilities/interface/EDMException.h"
#include <cassert>
#include <iomanip>
#include <ostream>

Go to the source code of this file.

Functions

std::ostream & operator<< (std::ostream &s, LumiDetails const &lumiDetails)
 

Variables

static std::vector
< std::string > const 
s_dipalgoNames = {{"DIP"}}
 

Function Documentation

std::ostream& operator<< ( std::ostream &  s,
LumiDetails const &  lumiDetails 
)

Definition at line 144 of file LumiDetails.cc.

References LumiDetails::algoNames(), LumiDetails::dipalgoNames(), relativeConstraints::error, mps_fire::i, LumiDetails::lumiBeam1Intensities(), LumiDetails::lumiBeam2Intensities(), LumiDetails::lumiErrorsForAlgo(), LumiDetails::lumiQualitiesForAlgo(), LumiDetails::lumiValuesForAlgo(), LumiDetails::lumiVersion(), quality, alignCSCRings::s, AlCaHLTBitMon_QueryRunRegistry::string, and relativeConstraints::value.

144  {
145  s << "\nDumping LumiDetails\n";
146  s << std::setw(12) << "lumi version " << lumiDetails.lumiVersion() << "\n";
147  std::vector<std::string>::const_iterator algo;
148  std::vector<std::string>::const_iterator algoEnd;
149  if (lumiDetails.lumiVersion() != std::string("DIP")) {
150  algo = lumiDetails.algoNames().begin();
151  algoEnd = lumiDetails.algoNames().end();
152  } else {
153  algo = lumiDetails.dipalgoNames().begin();
154  algoEnd = lumiDetails.dipalgoNames().end();
155  }
157 
158  for (; algo != algoEnd; ++algo, ++i) {
159  std::vector<float>::const_iterator value = lumiDetails.lumiValuesForAlgo(i).first;
160  std::vector<float>::const_iterator valueEnd = lumiDetails.lumiValuesForAlgo(i).second;
161  std::vector<float>::const_iterator error = lumiDetails.lumiErrorsForAlgo(i).first;
162  std::vector<short>::const_iterator quality = lumiDetails.lumiQualitiesForAlgo(i).first;
163 
164  s << "algorithm: " << *algo << "\n";
165  s << std::setw(12) << "value" << std::setw(12) << "error" << std::setw(12) << "quality"
166  << "\n";
167 
168  for (; value != valueEnd; ++value, ++error, ++quality) {
169  s << std::setw(12) << *value << std::setw(12) << *error << std::setw(12) << *quality << "\n";
170  }
171  s << "\n";
172  }
173  s << "beam 1 intensities:\n";
174  std::vector<float> const& beam1Intensities = lumiDetails.lumiBeam1Intensities();
175  for (std::vector<float>::const_iterator intensity = beam1Intensities.begin(), iEnd = beam1Intensities.end();
176  intensity != iEnd;
177  ++intensity) {
178  s << *intensity << "\n";
179  }
180  s << "\nbeam 2 intensities:\n";
181  std::vector<float> const& beam2Intensities = lumiDetails.lumiBeam2Intensities();
182  for (std::vector<float>::const_iterator intensity = beam2Intensities.begin(), iEnd = beam2Intensities.end();
183  intensity != iEnd;
184  ++intensity) {
185  s << *intensity << "\n";
186  }
187  s << "\n";
188  return s;
189 }
uint32_t const *__restrict__ Quality * quality
unsigned int AlgoType
Definition: LumiDetails.h:27

Variable Documentation

std::vector<std::string> const s_dipalgoNames = {{"DIP"}}
static

Definition at line 18 of file LumiDetails.cc.

Referenced by LumiDetails::dipalgoNames().