CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros 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 192 of file LumiDetails.cc.

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

192  {
193 
194  s << "\nDumping LumiDetails\n";
195  s << std::setw(12) << "lumi version " << lumiDetails.lumiVersion() << "\n";
196  std::vector<std::string>::const_iterator algo;
197  std::vector<std::string>::const_iterator algoEnd;
198  if(lumiDetails.lumiVersion()!=std::string("DIP")){
199  algo = lumiDetails.algoNames().begin();
200  algoEnd = lumiDetails.algoNames().end();
201  }else{
202  algo = lumiDetails.dipalgoNames().begin();
203  algoEnd = lumiDetails.dipalgoNames().end();
204  }
206 
207  for( ; algo != algoEnd; ++algo, ++i) {
208 
209  std::vector<float>::const_iterator value = lumiDetails.lumiValuesForAlgo(i).first;
210  std::vector<float>::const_iterator valueEnd = lumiDetails.lumiValuesForAlgo(i).second;
211  std::vector<float>::const_iterator error = lumiDetails.lumiErrorsForAlgo(i).first;
212  std::vector<short>::const_iterator quality = lumiDetails.lumiQualitiesForAlgo(i).first;
213 
214  s << "algorithm: " << *algo << "\n";
215  s << std::setw(12) << "value"
216  << std::setw(12) << "error"
217  << std::setw(12) << "quality" << "\n";
218 
219  for( ; value != valueEnd; ++value, ++error, ++quality){
220  s << std::setw(12) << *value
221  << std::setw(12) << *error
222  << std::setw(12) << *quality << "\n";
223  }
224  s << "\n";
225  }
226  s << "beam 1 intensities:\n";
227  std::vector<float> const& beam1Intensities = lumiDetails.lumiBeam1Intensities();
228  for (std::vector<float>::const_iterator intensity = beam1Intensities.begin(),
229  iEnd = beam1Intensities.end();
230  intensity != iEnd; ++intensity) {
231  s << *intensity << "\n";
232  }
233  s << "\nbeam 2 intensities:\n";
234  std::vector<float> const& beam2Intensities = lumiDetails.lumiBeam2Intensities();
235  for (std::vector<float>::const_iterator intensity = beam2Intensities.begin(),
236  iEnd = beam2Intensities.end();
237  intensity != iEnd; ++intensity) {
238  s << *intensity << "\n";
239  }
240  s << "\n";
241  return s;
242 }
int i
Definition: DBlmapReader.cc:9
unsigned int AlgoType
Definition: LumiDetails.h:34

Variable Documentation

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

Definition at line 19 of file LumiDetails.cc.

Referenced by LumiDetails::dipalgoNames().