CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_4_5_patch3/src/FWCore/Framework/src/TriggerResultInserter.cc

Go to the documentation of this file.
00001 
00002 #include "FWCore/Framework/src/TriggerResultInserter.h"
00003 #include "DataFormats/Common/interface/TriggerResults.h"
00004 #include "FWCore/Framework/interface/Event.h"
00005 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00006 
00007 #include <memory>
00008 
00009 namespace edm
00010 {
00011   TriggerResultInserter::TriggerResultInserter(const ParameterSet& pset, const TrigResPtr& trptr) :
00012     trptr_(trptr),
00013     pset_id_(pset.id())
00014   {
00015     produces<TriggerResults>();
00016   }
00017 
00018   TriggerResultInserter::~TriggerResultInserter()
00019   {
00020   }  
00021 
00022   void TriggerResultInserter::produce(edm::Event& e, edm::EventSetup const&)
00023   {
00024     std::auto_ptr<TriggerResults>
00025       results(new TriggerResults(*trptr_, pset_id_));
00026 
00027     e.put(results);
00028   }
00029 }