CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_6_2_5/src/EventFilter/L1GlobalTriggerRawToDigi/interface/ConditionDumperInEdm.h

Go to the documentation of this file.
00001 #ifndef ConditionDumperInEdm_H
00002 #define ConditionDumperInEdm_H
00003 // -*- C++ -*-
00004 //
00005 // Package:    ConditionDumperInEdm
00006 // Class:      ConditionDumperInEdm
00007 // 
00015 //
00016 // Original Author:  Jean-Roch Vlimant,40 3-A28,+41227671209,
00017 //         Created:  Thu Feb 11 19:46:28 CET 2010
00018 // $Id: ConditionDumperInEdm.h,v 1.4 2013/05/17 21:07:10 chrjones Exp $
00019 //
00020 //
00021 
00022 
00023 // system include files
00024 #include <memory>
00025 
00026 // user include files
00027 #include "FWCore/Framework/interface/Frameworkfwd.h"
00028 #include "FWCore/Framework/interface/one/EDProducer.h"
00029 
00030 #include "FWCore/Framework/interface/LuminosityBlock.h"
00031 #include "FWCore/Framework/interface/Run.h"
00032 #include "FWCore/Framework/interface/Event.h"
00033 #include "FWCore/Framework/interface/MakerMacros.h"
00034 
00035 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00036 
00037 #include "FWCore/Framework/interface/EventSetup.h"
00038 #include "FWCore/Framework/interface/ESHandle.h"
00039 
00040 #include "FWCore/Utilities/interface/InputTag.h"
00041 
00042 #include "DataFormats/Common/interface/ConditionsInEdm.h"
00043 
00044 //
00045 // class declaration
00046 //
00047 
00048 class ConditionDumperInEdm : public edm::one::EDProducer<edm::EndRunProducer,
00049                                                          edm::EndLuminosityBlockProducer> {
00050    public:
00051       explicit ConditionDumperInEdm(const edm::ParameterSet&);
00052       ~ConditionDumperInEdm();
00053 
00054    private:
00055       virtual void endLuminosityBlockProduce(edm::LuminosityBlock&, edm::EventSetup const&) override final;
00056       virtual void endRunProduce(edm::Run& , const edm::EventSetup&) override final;
00057       virtual void produce(edm::Event&, const edm::EventSetup&) override final;
00058 
00059   template <typename R, typename T>
00060   const T * get(const edm::EventSetup & setup) {
00061     edm::ESHandle<T> handle;
00062     setup.get<R>().get(handle);
00063     return handle.product();
00064   }
00065 
00066   // ----------member data ---------------------------
00067 
00068   edm::InputTag gtEvmDigisLabel_;
00069 
00070   edm::ConditionsInLumiBlock lumiBlock_;
00071   edm::ConditionsInRunBlock runBlock_;
00072   edm::ConditionsInEventBlock eventBlock_;
00073 
00074 };
00075 
00076 #endif