Go to the documentation of this file.00001 #ifndef DTNoiseTest_H
00002 #define DTNoiseTest_H
00003
00004
00005
00019 #include "FWCore/Framework/interface/Frameworkfwd.h"
00020 #include <FWCore/Framework/interface/EDAnalyzer.h>
00021 #include <FWCore/Framework/interface/ESHandle.h>
00022 #include <DataFormats/Common/interface/Handle.h>
00023 #include <FWCore/Framework/interface/Event.h>
00024 #include <FWCore/Framework/interface/MakerMacros.h>
00025 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00026 #include <FWCore/Framework/interface/LuminosityBlock.h>
00027
00028 #include "DQMServices/Core/interface/DQMStore.h"
00029 #include "DQMServices/Core/interface/MonitorElement.h"
00030 #include "FWCore/ServiceRegistry/interface/Service.h"
00031
00032 #include <CondFormats/DTObjects/interface/DTTtrig.h>
00033 #include <CondFormats/DataRecord/interface/DTTtrigRcd.h>
00034
00035 #include <CondFormats/DataRecord/interface/DTStatusFlagRcd.h>
00036 #include <CondFormats/DTObjects/interface/DTStatusFlag.h>
00037
00038
00039 #include <memory>
00040 #include <iostream>
00041 #include <fstream>
00042 #include <string>
00043 #include <vector>
00044 #include <map>
00045
00046 class DTGeometry;
00047 class DTChamberId;
00048 class DTSuperLayerId;
00049 class DTLayerId ;
00050 class DTWireId;
00051
00052 class DTNoiseTest: public edm::EDAnalyzer{
00053
00054 public:
00055
00057 DTNoiseTest(const edm::ParameterSet& ps);
00058
00060 virtual ~DTNoiseTest();
00061
00062 protected:
00063
00065 void beginJob();
00066
00068 void beginRun(const edm::Run& r, const edm::EventSetup& c);
00069
00071 void analyze(const edm::Event& e, const edm::EventSetup& c);
00072
00074 void endJob();
00075
00077 void bookHistos(const DTChamberId & ch, std::string folder, std::string histoTag);
00078 void bookHistos(const DTLayerId & ch, int nWire,std::string folder, std::string histoTag);
00079
00081 std::string getMEName(const DTChamberId & ch);
00082 std::string getMEName(const DTLayerId & ly);
00083
00084
00085
00086 void beginLuminosityBlock(edm::LuminosityBlock const& lumiSeg, edm::EventSetup const& context) ;
00087
00089 void endLuminosityBlock(edm::LuminosityBlock const& lumiSeg, edm::EventSetup const& c);
00090
00091
00092
00093
00094 private:
00095
00096 bool debug;
00097 int updates;
00098 unsigned int nLumiSegs;
00099 int prescaleFactor;
00100 int run;
00101
00102 DQMStore* dbe;
00103
00104 edm::ParameterSet parameters;
00105 edm::ESHandle<DTGeometry> muonGeom;
00106 edm::ESHandle<DTTtrig> tTrigMap;
00107
00108
00109
00110
00111 std::vector<DTWireId> theNoisyChannels;
00112
00113
00114
00115 std::map<std::string, std::map<uint32_t, MonitorElement*> > histos;
00116
00117 };
00118
00119 #endif