Belle II Software light-2406-ragdoll
SeqRootInputModule.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#pragma once
10
11#include <framework/core/Module.h>
12#include <framework/pcore/DataStoreStreamer.h>
13#include <framework/pcore/SeqFile.h>
14
15#include <string>
16
17#include <sys/time.h>
18
19namespace Belle2 {
25 class SeqRootInputModule : public Module {
26 public:
27
30 virtual ~SeqRootInputModule();
31
33 virtual void initialize() override;
34
36 virtual void beginRun() override;
37 virtual void event() override;
38 virtual void endRun() override;
39 virtual void terminate() override;
40
41 private:
43 std::string m_inputFileName{""};
45 std::vector<std::string> m_filelist;
46
49
51 bool m_realData{false};
52
54 SeqFile* m_file{nullptr};
55
57 int m_nfile{0};
59 int m_fileptr{0};
60
62 int m_nevt{ -1};
63
66
68 struct timeval m_t0;
69 struct timeval m_tend;
71 // Data flow
72 double m_size{0};
73 double m_size2{0};
74 };
76} // end namespace Belle2
Stream/restore DataStore objects to/from EvtMessage.
Base class for Modules.
Definition: Module.h:72
A class to manage I/O for a chain of blocked files.
Definition: SeqFile.h:22
Module to read files produced by SeqRootOutputModule.
int m_nevt
Total nr. of events in the file.
DataStoreStreamer * m_streamer
DataStoreStreamer.
virtual void initialize() override
Module functions to be called from main process.
virtual void event() override
This method is the core of the module.
struct timeval m_tend
time at end of current run.
virtual void endRun() override
This method is called if the current run ends.
virtual void terminate() override
This method is called at the end of the event processing.
std::string m_inputFileName
File name.
bool m_fileNameIsPattern
If true the output filename will be interpreted as a boost::format pattern.
SeqFile * m_file
Blocked file handler.
virtual void beginRun() override
Module functions to be called from event process.
bool m_realData
Is the input real data?
std::vector< std::string > m_filelist
List of all file names to read.
int m_fileptr
Index of current file in m_filelist.
double m_size
total transferred data, in kB.
SeqRootInputModule()
Constructor / Destructor.
int m_nfile
Number of files to read (aka m_filelist.size())
double m_size2
sum of squares of data transferred in each event, in kB^2.
Abstract base class for different kinds of events.
Definition: ClusterUtils.h:24