00001 #ifndef HighLevelTrigger_Timer_h 00002 #define HighLevelTrigger_Timer_h 00003 00004 // system include files 00005 #include <memory> 00006 00007 // user include files 00008 #include "FWCore/Framework/interface/Frameworkfwd.h" 00009 #include "FWCore/Framework/interface/EDProducer.h" 00010 00011 #include "FWCore/Framework/interface/Event.h" 00012 #include "FWCore/Framework/interface/MakerMacros.h" 00013 #include "FWCore/ParameterSet/interface/ParameterSet.h" 00014 00015 #include "FWCore/ServiceRegistry/interface/Service.h" 00016 00017 #include "DataFormats/HLTReco/interface/ModuleTiming.h" 00018 // use for CMSSW_1_3_x 00019 //#include "DataFormats/Common/interface/ModuleDescription.h" 00020 // use for CMSSW_1_4_x 00021 #include "DataFormats/Provenance/interface/ModuleDescription.h" 00022 00023 00024 #include "HLTrigger/Timer/interface/TimerService.h" 00025 00026 /* 00027 Description: EDProducer that uses the EventTime structure to store in the Event 00028 the names and processing times (per event) for all modules. 00029 00030 Implementation: 00031 <Notes on implementation> 00032 */ 00033 // 00034 // Original Author: Christos Leonidopoulos 00035 // Created: Mon Jul 10 14:13:58 CEST 2006 00036 // $Id: Timer.h,v 1.11 2007/03/27 19:12:13 cleonido Exp $ 00037 // 00038 // 00039 // 00040 // class decleration 00041 // 00042 00043 class Timer : public edm::EDProducer { 00044 public: 00045 explicit Timer(const edm::ParameterSet&); 00046 ~Timer(); 00047 // fwk calls this method when new module measurement arrives; 00048 void newTimingMeasurement(const edm::ModuleDescription& iMod, double iTime); 00049 // put output into Event 00050 virtual void produce(edm::Event&, const edm::EventSetup&); 00051 // 00052 private: 00053 // ----------member data --------------------------- 00054 edm::EventTime timing; // structure with module names & processing times 00055 // whether to store information about itself (ie. Timer module) 00056 bool includeSelf; 00057 00058 // this should be just this class' name 00059 std::string self_module_name; 00060 00061 }; 00062 00063 00064 #endif // #define HighLevelTrigger_Timer_h