CMS 3D CMS Logo

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

◆ operator<<()

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 }
Definition: value.py:1
unsigned int AlgoType
Definition: LumiDetails.h:27
string quality