REST-for-Physics  v2.3
Rare Event Searches ToolKit for Physics
TRestDetectorHitsReductionProcess.h
1
10
11#ifndef RestCore_TRestDetectorHitsReductionProcess
12#define RestCore_TRestDetectorHitsReductionProcess
13
14#include <TRestDetectorHitsEvent.h>
15
16#include "TRestEventProcess.h"
17
19 private:
20 TRestDetectorHitsEvent* fInputHitsEvent;
21 TRestDetectorHitsEvent* fOutputHitsEvent;
22
23 void InitFromConfigFile() override;
24
25 void Initialize() override;
26
27 protected:
28 Double_t fStartingDistance;
29 Double_t fMinimumDistance;
30 Double_t fDistanceFactor;
31 Double_t fMaxNodes;
32
33 public:
34 RESTValue GetInputEvent() const override { return fInputHitsEvent; }
35 RESTValue GetOutputEvent() const override { return fOutputHitsEvent; }
36
37 void InitProcess() override;
38 TRestEvent* ProcessEvent(TRestEvent* inputEvent) override;
39 void EndProcess() override;
40 void LoadDefaultConfig();
41
42 void LoadConfig(const std::string& configFilename, const std::string& name = "");
43
44 void PrintMetadata() override {
46
47 RESTMetadata << " Starting distance : " << fStartingDistance << RESTendl;
48 RESTMetadata << " Minimum distance : " << fMinimumDistance << RESTendl;
49 RESTMetadata << " Distance step factor : " << fDistanceFactor << RESTendl;
50 RESTMetadata << " Maximum number of nodes : " << fMaxNodes << RESTendl;
51
52 EndPrintProcess();
53 }
54
55 const char* GetProcessName() const override { return "hitsReduction"; }
56
58 TRestDetectorHitsReductionProcess(const char* configFilename);
59
61
62 ClassDefOverride(TRestDetectorHitsReductionProcess, 1);
63};
64#endif
TRestEvent * ProcessEvent(TRestEvent *inputEvent) override
Process one event.
RESTValue GetInputEvent() const override
Get pointer to input event. Must be implemented in the derived class.
void PrintMetadata() override
Implemented it in the derived metadata class to print out specific metadata information.
void Initialize() override
Making default settings.
void InitProcess() override
To be executed at the beginning of the run (outside event loop)
RESTValue GetOutputEvent() const override
Get pointer to output event. Must be implemented in the derived class.
void EndProcess() override
To be executed at the end of the run (outside event loop)
void InitFromConfigFile() override
To make settings from rml file. This method must be implemented in the derived class.
A base class for any REST event process.
void BeginPrintProcess()
[name, cut range]
A base class for any REST event.
Definition: TRestEvent.h:38
endl_t RESTendl
Termination flag object for TRestStringOutput.