CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_6/src/DataFormats/Scalers/interface/L1TriggerScalers.h

Go to the documentation of this file.
00001 /*
00002  *  File: DataFormats/Scalers/interface/L1TriggerScalers.h   (W.Badgett)
00003  *
00004  *  Various Level 1 Trigger Scalers from the GT/TS
00005  *
00006  */
00007 
00008 #ifndef DATAFORMATS_SCALERS_L1TRIGGERSCALERS_H
00009 #define DATAFORMATS_SCALERS_L1TRIGGERSCALERS_H
00010 
00011 #include "DataFormats/Scalers/interface/TimeSpec.h"
00012 
00013 #include <ctime>
00014 #include <iosfwd>
00015 #include <string>
00016 #include <vector>
00017 
00026 
00027 
00028 
00029 class L1TriggerScalers
00030 {
00031  public:
00032 
00033   enum 
00034   {
00035     nL1Triggers          = 128,
00036     nL1TestTriggers      = 64
00037   };
00038 
00039   L1TriggerScalers();
00040   L1TriggerScalers(const unsigned char * rawData);
00041   virtual ~L1TriggerScalers();
00042 
00044   std::string name() const { return "L1TriggerScalers"; }
00045 
00047   bool empty() const { return false; }
00048 
00049   // Data accessor methods
00050   int version() const { return(version_);}
00051 
00052   unsigned int trigType() const            { return(trigType_);}
00053   unsigned int eventID() const             { return(eventID_);}
00054   unsigned int sourceID() const            { return(sourceID_);}
00055   unsigned int bunchNumber() const         { return(bunchNumber_);}
00056 
00057   timespec collectionTimeSpecial() const
00058   { return(collectionTimeSpecial_.get_timespec());}
00059 
00060   unsigned int orbitNumber() const           
00061   { return(orbitNumber_);}
00062   unsigned int luminositySection() const           
00063   { return(luminositySection_);}
00064   unsigned int bunchCrossingErrors() const           
00065   { return(bunchCrossingErrors_);}
00066 
00067   timespec collectionTimeSummary() const 
00068   { return(collectionTimeSummary_.get_timespec());}
00069 
00070   unsigned int triggerNumber() const         
00071   { return(triggerNumber_);}
00072   unsigned int eventNumber() const           
00073   { return(eventNumber_);}
00074   unsigned int finalTriggersDistributed() const      
00075   { return(finalTriggersDistributed_);}
00076   unsigned int calibrationTriggers() const  
00077   { return(calibrationTriggers_);}
00078   unsigned int randomTriggers() const       
00079   { return(randomTriggers_);}
00080   unsigned int totalTestTriggers() const
00081   { return(totalTestTriggers_);}
00082   unsigned int finalTriggersGenerated() const   
00083   { return(finalTriggersGenerated_);}
00084   unsigned int finalTriggersInvalidBC() const   
00085   { return(finalTriggersInvalidBC_);}
00086 
00087   unsigned long long deadTime() const              
00088   { return(deadTime_);}
00089   unsigned long long lostFinalTriggers() const
00090   { return(lostFinalTriggers_);}
00091   unsigned long long deadTimeActive() const        
00092   { return(deadTimeActive_);}
00093   unsigned long long lostFinalTriggersActive() const
00094   { return(lostFinalTriggersActive_);}
00095 
00096   unsigned long long deadTimeActivePrivate() const   
00097   { return(deadTimeActivePrivate_);}
00098   unsigned long long deadTimeActivePartition() const 
00099   { return(deadTimeActivePartition_);}
00100   unsigned long long deadTimeActiveThrottle() const
00101   { return(deadTimeActiveThrottle_);}
00102   unsigned long long deadTimeActiveCalibration() const
00103   { return(deadTimeActiveCalibration_);}
00104   unsigned long long deadTimeActiveTimeSlot() const
00105   { return(deadTimeActiveTimeSlot_);}
00106   unsigned int numberResets() const          
00107   { return(numberResets_);}
00108 
00109   timespec collectionTimeDetails() const
00110   { return(collectionTimeDetails_.get_timespec());}
00111 
00112   std::vector<unsigned int> triggers() const 
00113   { return(triggers_);}
00114 
00115   std::vector<unsigned int> testTriggers() const
00116   { return(testTriggers_);}
00117 
00119   int operator==(const L1TriggerScalers& e) const { return false; }
00120 
00122   int operator!=(const L1TriggerScalers& e) const { return false; }
00123 
00124 protected:
00125   int version_;
00126 
00127   unsigned int trigType_;
00128   unsigned int eventID_;
00129   unsigned int sourceID_;
00130   unsigned int bunchNumber_;
00131 
00132   TimeSpec           collectionTimeSpecial_;
00133   unsigned int       orbitNumber_;
00134   unsigned int       luminositySection_;
00135   unsigned short     bunchCrossingErrors_;
00136 
00137   TimeSpec           collectionTimeSummary_;
00138   unsigned int       triggerNumber_;
00139   unsigned int       eventNumber_;
00140   unsigned int       finalTriggersDistributed_;
00141   unsigned int       calibrationTriggers_;
00142   unsigned int       randomTriggers_;
00143   unsigned int       totalTestTriggers_;
00144   unsigned int       finalTriggersGenerated_;
00145   unsigned int       finalTriggersInvalidBC_;
00146   unsigned long long deadTime_;
00147   unsigned long long lostFinalTriggers_;
00148   unsigned long long deadTimeActive_;
00149   unsigned long long lostFinalTriggersActive_;
00150   unsigned long long deadTimeActivePrivate_;
00151   unsigned long long deadTimeActivePartition_;
00152   unsigned long long deadTimeActiveThrottle_;
00153   unsigned long long deadTimeActiveCalibration_;
00154   unsigned long long deadTimeActiveTimeSlot_;
00155   unsigned int       numberResets_;
00156 
00157   TimeSpec collectionTimeDetails_;
00158   std::vector<unsigned int> triggers_;
00159   std::vector<unsigned int> testTriggers_;
00160 };
00161 
00162 
00164 std::ostream& operator<<(std::ostream& s, const L1TriggerScalers& c);
00165 
00166 typedef std::vector<L1TriggerScalers> L1TriggerScalersCollection;
00167 
00168 #endif