![]() |
![]() |
00001 #ifndef DUPLICATIONCHECKER_H 00002 #define DUPLICATIONCHECKER_H 00003 00004 /*class DuplicationChecker 00005 * 00006 * Class to monitor duplication of events 00007 * 00008 * $Date: 2010/05/25 16:50:50 $ 00009 * $Revision: 1.1 $ 00010 * 00011 */ 00012 00013 // framework & common header files 00014 #include "FWCore/Framework/interface/EDAnalyzer.h" 00015 #include "FWCore/Framework/interface/Event.h" 00016 #include "FWCore/Framework/interface/EventSetup.h" 00017 #include "FWCore/Framework/interface/Run.h" 00018 00019 #include "DataFormats/Common/interface/Handle.h" 00020 #include "FWCore/Framework/interface/ESHandle.h" 00021 #include "FWCore/ParameterSet/interface/ParameterSet.h" 00022 #include "FWCore/Utilities/interface/InputTag.h" 00023 00024 //DQM services 00025 #include "DQMServices/Core/interface/DQMStore.h" 00026 #include "FWCore/ServiceRegistry/interface/Service.h" 00027 #include "DQMServices/Core/interface/MonitorElement.h" 00028 00029 #include "FWCore/MessageLogger/interface/MessageLogger.h" 00030 00031 #include <map> 00032 #include <vector> 00033 00034 #include "SimDataFormats/GeneratorProducts/interface/HepMCProduct.h" 00035 #include "SimDataFormats/GeneratorProducts/interface/LHEEventProduct.h" 00036 #include "DataFormats/Provenance/interface/EventID.h" 00037 00038 class DuplicationChecker : public edm::EDAnalyzer 00039 { 00040 00041 public: 00042 00043 typedef std::multimap<double,edm::EventID> associationMap; 00044 typedef std::vector<associationMap::iterator> itemList; 00045 00046 explicit DuplicationChecker(const edm::ParameterSet&); 00047 virtual ~DuplicationChecker(); 00048 void beginJob(); 00049 void endJob(); 00050 void analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup); 00051 virtual void beginRun(const edm::Run&, const edm::EventSetup&){ return;} 00052 virtual void endRun(const edm::Run&, const edm::EventSetup&){ return;} 00053 void findValuesAssociatedWithKey(associationMap &mMap, double &key, itemList &theObjects); 00054 00055 private: 00056 00057 edm::InputTag generatedCollection_; 00058 00059 bool searchForLHE_; 00060 00061 associationMap xBjorkenHistory; 00062 00063 DQMStore *dbe; 00064 00065 MonitorElement* xBjorkenME; 00066 00067 }; 00068 00069 #endif