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

file for HF Lumi Scalers

Author
: William Badgett

Definition in file LumiScalers.h.

Typedef Documentation

typedef std::vector<LumiScalers> LumiScalersCollection

Definition at line 160 of file LumiScalers.h.

Function Documentation

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

Pretty-print operator for LumiScalers.

Definition at line 142 of file LumiScalers.cc.

References LumiScalers::bunchLumi(), LumiScalers::bunchNumber(), LumiScalers::collectionTime(), LumiScalers::deadTimeNormalization(), LumiScalers::eventID(), i, LumiScalers::instantETLumi(), LumiScalers::instantETLumiErr(), LumiScalers::instantETLumiQlty(), LumiScalers::instantLumi(), LumiScalers::instantLumiErr(), LumiScalers::instantLumiQlty(), LumiScalers::instantOccLumi(), LumiScalers::instantOccLumiErr(), LumiScalers::instantOccLumiQlty(), geometryCSVtoXML::line, LumiScalers::liveLumiETFill(), LumiScalers::liveLumiETRun(), LumiScalers::liveLumiFill(), LumiScalers::liveLumiOccFill(), LumiScalers::liveLumiOccRun(), LumiScalers::liveLumiRun(), LumiScalers::lumiFill(), LumiScalers::lumiNoise(), LumiScalers::lumiOccFill(), LumiScalers::lumiOccRun(), LumiScalers::lumiRun(), LumiScalers::normalization(), LumiScalers::numOrbits(), LumiScalers::pileup(), LumiScalers::pileupRMS(), alignCSCRings::s, LumiScalers::sectionNumber(), LumiScalers::sourceID(), LumiScalers::spare(), LumiScalers::startOrbit(), LumiScalers::trigType(), and LumiScalers::version().

143 {
144  char zeit[128];
145  char line[128];
146  struct tm * hora;
147 
148  s << "LumiScalers Version: " << c.version() <<
149  " SourceID: "<< c.sourceID() << std::endl;
150 
151  timespec ts = c.collectionTime();
152  hora = gmtime(&ts.tv_sec);
153  strftime(zeit, sizeof(zeit), "%Y.%m.%d %H:%M:%S", hora);
154  sprintf(line, " CollectionTime: %s.%9.9d", zeit,
155  (int)ts.tv_nsec);
156  s << line << std::endl;
157 
158  sprintf(line, " TrigType: %d EventID: %d BunchNumber: %d",
159  c.trigType(), c.eventID(), c.bunchNumber());
160  s << line << std::endl;
161 
162  sprintf(line," SectionNumber: %10d StartOrbit: %10d NumOrbits: %10d",
163  c.sectionNumber(), c.startOrbit(), c.numOrbits());
164  s << line << std::endl;
165 
166  sprintf(line," Normalization: %e DeadTimeNormalization: %e",
168  s << line << std::endl;
169 
170  // Integrated Luminosity
171 
172  sprintf(line," LumiFill: %e LumiRun: %e",
173  c.lumiFill(), c.lumiRun());
174  s << line << std::endl;
175  sprintf(line," LiveLumiFill: %e LiveLumiRun: %e",
176  c.liveLumiFill(), c.liveLumiRun());
177  s << line << std::endl;
178 
179  sprintf(line," LumiETFill: %e LumiETRun: %e",
180  c.lumiFill(), c.lumiRun());
181  s << line << std::endl;
182 
183  sprintf(line," LiveLumiETFill: %e LiveLumETiRun: %e",
184  c.liveLumiETFill(), c.liveLumiETRun());
185  s << line << std::endl;
186 
187  int length = c.instantOccLumi().size();
188  for (int i=0; i<length; i++)
189  {
190  sprintf(line,
191  " LumiOccFill[%d]: %e LumiOccRun[%d]: %e",
192  i, c.lumiOccFill()[i], i, c.lumiOccRun()[i]);
193  s << line << std::endl;
194 
195  sprintf(line,
196  " LiveLumiOccFill[%d]: %e LiveLumiOccRun[%d]: %e",
197  i, c.liveLumiOccFill()[i], i, c.liveLumiOccRun()[i]);
198  s << line << std::endl;
199  }
200 
201  // Instantaneous Luminosity
202 
203  sprintf(line," InstantLumi: %e Err: %e Qlty: %d",
205  s << line << std::endl;
206 
207  sprintf(line," InstantETLumi: %e Err: %e Qlty: %d",
209  s << line << std::endl;
210 
211  for (int i=0; i<length; i++)
212  {
213  sprintf(line," InstantOccLumi[%d]: %e Err: %e Qlty: %d",
214  i, c.instantOccLumi()[i], c.instantOccLumiErr()[i],
215  c.instantOccLumiQlty()[i]);
216  s << line << std::endl;
217  sprintf(line," LumiNoise[%d]: %e", i, c.lumiNoise()[i]);
218  s << line << std::endl;
219  }
220 
221  sprintf(line," Pileup: %f PileupRMS: %f",
222  c.pileup(), c.pileupRMS());
223  s << line << std::endl;
224 
225  sprintf(line," BunchLumi: %f Spare: %f",
226  c.bunchLumi(), c.spare());
227  s << line << std::endl;
228 
229  return s;
230 }
int i
Definition: DBlmapReader.cc:9
std::vector< float > lumiOccFill() const
Definition: LumiScalers.h:75
unsigned int trigType() const
Definition: LumiScalers.h:48
unsigned char instantETLumiQlty() const
Definition: LumiScalers.h:73
unsigned int sectionNumber() const
Definition: LumiScalers.h:91
unsigned int bunchNumber() const
Definition: LumiScalers.h:51
int version() const
Definition: LumiScalers.h:53
float normalization() const
Definition: LumiScalers.h:55
float pileupRMS() const
Definition: LumiScalers.h:96
float instantETLumi() const
Definition: LumiScalers.h:71
std::vector< float > instantOccLumiErr() const
Definition: LumiScalers.h:85
float bunchLumi() const
Definition: LumiScalers.h:97
float pileup() const
Definition: LumiScalers.h:95
float instantLumi() const
Definition: LumiScalers.h:63
float liveLumiETRun() const
Definition: LumiScalers.h:70
float liveLumiRun() const
Definition: LumiScalers.h:62
unsigned int numOrbits() const
Definition: LumiScalers.h:93
float lumiFill() const
Definition: LumiScalers.h:59
timespec collectionTime() const
Definition: LumiScalers.h:54
float instantETLumiErr() const
Definition: LumiScalers.h:72
std::vector< float > lumiOccRun() const
Definition: LumiScalers.h:77
std::vector< float > lumiNoise() const
Definition: LumiScalers.h:89
std::vector< unsigned char > instantOccLumiQlty() const
Definition: LumiScalers.h:87
float liveLumiETFill() const
Definition: LumiScalers.h:69
float lumiRun() const
Definition: LumiScalers.h:60
unsigned int eventID() const
Definition: LumiScalers.h:49
float spare() const
Definition: LumiScalers.h:98
unsigned char instantLumiQlty() const
Definition: LumiScalers.h:65
float liveLumiFill() const
Definition: LumiScalers.h:61
unsigned int startOrbit() const
Definition: LumiScalers.h:92
float instantLumiErr() const
Definition: LumiScalers.h:64
unsigned int sourceID() const
Definition: LumiScalers.h:50
std::vector< float > instantOccLumi() const
Definition: LumiScalers.h:83
std::vector< float > liveLumiOccRun() const
Definition: LumiScalers.h:81
float deadTimeNormalization() const
Definition: LumiScalers.h:56
std::vector< float > liveLumiOccFill() const
Definition: LumiScalers.h:79