CMS 3D CMS Logo

/data/doxygen/doxygen-1.7.3/gen/CMSSW_4_2_8/src/HLTrigger/Timer/interface/TimerService.h

Go to the documentation of this file.
00001 #ifndef Timer_Service_
00002 #define Timer_Service_
00003 
00013 #include "sigc++/signal.h"
00014 
00015 #include "FWCore/Utilities/interface/CPUTimer.h"
00016 
00017 #include "FWCore/Framework/interface/Frameworkfwd.h"
00018 #include "FWCore/Framework/interface/Event.h"
00019 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00020 #include "FWCore/ServiceRegistry/interface/ActivityRegistry.h"
00021 
00022 #include <string>
00023 
00024 class TimerService {
00025  public:
00026   explicit TimerService(const edm::ParameterSet&,
00027                            edm::ActivityRegistry& iAR);
00028   ~TimerService();
00029   // signal with module-description and processing time (in secs)
00030   sigc::signal<void, const edm::ModuleDescription&, double> newMeasurementSignal;
00031 
00032   // fwk calls this method before a module is processed
00033   void preModule(const edm::ModuleDescription& iMod);
00034   // fwk calls this method after a module has been processed
00035   void postModule(const edm::ModuleDescription& iMod);
00036 
00037  private:
00038   // cpu-timer
00039   static edm::CPUTimer * cpu_timer; // Chris J's CPUTimer
00040   // whether to use CPU-time (default) or wall-clock time
00041   bool useCPUtime;
00042 
00043 };
00044 
00045 #endif // #define Timer_Service_