CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_2_9/src/DQM/HLTEvF/plugins/PathTimerInserter.cc

Go to the documentation of this file.
00001 #include "DQM/HLTEvF/interface/PathTimerInserter.h"
00002 #include "FWCore/Framework/interface/Event.h"
00003 #include "FWCore/ServiceRegistry/interface/Service.h"
00004 #include "DQM/HLTEvF/interface/PathTimerService.h"
00005 #include "DataFormats/HLTReco/interface/HLTPerformanceInfo.h"
00006 
00007 using namespace std;
00008 
00009 PathTimerInserter::PathTimerInserter(const edm::ParameterSet& pset)
00010 {
00011   produces<HLTPerformanceInfo>();
00012 }
00013 
00014 PathTimerInserter::~PathTimerInserter()
00015 {
00016 }  
00017 
00018 // Functions that gets called by framework every event
00019 void PathTimerInserter::produce(edm::Event& e, edm::EventSetup const&)
00020 {
00021   
00022   // warning: the trigger results will be cleared as a result of inserting 
00023   // this object into the event
00024   
00025   edm::Service<edm::service::PathTimerService> pts;
00026   std::auto_ptr<HLTPerformanceInfo> prod=pts->getInfo();
00027 
00028   e.put(prod);
00029 }
00030