CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
PathTimerService.h
Go to the documentation of this file.
1 #ifndef Services_PATHTIMERSERVICE_h
2 #define Services_PATHTIMERSERVICE_h
3 // -*- C++ -*-
4 //
5 // Package: Services
6 // Class : Timing
7 //
8 //
9 // Original Author: David Lange
10 // $Id: PathTimerService.h,v 1.6 2007/09/14 17:33:32 bdahmes Exp $
11 //
12 #include "sigc++/signal.h"
13 
18 // Keep track of CPU time
20 
21 
22 namespace edm {
23  namespace service {
25  {
26  public:
29 
30  sigc::signal<void, const edm::ModuleDescription&, double> newMeasurementSignal;
31 
32  std::auto_ptr<HLTPerformanceInfo> getInfo() { return std::auto_ptr<HLTPerformanceInfo>(new HLTPerformanceInfo(*_perfInfo));}
33 
34  private:
35  void postBeginJob();
36  void postEndJob();
37 
38  void preEventProcessing(const edm::EventID&, const edm::Timestamp&);
39  void postEventProcessing(const Event&, const EventSetup&);
40  void postPathProcessing(const std::string&, const HLTPathStatus&);
41  void preModule(const ModuleDescription&);
42  void postModule(const ModuleDescription&);
43 
45  double curr_job_; // seconds
46  double curr_event_time_; // seconds
47  double curr_module_time_; // seconds
48 
49  //
50  // Min Max and average event times for summary
51  // at end of job
52  double max_event_time_; // seconds
53  double min_event_time_; // seconds
55 
57  std::map<std::string, std::string> _moduleList;
58  std::map<std::string, double> _moduleTime;
59  std::map<std::string, double> _moduleCPUTime;
60  std::map<int, std::string> _pathMapping;
61  std::map<std::string, unsigned int> _lastModuleToRun;
62  std::auto_ptr<HLTPerformanceInfo> _perfInfo;
63  std::vector< std::vector<unsigned int> > _newPathIndex ;
65 
66  };
67  }
68 }
69 
70 #endif
std::map< int, std::string > _pathMapping
std::map< std::string, std::string > _moduleList
std::map< std::string, double > _moduleCPUTime
std::vector< std::vector< unsigned int > > _newPathIndex
void preModule(const ModuleDescription &)
static edm::CPUTimer * _CPUtimer
void postEventProcessing(const Event &, const EventSetup &)
void postPathProcessing(const std::string &, const HLTPathStatus &)
std::map< std::string, double > _moduleTime
std::map< std::string, unsigned int > _lastModuleToRun
void preEventProcessing(const edm::EventID &, const edm::Timestamp &)
void postModule(const ModuleDescription &)
PathTimerService(const ParameterSet &, ActivityRegistry &)
sigc::signal< void, const edm::ModuleDescription &, double > newMeasurementSignal
std::auto_ptr< HLTPerformanceInfo > getInfo()
std::auto_ptr< HLTPerformanceInfo > _perfInfo