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