CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Classes | Typedefs | Functions
L1TriggerScalers.h File Reference
#include "DataFormats/Scalers/interface/TimeSpec.h"
#include <ctime>
#include <iosfwd>
#include <string>
#include <vector>

Go to the source code of this file.

Classes

class  L1TriggerScalers
 

Typedefs

typedef std::vector
< L1TriggerScalers
L1TriggerScalersCollection
 

Functions

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

Detailed Description

file for Level 1 Global Trigger Scalers

Author
: William Badgett

Definition in file L1TriggerScalers.h.

Typedef Documentation

Definition at line 166 of file L1TriggerScalers.h.

Function Documentation

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

Pretty-print operator for L1TriggerScalers.

Definition at line 109 of file L1TriggerScalers.cc.

References L1TriggerScalers::bunchCrossingErrors(), L1TriggerScalers::bunchNumber(), L1TriggerScalers::calibrationTriggers(), L1TriggerScalers::collectionTimeDetails(), L1TriggerScalers::collectionTimeSpecial(), L1TriggerScalers::collectionTimeSummary(), L1TriggerScalers::deadTime(), L1TriggerScalers::deadTimeActive(), L1TriggerScalers::deadTimeActiveCalibration(), L1TriggerScalers::deadTimeActivePartition(), L1TriggerScalers::deadTimeActivePrivate(), L1TriggerScalers::deadTimeActiveThrottle(), L1TriggerScalers::eventID(), L1TriggerScalers::eventNumber(), L1TriggerScalers::finalTriggersDistributed(), L1TriggerScalers::finalTriggersGenerated(), L1TriggerScalers::finalTriggersInvalidBC(), i, geometryCSVtoXML::line, L1TriggerScalers::lostFinalTriggers(), L1TriggerScalers::lostFinalTriggersActive(), L1TriggerScalers::luminositySection(), L1TriggerScalers::numberResets(), L1TriggerScalers::randomTriggers(), alignCSCRings::s, L1TriggerScalers::sourceID(), L1TriggerScalers::testTriggers(), L1TriggerScalers::totalTestTriggers(), L1TriggerScalers::triggerNumber(), hltExoticaPostProcessors_cff::triggers, L1TriggerScalers::triggers(), L1TriggerScalers::trigType(), and L1TriggerScalers::version().

