CMS 3D CMS Logo

L1TriggerScalers.cc File Reference

#include "DataFormats/Scalers/interface/L1TriggerScalers.h"
#include "DataFormats/Scalers/interface/ScalersRaw.h"
#include <iostream>
#include <time.h>

Go to the source code of this file.

Functions

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


Function Documentation

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

Pretty-print operator for L1TriggerScalers.

Definition at line 112 of file L1TriggerScalers.cc.

References L1TriggerScalers::bunchCrossingErrors(), L1TriggerScalers::bunchNumber(), L1TriggerScalers::calibrationTriggers(), L1TriggerScalers::collectionTimeDetails(), L1TriggerScalers::collectionTimeSummary(), L1TriggerScalers::deadTime(), L1TriggerScalers::deadTimeActive(), L1TriggerScalers::deadTimeActiveCalibration(), L1TriggerScalers::deadTimeActivePartition(), L1TriggerScalers::deadTimeActivePrivate(), L1TriggerScalers::deadTimeActiveThrottle(), lat::endl(), L1TriggerScalers::eventID(), L1TriggerScalers::eventNumber(), L1TriggerScalers::finalTriggersDistributed(), L1TriggerScalers::finalTriggersGenerated(), L1TriggerScalers::finalTriggersInvalidBC(), i, int, parsecf::pyparsing::line(), L1TriggerScalers::lostFinalTriggers(), L1TriggerScalers::lostFinalTriggersActive(), L1TriggerScalers::luminositySection(), L1TriggerScalers::numberResets(), L1TriggerScalers::randomTriggers(), L1TriggerScalers::sourceID(), L1TriggerScalers::testTriggers(), L1TriggerScalers::totalTestTriggers(), L1TriggerScalers::triggerNumber(), L1TriggerScalers::triggers(), L1TriggerScalers::trigType(), and L1TriggerScalers::version().

00113 {
00114   s << "L1TriggerScalers    Version:" << c.version() <<
00115     "   SourceID: " << c.sourceID() << std::endl;
00116   char line[128];
00117   char zeitHeaven[128];
00118   char zeitHell[128];
00119   char zeitLimbo[128];
00120   struct tm * horaHeaven;
00121   struct tm * horaHell;
00122   struct tm * horaLimbo;
00123 
00124   sprintf(line, " TrigType: %d   EventID: %d    BunchNumber: %d", 
00125           c.trigType(), c.eventID(), c.bunchNumber());
00126   s << line << std::endl;
00127 
00128   struct timespec secondsToHeaven = c.collectionTimeSummary();
00129   horaHeaven = gmtime(&secondsToHeaven.tv_sec);
00130   strftime(zeitHeaven, sizeof(zeitHeaven), "%Y.%m.%d %H:%M:%S", horaHeaven);
00131   sprintf(line, " CollectionTimeSummary: %s.%9.9d" , 
00132           zeitHeaven, (int)secondsToHeaven.tv_nsec);
00133   s << line << std::endl;
00134 
00135   struct timespec secondsToHell= c.collectionTimeDetails();
00136   horaHell = gmtime(&secondsToHell.tv_sec);
00137   strftime(zeitHell, sizeof(zeitHell), "%Y.%m.%d %H:%M:%S", horaHell);
00138   sprintf(line, " CollectionTimeDetails: %s.%9.9d" , 
00139           zeitHell, (int)secondsToHell.tv_nsec);
00140   s << line << std::endl;
00141 
00142   struct timespec secondsToLimbo= c.collectionTimeDetails();
00143   horaLimbo = gmtime(&secondsToLimbo.tv_sec);
00144   strftime(zeitLimbo, sizeof(zeitLimbo), "%Y.%m.%d %H:%M:%S", horaLimbo);
00145   sprintf(line, " CollectionTimeDetails: %s.%9.9d" , 
00146           zeitLimbo, (int)secondsToLimbo.tv_nsec);
00147   s << line << std::endl;
00148 
00149   sprintf(line,
00150           " LuminositySection: %15d  BunchCrossingErrors:      %15d",
00151           c.luminositySection(), c.bunchCrossingErrors());
00152   s << line << std::endl;
00153 
00154   sprintf(line,
00155           " TriggerNumber:     %15d  EventNumber:              %15d",
00156           c.triggerNumber(), c.eventNumber());
00157   s << line << std::endl;
00158 
00159   sprintf(line,
00160           " TriggersDistributed:    %10d  TriggersGenerated:        %15d",
00161           c.finalTriggersDistributed(), 
00162           c.finalTriggersGenerated());
00163   s << line << std::endl;
00164 
00165   sprintf(line,
00166           " TriggersInvalidBC: %15d  CalibrationTriggers:      %15d",
00167           c.finalTriggersInvalidBC(), c.calibrationTriggers());
00168   s << line << std::endl;
00169 
00170   sprintf(line,
00171           " TestTriggers:      %15d  RandomTriggers:           %15d",
00172           c.totalTestTriggers(), c.randomTriggers());
00173   s << line << std::endl;
00174 
00175   sprintf(line,
00176           " DeadTime:          %15d  DeadTimeActiveTimeSlot:   %15ld",
00177           c.numberResets(), (long int)c.deadTime());
00178   s << line << std::endl;
00179 
00180   sprintf(line,
00181           " DeadTimeActive:    %15ld  DeadTimeActiveCalibration:%15ld",
00182           (long int)c.deadTimeActive(), 
00183           (long int)c.deadTimeActiveCalibration());
00184   s << line << std::endl;
00185 
00186   sprintf(line,
00187           " LostTriggers:      %15ld  DeadTimeActivePartition:  %15ld",
00188           (long int)c.lostFinalTriggers(), 
00189           (long int)c.deadTimeActivePartition());
00190   s << line << std::endl;
00191 
00192   sprintf(line,
00193           " LostTriggersActive:%15ld  DeadTimeActiveThrottle:   %15ld",
00194           (long int)c.lostFinalTriggersActive(),
00195           (long int)c.deadTimeActiveThrottle());
00196   s << line << std::endl;
00197 
00198   sprintf(line,
00199           " NumberResets:      %15d  DeadTimeActivePrivate:    %15ld",
00200           c.numberResets(),
00201           (long int)c.deadTimeActivePrivate());
00202   s << line << std::endl;
00203 
00204   s << "Physics Triggers" << std::endl;
00205   std::vector<unsigned int> triggers = c.triggers();
00206   int length = triggers.size() / 4;
00207   for ( int i=0; i<length; i++)
00208   {
00209     sprintf(line," %3.3d: %10d    %3.3d: %10d    %3.3d: %10d    %3.3d: %10d",
00210             i,              triggers[i], 
00211             (i+length),     triggers[i+length], 
00212             (i+(length*2)), triggers[i+(length*2)], 
00213             (i+(length*3)), triggers[i+(length*3)]);
00214     s << line << std::endl;
00215   }
00216 
00217   s << "Test Triggers" << std::endl;
00218   std::vector<unsigned int> testTriggers = c.testTriggers();
00219   length = testTriggers.size() / 4;
00220   for ( int i=0; i<length; i++)
00221   {
00222     sprintf(line," %3.3d: %10d    %3.3d: %10d    %3.3d: %10d    %3.3d: %10d",
00223             i,              testTriggers[i], 
00224             (i+length),     testTriggers[i+length], 
00225             (i+(length*2)), testTriggers[i+(length*2)], 
00226             (i+(length*3)), testTriggers[i+(length*3)]);
00227     s << line << std::endl;
00228   }
00229   return s;
00230 }


Generated on Tue Jun 9 17:52:16 2009 for CMSSW by  doxygen 1.5.4