CMS 3D CMS Logo

TriggerSummaryProducerAOD.h

Go to the documentation of this file.
00001 #ifndef HLTcore_TriggerSummaryProducerAOD_h
00002 #define HLTcore_TriggerSummaryProducerAOD_h
00003 
00016 #include "FWCore/Framework/interface/Event.h"
00017 #include "FWCore/Framework/interface/EDProducer.h"
00018 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00019 
00020 #include "FWCore/Framework/interface/Selector.h"
00021 #include "FWCore/ServiceRegistry/interface/Service.h"
00022 #include "FWCore/Framework/interface/TriggerNamesService.h"
00023 
00024 #include "DataFormats/Common/interface/Handle.h"
00025 
00026 #include "DataFormats/HLTReco/interface/TriggerTypeDefs.h"
00027 #include "DataFormats/HLTReco/interface/TriggerObject.h"
00028 #include "DataFormats/HLTReco/interface/TriggerFilterObjectWithRefs.h"
00029 
00030 #include<string>
00031 #include<vector>
00032 
00033 //
00034 // class declaration
00035 //
00036 
00037 struct TriggerInputTagComparison {
00038   bool operator() (const edm::InputTag& lhs, const edm::InputTag& rhs) const {
00039     return lhs.encode()<rhs.encode();
00040   }
00041 };
00042 
00043 typedef std::set<edm::InputTag,TriggerInputTagComparison> InputTagSet;
00044 
00045 class TriggerSummaryProducerAOD : public edm::EDProducer {
00046   
00047  public:
00048   explicit TriggerSummaryProducerAOD(const edm::ParameterSet&);
00049   ~TriggerSummaryProducerAOD();
00050   virtual void produce(edm::Event&, const edm::EventSetup&);
00051   virtual void endJob();
00052 
00053 
00054   // additional
00055 
00056   template <typename C>
00057   void fillTriggerObjects(const edm::Event& );
00058 
00059   template <typename C>
00060   void fillFilterObjects(const edm::Event&, const edm::InputTag& tag, const trigger::Vids &, const std::vector<edm::Ref<C> >&);
00061 
00062  private:
00064   std::string pn_;
00065 
00067   edm::ProcessNameSelector selector_;
00068 
00070   edm::service::TriggerNamesService* tns_;
00071 
00073   std::vector<edm::InputTag> collectionTags_;
00075   InputTagSet                collectionTagsEvent_;
00076   InputTagSet                collectionTagsGlobal_;
00078   InputTagSet                filterTagsEvent_;
00079   InputTagSet                filterTagsGlobal_;
00080 
00082   trigger::TriggerObjectCollection toc_;
00083   std::vector<edm::InputTag> tags_;
00085   std::map<edm::ProductID,int> offset_;
00086 
00088   std::vector<edm::Handle<trigger::TriggerFilterObjectWithRefs> > fobs_;
00090   trigger::Keys keys_;
00092   trigger::Vids ids_;
00093 
00095   std::vector<bool> maskFilters_;
00096 
00097 };
00098 #endif

Generated on Tue Jun 9 17:37:53 2009 for CMSSW by  doxygen 1.5.4