CMS 3D CMS Logo

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 const std::vector< std::string > s_dipalgoNames = {{"DIP"}}
 

Function Documentation

◆ operator<<()

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

Definition at line 144 of file LumiDetails.cc.

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 }

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.

Variable Documentation

◆ s_dipalgoNames

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

Definition at line 18 of file LumiDetails.cc.

Referenced by LumiDetails::dipalgoNames().

mps_fire.i
i
Definition: mps_fire.py:428
relativeConstraints.error
error
Definition: relativeConstraints.py:53
quality
const uint32_t *__restrict__ Quality * quality
Definition: CAHitNtupletGeneratorKernelsImpl.h:122
cmsdt::algo
algo
Definition: constants.h:171
alignCSCRings.s
s
Definition: alignCSCRings.py:92
value
Definition: value.py:1
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
relativeConstraints.value
value
Definition: relativeConstraints.py:53
LumiDetails::AlgoType
unsigned int AlgoType
Definition: LumiDetails.h:27