Belle II Software  release-06-00-14
ElapsedTimeModule.h
1 /**************************************************************************
2  * basf2 (Belle II Analysis Software Framework) *
3  * Author: The Belle II Collaboration *
4  * *
5  * See git log for contributors and copyright holders. *
6  * This file is licensed under LGPL-3.0, see LICENSE.md. *
7  **************************************************************************/
8 
9 #ifndef ELAPSEDTIMEMODULE_H
10 #define ELAPSEDTIMEMODULE_H
11 
12 #include <framework/core/Module.h>
13 
14 #include <sys/time.h>
15 
16 namespace Belle2 {
27  class ElapsedTimeModule : public Module {
28 
29  // Public functions
30  public:
31 
34  virtual ~ElapsedTimeModule();
35 
37  virtual void initialize();
38 
40  virtual void beginRun();
41  virtual void event();
42  virtual void endRun();
43  virtual void terminate();
44 
45  // Data members
46  private:
47  int m_nevent;
48  int m_nevprev;
49  int m_interval;
50  struct timeval m_t0;
51  struct timeval m_tprev;
52  struct timeval m_tnow;
53  struct timeval m_tend;
54 
55 
56  };
57 
59 } // end namespace Belle2
60 
61 #endif // MODULEHELLO_H
A class definition of an input module for Sequential ROOT I/O.
virtual void event()
This method is the core of the module.
virtual void initialize()
Module functions to be called from main process.
virtual void beginRun()
Module functions to be called from event process.
ElapsedTimeModule()
Constructor / Destructor.
virtual void terminate()
This method is called at the end of the event processing.
virtual void endRun()
This method is called if the current run ends.
Base class for Modules.
Definition: Module.h:72
Abstract base class for different kinds of events.