CMS 3D CMS Logo

Classes | Typedefs | Functions
LumiScalers.h File Reference
#include "DataFormats/Scalers/interface/TimeSpec.h"
#include <ctime>
#include <iosfwd>
#include <vector>
#include <string>

Go to the source code of this file.

Classes

class  LumiScalers
 

Typedefs

typedef std::vector< LumiScalersLumiScalersCollection
 

Functions

std::ostream & operator<< (std::ostream &s, const LumiScalers &c)
 Pretty-print operator for LumiScalers. More...
 

Detailed Description

\Header file for HF Lumi Scalers

Author
: William Badgett

Definition in file LumiScalers.h.

Typedef Documentation

◆ LumiScalersCollection

typedef std::vector<LumiScalers> LumiScalersCollection

Definition at line 144 of file LumiScalers.h.

Function Documentation

◆ operator<<()

std::ostream& operator<< ( std::ostream &  s,
const LumiScalers c 
)

Pretty-print operator for LumiScalers.

Definition at line 124 of file LumiScalers.cc.

124  {
125  char zeit[128];
126  constexpr size_t kLineBufferSize = 157;
127  char line[kLineBufferSize];
128  struct tm* hora;
129 
130  s << "LumiScalers Version: " << c.version() << " SourceID: " << c.sourceID() << std::endl;
131 
132  timespec ts = c.collectionTime();
133  hora = gmtime(&ts.tv_sec);
134  strftime(zeit, sizeof(zeit), "%Y.%m.%d %H:%M:%S", hora);
135  snprintf(line, kLineBufferSize, " CollectionTime: %s.%9.9d", zeit, (int)ts.tv_nsec);
136  s << line << std::endl;
137 
138  snprintf(line,
139  kLineBufferSize,
140  " TrigType: %d EventID: %d BunchNumber: %d",
141  c.trigType(),
142  c.eventID(),
143  c.bunchNumber());
144  s << line << std::endl;
145 
146  snprintf(line,
147  kLineBufferSize,
148  " SectionNumber: %10d StartOrbit: %10d NumOrbits: %10d",
149  c.sectionNumber(),
150  c.startOrbit(),
151  c.numOrbits());
152  s << line << std::endl;
153 
154  snprintf(line,
155  kLineBufferSize,
156  " Normalization: %e DeadTimeNormalization: %e",
157  c.normalization(),
158  c.deadTimeNormalization());
159  s << line << std::endl;
160 
161  // Integrated Luminosity
162 
163  snprintf(line, kLineBufferSize, " LumiFill: %e LumiRun: %e", c.lumiFill(), c.lumiRun());
164  s << line << std::endl;
165  snprintf(
166  line, kLineBufferSize, " LiveLumiFill: %e LiveLumiRun: %e", c.liveLumiFill(), c.liveLumiRun());
167  s << line << std::endl;
168 
169  snprintf(line, kLineBufferSize, " LumiETFill: %e LumiETRun: %e", c.lumiFill(), c.lumiRun());
170  s << line << std::endl;
171 
172  snprintf(
173  line, kLineBufferSize, " LiveLumiETFill: %e LiveLumETiRun: %e", c.liveLumiETFill(), c.liveLumiETRun());
174  s << line << std::endl;
175 
176  int length = c.instantOccLumi().size();
177  for (int i = 0; i < length; i++) {
178  snprintf(line,
179  kLineBufferSize,
180  " LumiOccFill[%d]: %e LumiOccRun[%d]: %e",
181  i,
182  c.lumiOccFill()[i],
183  i,
184  c.lumiOccRun()[i]);
185  s << line << std::endl;
186 
187  snprintf(line,
188  kLineBufferSize,
189  " LiveLumiOccFill[%d]: %e LiveLumiOccRun[%d]: %e",
190  i,
191  c.liveLumiOccFill()[i],
192  i,
193  c.liveLumiOccRun()[i]);
194  s << line << std::endl;
195  }
196 
197  // Instantaneous Luminosity
198 
199  snprintf(line,
200  kLineBufferSize,
201  " InstantLumi: %e Err: %e Qlty: %d",
202  c.instantLumi(),
203  c.instantLumiErr(),
204  c.instantLumiQlty());
205  s << line << std::endl;
206 
207  snprintf(line,
208  kLineBufferSize,
209  " InstantETLumi: %e Err: %e Qlty: %d",
210  c.instantETLumi(),
211  c.instantETLumiErr(),
212  c.instantETLumiQlty());
213  s << line << std::endl;
214 
215  for (int i = 0; i < length; i++) {
216  snprintf(line,
217  kLineBufferSize,
218  " InstantOccLumi[%d]: %e Err: %e Qlty: %d",
219  i,
220  c.instantOccLumi()[i],
221  c.instantOccLumiErr()[i],
222  c.instantOccLumiQlty()[i]);
223  s << line << std::endl;
224  snprintf(line, kLineBufferSize, " LumiNoise[%d]: %e", i, c.lumiNoise()[i]);
225  s << line << std::endl;
226  }
227 
228  snprintf(line, kLineBufferSize, " Pileup: %f PileupRMS: %f", c.pileup(), c.pileupRMS());
229  s << line << std::endl;
230 
231  snprintf(line, kLineBufferSize, " BunchLumi: %f Spare: %f", c.bunchLumi(), c.spare());
232  s << line << std::endl;
233 
234  return s;
235 }

References HltBtagPostValidation_cff::c, mps_fire::i, mps_splice::line, and alignCSCRings::s.

mps_fire.i
i
Definition: mps_fire.py:355
alignCSCRings.s
s
Definition: alignCSCRings.py:92
HltBtagPostValidation_cff.c
c
Definition: HltBtagPostValidation_cff.py:31
mps_splice.line
line
Definition: mps_splice.py:76