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 193 of file LumiDetails.cc.

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

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