00001 #ifndef PhysicsTools_StarterKit_PatAnalyzerSkeleton_h 00002 #define PhysicsTools_StarterKit_PatAnalyzerSkeleton_h 00003 00004 // -*- C++ -*- 00005 // 00006 // Package: PatAlgos 00007 // Class: PatAnalyzerSkeleton 00008 // 00017 // 00018 // Original Author: Freya Blekman 00019 // Created: Mon Apr 21 10:03:50 CEST 2008 00020 // $Id: PatAnalyzerSkeleton.h,v 1.1 2008/06/04 15:04:33 srappocc Exp $ 00021 // 00022 // 00023 00024 00025 // system include files 00026 #include <memory> 00027 00028 // user include files 00029 #include "FWCore/Framework/interface/Frameworkfwd.h" 00030 #include "FWCore/Framework/interface/EDAnalyzer.h" 00031 00032 #include "FWCore/Framework/interface/Event.h" 00033 #include "FWCore/Framework/interface/MakerMacros.h" 00034 00035 #include "FWCore/ParameterSet/interface/ParameterSet.h" 00036 #include "FWCore/ServiceRegistry/interface/Service.h" 00037 #include "PhysicsTools/UtilAlgos/interface/TFileService.h" 00038 #include "FWCore/ParameterSet/interface/InputTag.h" 00039 00040 00041 #include "DataFormats/PatCandidates/interface/Muon.h" 00042 #include "DataFormats/PatCandidates/interface/Jet.h" 00043 #include "DataFormats/PatCandidates/interface/Electron.h" 00044 #include "DataFormats/PatCandidates/interface/Tau.h" 00045 #include "DataFormats/PatCandidates/interface/Photon.h" 00046 #include "DataFormats/PatCandidates/interface/MET.h" 00047 00048 #include "TH1D.h" 00049 #include <map> 00050 00051 #include "DataFormats/Common/interface/View.h" 00052 #include <string> 00053 // 00054 // class decleration 00055 // 00056 00057 class PatAnalyzerSkeleton : public edm::EDAnalyzer { 00058 public: 00059 explicit PatAnalyzerSkeleton(const edm::ParameterSet&); 00060 ~PatAnalyzerSkeleton(); 00061 00062 00063 private: 00064 virtual void beginJob(const edm::EventSetup&) ; 00065 virtual void analyze(const edm::Event&, const edm::EventSetup&); 00066 virtual void endJob() ; 00067 00068 // ----------member data --------------------------- 00069 00070 00071 std::map<std::string,TH1D*> histocontainer_; // simple map to contain all histograms. Histograms are booked in the beginJob() method 00072 00073 edm::InputTag eleLabel_; 00074 edm::InputTag muoLabel_; 00075 edm::InputTag jetLabel_; 00076 edm::InputTag tauLabel_; 00077 edm::InputTag metLabel_; 00078 edm::InputTag phoLabel_; 00079 }; 00080 00081 #endif