hpstr
The Heavy Photon Search Toolkit for Reconstruction (hpstr) provides an interface to physics data from the HPS experiment saved in the LCIO format and converts it into an ROOT based format.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Process.h
Go to the documentation of this file.
1
8#ifndef __PROCESS_H__
9#define __PROCESS_H__
10
11//----------------//
12// C++ StdLib //
13//----------------//
14#include <vector>
15#include <iostream>
16#include <stdexcept>
17
18//----------//
19// ROOT //
20//----------//
21#include "TObject.h"
22#include "TFile.h"
23
24//-----------//
25// hpstr //
26//-----------//
27#include "Processor.h"
28
29class Process {
30
31 public:
35 Process();
36
42 void addToSequence(Processor* event_proc);
43
49 void addFileToProcess(const std::string& filename);
50
59 void addOutputFileName(const std::string& output_filename);
60
69 void setRunMode(int run_mode = -1) {
70 run_mode_ = run_mode;
71 }
72
78 void setSkipEvents(int skip_events=-1) {
79 skip_events_ = skip_events;
80 }
81
94 void setEventLimit(int event_limit = -1) {
95 event_limit_ = event_limit;
96 }
97
104 return run_mode_;
105 }
106
111 return skip_events_;
112 }
113
115 void run();
116
118 void runOnRoot();
119
121 void runOnHisto();
122
125
126 private:
127
128 /* Reader used to parse either binary or EVIO files. */
129 //DataRead* data_reader{nullptr};
130
132 int run_mode_{-1};
133
136
139
141 std::vector<Processor*> sequence_;
142
144 std::vector<std::string> input_files_;
145
147 std::vector<std::string> output_files_;
148
149};
150
151#endif
Base classes for all user event processing components to extend.
void addFileToProcess(const std::string &filename)
Add an input file name to the list.
Definition Process.cxx:175
void addOutputFileName(const std::string &output_filename)
Add an output file name to the list.
Definition Process.cxx:179
void run()
Definition Process.cxx:92
std::vector< std::string > output_files_
Definition Process.h:147
int event_limit_
Definition Process.h:138
int skip_events_
Definition Process.h:135
void runOnHisto()
Definition Process.cxx:18
void setRunMode(int run_mode=-1)
Set the run mode of the process.
Definition Process.h:69
void runOnRoot()
Definition Process.cxx:38
void setSkipEvents(int skip_events=-1)
Definition Process.h:78
std::vector< Processor * > sequence_
Definition Process.h:141
void addToSequence(Processor *event_proc)
Add an event processor to the linear sequence of processors to run in this job.
Definition Process.cxx:183
int getSkipEvents()
Definition Process.h:110
void requestFinish()
Definition Process.h:124
int run_mode_
Definition Process.h:132
Process()
Class constructor.
Definition Process.cxx:14
int getRunMode()
Get the run mode of the process.
Definition Process.h:103
std::vector< std::string > input_files_
Definition Process.h:144
void setEventLimit(int event_limit=-1)
Set the maximum number of events to process.
Definition Process.h:94
Base class for all event processing components.
Definition Processor.h:34