110 {
111  s << "L1TriggerScalers Version:" << c.version() <<
112  " SourceID: " << c.sourceID() << std::endl;
113  char line[128];
114  char zeitHeaven[128];
115  char zeitHell[128];
116  char zeitLimbo[128];
117  struct tm * horaHeaven;
118  struct tm * horaHell;
119  struct tm * horaLimbo;
120 
121  sprintf(line, " TrigType: %d EventID: %d BunchNumber: %d",
122  c.trigType(), c.eventID(), c.bunchNumber());
123  s << line << std::endl;
124 
125  timespec secondsToHeaven = c.collectionTimeSummary();
126  horaHeaven = gmtime(&secondsToHeaven.tv_sec);
127  strftime(zeitHeaven, sizeof(zeitHeaven), "%Y.%m.%d %H:%M:%S", horaHeaven);
128  sprintf(line, " CollectionTimeSummary: %s.%9.9d" ,
129  zeitHeaven, (int)secondsToHeaven.tv_nsec);
130  s << line << std::endl;
131 
132  timespec secondsToHell= c.collectionTimeSpecial();
133  horaHell = gmtime(&secondsToHell.tv_sec);
134  strftime(zeitHell, sizeof(zeitHell), "%Y.%m.%d %H:%M:%S", horaHell);
135  sprintf(line, " CollectionTimeSpecial: %s.%9.9d" ,
136  zeitHell, (int)secondsToHell.tv_nsec);
137  s << line << std::endl;
138 
139  timespec secondsToLimbo= c.collectionTimeDetails();
140  horaLimbo = gmtime(&secondsToLimbo.tv_sec);
141  strftime(zeitLimbo, sizeof(zeitLimbo), "%Y.%m.%d %H:%M:%S", horaLimbo);
142  sprintf(line, " CollectionTimeDetails: %s.%9.9d" ,
143  zeitLimbo, (int)secondsToLimbo.tv_nsec);
144  s << line << std::endl;
145 
146  sprintf(line,
147  " LuminositySection: %15d BunchCrossingErrors: %15d",
149  s << line << std::endl;
150 
151  sprintf(line,
152  " TriggerNumber: %15d EventNumber: %15d",
153  c.triggerNumber(), c.eventNumber());
154  s << line << std::endl;
155 
156  sprintf(line,
157  " TriggersDistributed: %10d TriggersGenerated: %15d",
160  s << line << std::endl;
161 
162  sprintf(line,
163  " TriggersInvalidBC: %15d CalibrationTriggers: %15d",
165  s << line << std::endl;
166 
167  sprintf(line,
168  " TestTriggers: %15d RandomTriggers: %15d",
170  s << line << std::endl;
171 
172  sprintf(line,
173  " DeadTime: %15d DeadTimeActiveTimeSlot: %15ld",
174  c.numberResets(), (long int)c.deadTime());
175  s << line << std::endl;
176 
177  sprintf(line,
178  " DeadTimeActive: %15ld DeadTimeActiveCalibration:%15ld",
179  (long int)c.deadTimeActive(),
180  (long int)c.deadTimeActiveCalibration());
181  s << line << std::endl;
182 
183  sprintf(line,
184  " LostTriggers: %15ld DeadTimeActivePartition: %15ld",
185  (long int)c.lostFinalTriggers(),
186  (long int)c.deadTimeActivePartition());
187  s << line << std::endl;
188 
189  sprintf(line,
190  " LostTriggersActive:%15ld DeadTimeActiveThrottle: %15ld",
191  (long int)c.lostFinalTriggersActive(),
192  (long int)c.deadTimeActiveThrottle());
193  s << line << std::endl;
194 
195  sprintf(line,
196  " NumberResets: %15d DeadTimeActivePrivate: %15ld",
197  c.numberResets(),
198  (long int)c.deadTimeActivePrivate());
199  s << line << std::endl;
200 
201  s << "Physics Triggers" << std::endl;
202  std::vector<unsigned int> triggers = c.triggers();
203  int length = triggers.size() / 4;
204  for ( int i=0; i<length; i++)
205  {
206  sprintf(line," %3.3d: %10d %3.3d: %10d %3.3d: %10d %3.3d: %10d",
207  i, triggers[i],
208  (i+length), triggers[i+length],
209  (i+(length*2)), triggers[i+(length*2)],
210  (i+(length*3)), triggers[i+(length*3)]);
211  s << line << std::endl;
212  }
213 
214  s << "Test Triggers" << std::endl;
215  std::vector<unsigned int> testTriggers = c.testTriggers();
216  length = testTriggers.size() / 4;
217  for ( int i=0; i<length; i++)
218  {
219  sprintf(line," %3.3d: %10d %3.3d: %10d %3.3d: %10d %3.3d: %10d",
220  i, testTriggers[i],
221  (i+length), testTriggers[i+length],
222  (i+(length*2)), testTriggers[i+(length*2)],
223  (i+(length*3)), testTriggers[i+(length*3)]);
224  s << line << std::endl;
225  }
226  return s;
227 }
int i
Definition: DBlmapReader.cc:9
unsigned long long deadTimeActivePartition() const
unsigned long long lostFinalTriggers() const
unsigned int eventNumber() const
timespec collectionTimeSpecial() const
timespec collectionTimeSummary() const
unsigned int numberResets() const
unsigned int eventID() const
unsigned int totalTestTriggers() const
unsigned int triggerNumber() const
unsigned long long deadTimeActiveThrottle() const
unsigned int randomTriggers() const
unsigned long long deadTimeActive() const
unsigned long long lostFinalTriggersActive() const
std::vector< unsigned int > testTriggers() const
unsigned long long deadTimeActiveCalibration() const
timespec collectionTimeDetails() const
unsigned long long deadTime() const
unsigned int sourceID() const
unsigned int finalTriggersDistributed() const
unsigned int finalTriggersGenerated() const
unsigned int bunchNumber() const
unsigned int luminositySection() const
unsigned int trigType() const
unsigned int bunchCrossingErrors() const
std::vector< unsigned int > triggers() const
unsigned int calibrationTriggers() const
int version() const
unsigned int finalTriggersInvalidBC() const
unsigned long long deadTimeActivePrivate() const