Go to the documentation of this file.00001 #ifndef DQMOFFLINE_TRIGGER_DEBUGFUNCS
00002 #define DQMOFFLINE_TRIGGER_DEGUGFUNCS
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 #include "DataFormats/Common/interface/Handle.h"
00015 #include "DataFormats/Provenance/interface/Provenance.h"
00016
00017 #include "FWCore/Utilities/interface/InputTag.h"
00018 #include "FWCore/Framework/interface/Event.h"
00019 namespace egHLT {
00020 namespace debug {
00021
00022
00023
00024 template<typename PROD> int listAllProducts(const edm::Event& iEvent,const char* moduleName);
00025
00026 }
00027
00028
00029 template<typename PROD> int debug::listAllProducts(const edm::Event& iEvent,const char* moduleName)
00030 {
00031 std::vector<edm::Handle<PROD> > products;
00032 iEvent.getManyByType(products);
00033
00034 for(size_t i=0;i<products.size();i++){
00035
00036 std::cout <<"for product "<<i+1<<"/"<<products.size()<<" "<<products[i].provenance()->moduleLabel()<<" "<<products[i].provenance()->moduleName()<<std::endl;
00037
00038 }
00039 return products.size();
00040 }
00041 }
00042
00043
00044
00045
00046 #endif