1#ifndef RestCore_TRestProcessRunner
2#define RestCore_TRestProcessRunner
7#include "TRestAnalysisTree.h"
9#include "TRestEventProcess.h"
10#include "TRestMetadata.h"
13#define TIME_MEASUREMENT
38 std::vector<TRestThread*> fThreads;
39 TFile* fOutputDataFile;
44 ProcStatus fProcStatus;
51 Bool_t fValidateObservables;
52 Bool_t fSortOutputEvents;
53 Bool_t fInputAnalysisStorage;
54 Bool_t fInputEventStorage;
55 Bool_t fOutputEventStorage;
56 Bool_t fOutputAnalysisStorage;
60 Int_t fEventsToProcess;
61 Int_t fProcessedEvents;
63 Long64_t fFileSplitSize;
64 Int_t fFileCompression;
65 std::map<std::string, std::string> fProcessInfo;
76 TiXmlElement* e =
fElement->FirstChildElement();
77 while (e !=
nullptr) {
78 std::string value = e->Value();
79 if (value ==
"variable" || value ==
"myParameter" || value ==
"constant") {
80 e = e->NextSiblingElement();
84 e = e->NextSiblingElement();
90 Int_t
ReadConfig(
const std::string& keydeclare, TiXmlElement* e);
114 TFile* GetOutputDataFile() {
return fOutputDataFile; }
115 std::string GetProcInfo(std::string infoname) {
116 return fProcessInfo[infoname] ==
"" ? infoname : fProcessInfo[infoname];
118 inline int GetNThreads()
const {
return fThreadNumber; }
119 inline int GetNProcesses()
const {
return fProcessNumber; }
120 inline int GetNProcessedEvents()
const {
return fProcessedEvents; }
121 double GetReadingSpeed();
123 inline ProcStatus GetStatus()
const {
return fProcStatus; }
124 inline Long64_t GetFileSplitSize()
const {
return fFileSplitSize; }
REST core data-saving helper based on TTree.
A base class for any REST event process.
A base class for any REST event.
Managing applications and executing tasks.
Running the processes efficiently with fantastic display.
TString fOutputDataFileName
the TFile pointer being used
void ReadProcInfo()
Create a process info list which used called by TRestRun::FormFormat().
void WriteProcessesMetadata()
Write process metadata to fOutputDataFile.
void PrintProcessedEvents(Int_t rateE)
Print number of events processed, file read speed, ETA and a progress bar.
void ResetRunTimes()
Reset running time count to 0.
void BeginOfInit()
Reads information from rml config file.
Int_t ReadConfig(const std::string &keydeclare, TiXmlElement *e)
method to deal with iterated child elements
void MergeOutputFile()
Calls TRestRun::MergeOutputFile() to merge the main file with process's tmp file.
void InitFromConfigFile() override
To make settings from rml file. This method must be implemented in the derived class.
void RunProcess()
The main executer of event process.
void EndOfInit()
Ending of the startup procedure.
TRestEventProcess * InstantiateProcess(TString type, TiXmlElement *ele)
InstantiateProcess in sequential start up.
void PauseMenu()
A pause menu providing some functions during the process.
void Initialize() override
REST run class.
std::string MakeProgressBar(int progress100, int length=100)
Make a string of progress bar with given length and percentage.
Int_t GetNextevtFunc(TRestEvent *targetevt, TRestAnalysisTree *targettree)
Get next event and copy it to the address of targetevt.
void PrintMetadata() override
Implemented it in the derived metadata class to print out specific metadata information.
Bool_t fUseTestRun
Number of files being split.
void FillThreadEventFunc(TRestThread *t)
Calling back the FillEvent() method in TRestThread.
void ConfigOutputFile()
Forming an output file.
Data provider and manager in REST.
Threaded worker of a process chain.