CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Classes | Functions
LumiDetails.h File Reference
#include <utility>
#include <vector>
#include <string>
#include <iosfwd>

Go to the source code of this file.

Classes

class  LumiDetails
 

Functions

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

Function Documentation

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

Definition at line 188 of file LumiDetails.cc.

References ExpressReco_HICollisions_FallBack::algo, LumiDetails::algoNames(), error, i, LumiDetails::lumiBeam1Intensities(), LumiDetails::lumiBeam2Intensities(), LumiDetails::lumiErrorsForAlgo(), LumiDetails::lumiQualitiesForAlgo(), LumiDetails::lumiValuesForAlgo(), LumiDetails::lumiVersion(), asciidump::s, and relativeConstraints::value.

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