00001 #ifndef EDMtoMEConverter_h
00002 #define EDMtoMEConverter_h
00003
00014
00015 #include "FWCore/Framework/interface/EDAnalyzer.h"
00016 #include "FWCore/Framework/interface/Frameworkfwd.h"
00017 #include "FWCore/Framework/interface/Event.h"
00018 #include "FWCore/Framework/interface/Run.h"
00019 #include "FWCore/Framework/interface/LuminosityBlock.h"
00020 #include "FWCore/Framework/interface/FileBlock.h"
00021 #include "FWCore/Framework/interface/EventSetup.h"
00022 #include "DataFormats/Common/interface/Handle.h"
00023 #include "FWCore/Framework/interface/ESHandle.h"
00024 #include "FWCore/Framework/interface/MakerMacros.h"
00025 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00026 #include "FWCore/MessageLogger/interface/MessageLogger.h"
00027
00028
00029 #include "DQMServices/Core/interface/DQMStore.h"
00030 #include "FWCore/ServiceRegistry/interface/Service.h"
00031 #include "DQMServices/Core/interface/MonitorElement.h"
00032
00033
00034 #include "DataFormats/Histograms/interface/MEtoEDMFormat.h"
00035
00036
00037 #include <iostream>
00038 #include <stdlib.h>
00039 #include <string>
00040 #include <memory>
00041 #include <vector>
00042 #include <map>
00043
00044 #include "TString.h"
00045 #include "TH1F.h"
00046 #include "TH1S.h"
00047
00048 #include "classlib/utils/StringList.h"
00049 #include "classlib/utils/StringOps.h"
00050
00051 using namespace lat;
00052
00053 class EDMtoMEConverter : public edm::EDAnalyzer
00054 {
00055
00056 public:
00057
00058 explicit EDMtoMEConverter(const edm::ParameterSet&);
00059 virtual ~EDMtoMEConverter();
00060 virtual void beginJob(const edm::EventSetup&);
00061 virtual void endJob();
00062 virtual void analyze(const edm::Event&, const edm::EventSetup&);
00063 virtual void beginRun(const edm::Run&, const edm::EventSetup&);
00064 virtual void endRun(const edm::Run&, const edm::EventSetup&);
00065 virtual void beginLuminosityBlock(const edm::LuminosityBlock&, const edm::EventSetup&);
00066 virtual void endLuminosityBlock(const edm::LuminosityBlock&, const edm::EventSetup&);
00067 virtual void respondToOpenInputFile(const edm::FileBlock&);
00068
00069 virtual void convert(const edm::Run&, const bool endrun);
00070
00071 typedef std::vector<uint32_t> TagList;
00072
00073 private:
00074
00075 std::string name;
00076 int verbosity;
00077 int frequency;
00078
00079 bool convertOnEndLumi;
00080 bool convertOnEndRun;
00081
00082 int prescaleFactor;
00083
00084 DQMStore *dbe;
00085 std::vector<MonitorElement*> me1, me2, me3, me4, me5, me6, me7, me8;
00086
00087
00088 bool releaseTag;
00089
00090
00091 unsigned int countf;
00092 std::map<int,int> count;
00093
00094 std::vector<std::string> classtypes;
00095
00096 };
00097
00098 #endif
00099
00100