Belle II Software development
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
16namespace Belle2 {
24 class ElapsedTimeModule : public Module {
25
26 // Public functions
27 public:
28
31 virtual ~ElapsedTimeModule();
32
34 void initialize() override;
35
37 void beginRun() override;
38 void event() override;
39 void endRun() override;
40 void terminate() override;
41
42 // Data members
43 private:
44 int m_nevent;
45 int m_nevprev;
46 int m_interval;
47 struct timeval m_t0;
48 struct timeval m_tprev;
49 struct timeval m_tnow;
50 struct timeval m_tend;
51
52
53 };
54
56} // end namespace Belle2
57
58#endif // MODULEHELLO_H
A class definition of an input module for Sequential ROOT I/O.
void initialize() override
Module functions to be called from main process.
void event() override
This method is the core of the module.
ElapsedTimeModule()
Constructor / Destructor.
void endRun() override
This method is called if the current run ends.
void terminate() override
This method is called at the end of the event processing.
void beginRun() override
Module functions to be called from event process.
Base class for Modules.
Definition: Module.h:72
Abstract base class for different kinds of events.