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.7 2013/06/11 10:29:54 fwyzard Exp $
11 //
12 
17 // Keep track of CPU time
19 
20 
21 namespace edm {
22  namespace service {
24  {
25  public:
28 
29  std::auto_ptr<HLTPerformanceInfo> getInfo() { return std::auto_ptr<HLTPerformanceInfo>(new HLTPerformanceInfo(*_perfInfo));}
30 
31  private:
32  void postBeginJob();
33  void postEndJob();
34 
35  void preEventProcessing(const edm::EventID&, const edm::Timestamp&);
36  void postEventProcessing(const Event&, const EventSetup&);
37  void postPathProcessing(const std::string&, const HLTPathStatus&);
38  void preModule(const ModuleDescription&);
39  void postModule(const ModuleDescription&);
40 
42  double curr_job_; // seconds
43  double curr_event_time_; // seconds
44  double curr_module_time_; // seconds
45 
46  //
47  // Min Max and average event times for summary
48  // at end of job
49  double max_event_time_; // seconds
50  double min_event_time_; // seconds
52 
54  std::map<std::string, std::string> _moduleList;
55  std::map<std::string, double> _moduleTime;
56  std::map<std::string, double> _moduleCPUTime;
57  std::map<int, std::string> _pathMapping;
58  std::map<std::string, unsigned int> _lastModuleToRun;
59  std::auto_ptr<HLTPerformanceInfo> _perfInfo;
60  std::vector< std::vector<unsigned int> > _newPathIndex ;
62 
63  };
64  }
65 }
66 
67 #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 &)
std::auto_ptr< HLTPerformanceInfo > getInfo()
std::auto_ptr< HLTPerformanceInfo > _perfInfo