00001 /* 00002 * File: DataFormats/Scalers/interface/LumiScalers.h (W.Badgett) 00003 * 00004 * Various Luminosity Scalers from the HF Lumi System 00005 * 00006 */ 00007 00008 #ifndef DATAFORMATS_SCALERS_LUMISCALERS_H 00009 #define DATAFORMATS_SCALERS_LUMISCALERS_H 00010 00011 #include "DataFormats/Scalers/interface/TimeSpec.h" 00012 00013 #include <ctime> 00014 #include <iosfwd> 00015 #include <vector> 00016 #include <string> 00017 00026 00027 00028 00029 class LumiScalers 00030 { 00031 public: 00032 00033 LumiScalers(); 00034 LumiScalers(const unsigned char * rawData); 00035 virtual ~LumiScalers(); 00036 00037 enum 00038 { 00039 nOcc = 2 00040 }; 00041 00043 std::string name() const { return "LumiScalers"; } 00044 00046 bool empty() const { return false; } 00047 00048 unsigned int trigType() const { return(trigType_);} 00049 unsigned int eventID() const { return(eventID_);} 00050 unsigned int sourceID() const { return(sourceID_);} 00051 unsigned int bunchNumber() const { return(bunchNumber_);} 00052 00053 int version() const { return(version_);} 00054 timespec collectionTime() const { return(collectionTime_.get_timespec());} 00055 float normalization() const { return(normalization_);} 00056 float deadTimeNormalization() const 00057 { return(deadTimeNormalization_);} 00058 00059 float lumiFill() const { return(lumiFill_);} 00060 float lumiRun() const { return(lumiRun_);} 00061 float liveLumiFill() const { return(liveLumiFill_);} 00062 float liveLumiRun() const { return(liveLumiRun_);} 00063 float instantLumi() const { return(instantLumi_);} 00064 float instantLumiErr() const { return(instantLumiErr_);} 00065 unsigned char instantLumiQlty() const { return(instantLumiQlty_);} 00066 00067 float lumiETFill() const { return(lumiETFill_);} 00068 float lumiETRun() const { return(lumiETRun_);} 00069 float liveLumiETFill() const { return(liveLumiETFill_);} 00070 float liveLumiETRun() const { return(liveLumiETRun_);} 00071 float instantETLumi() const { return(instantETLumi_);} 00072 float instantETLumiErr() const { return(instantETLumiErr_);} 00073 unsigned char instantETLumiQlty() const { return(instantETLumiQlty_);} 00074 00075 std::vector<float> lumiOccFill() const 00076 { return(lumiOccFill_);} 00077 std::vector<float> lumiOccRun() const 00078 { return(lumiOccRun_);} 00079 std::vector<float> liveLumiOccFill() const 00080 { return(liveLumiOccFill_);} 00081 std::vector<float> liveLumiOccRun() const 00082 { return(liveLumiOccRun_);} 00083 std::vector<float> instantOccLumi() const 00084 { return(instantOccLumi_);} 00085 std::vector<float> instantOccLumiErr() const 00086 { return(instantOccLumiErr_);} 00087 std::vector<unsigned char> instantOccLumiQlty() const 00088 { return(instantOccLumiQlty_);} 00089 std::vector<float> lumiNoise() const { return(lumiNoise_);} 00090 00091 unsigned int sectionNumber() const { return(sectionNumber_);} 00092 unsigned int startOrbit() const { return(startOrbit_);} 00093 unsigned int numOrbits() const { return(numOrbits_);} 00094 00095 float pileup() const { return(pileup_);} 00096 float pileupRMS() const { return(pileupRMS_);} 00097 float bunchLumi() const { return(bunchLumi_);} 00098 float spare() const { return(spare_);} 00099 00101 int operator==(const LumiScalers& e) const { return false; } 00102 00104 int operator!=(const LumiScalers& e) const { return false; } 00105 00106 protected: 00107 00108 unsigned int trigType_; 00109 unsigned int eventID_; 00110 unsigned int sourceID_; 00111 unsigned int bunchNumber_; 00112 00113 int version_; 00114 00115 TimeSpec collectionTime_; 00116 00117 float normalization_; 00118 float deadTimeNormalization_; 00119 00120 float lumiFill_; 00121 float lumiRun_; 00122 float liveLumiFill_; 00123 float liveLumiRun_; 00124 float instantLumi_; 00125 float instantLumiErr_; 00126 unsigned char instantLumiQlty_; 00127 00128 float lumiETFill_; 00129 float lumiETRun_; 00130 float liveLumiETFill_; 00131 float liveLumiETRun_; 00132 float instantETLumi_; 00133 float instantETLumiErr_; 00134 00135 unsigned char instantETLumiQlty_; 00136 00137 std::vector<float> lumiOccFill_; 00138 std::vector<float> lumiOccRun_; 00139 std::vector<float> liveLumiOccFill_; 00140 std::vector<float> liveLumiOccRun_; 00141 std::vector<float> instantOccLumi_; 00142 std::vector<float> instantOccLumiErr_; 00143 std::vector<unsigned char> instantOccLumiQlty_; 00144 std::vector<float> lumiNoise_; 00145 00146 unsigned int sectionNumber_; 00147 unsigned int startOrbit_; 00148 unsigned int numOrbits_; 00149 00150 float pileup_; 00151 float pileupRMS_; 00152 float bunchLumi_; 00153 float spare_; 00154 }; 00155 00156 00158 std::ostream& operator<<(std::ostream& s, const LumiScalers& c); 00159 00160 typedef std::vector<LumiScalers> LumiScalersCollection; 00161 00162 #endif