REST-for-Physics  v2.3
Rare Event Searches ToolKit for Physics
TRestTrackToDetectorHitsProcess.h
1
11
12#ifndef RestCore_TRestTrackToDetectorHitsProcess
13#define RestCore_TRestTrackToDetectorHitsProcess
14
15#include <TRestDetectorHitsEvent.h>
16#include <TRestTrackEvent.h>
17
18#include "TRestEventProcess.h"
19
21 private:
22#ifndef __CINT__
23 TRestTrackEvent* fInputTrackEvent;
24 TRestDetectorHitsEvent* fOutputHitsEvent;
25#endif
26
27 void InitFromConfigFile() override;
28
29 void Initialize() override;
30
31 protected:
32 Int_t fTrackLevel;
33
34 public:
35 RESTValue GetInputEvent() const override { return fInputTrackEvent; }
36 RESTValue GetOutputEvent() const override { return fOutputHitsEvent; }
37
38 void InitProcess() override;
39 TRestEvent* ProcessEvent(TRestEvent* inputEvent) override;
40 void EndProcess() override;
41 void LoadDefaultConfig();
42
43 void LoadConfig(const std::string& configFilename, const std::string& name = "");
44
45 void PrintMetadata() override {
47
48 std::cout << "Track level : " << fTrackLevel << std::endl;
49
50 EndPrintProcess();
51 }
52
53 const char* GetProcessName() const override { return "trackToDetectorHits"; }
54
55 // Constructor
57 TRestTrackToDetectorHitsProcess(const char* configFilename);
58 // Destructor
60
61 ClassDefOverride(TRestTrackToDetectorHitsProcess, 1); // Template for a REST "event process" class
62 // inherited from TRestEventProcess
63};
64#endif
A base class for any REST event process.
void BeginPrintProcess()
[name, cut range]
A base class for any REST event.
Definition: TRestEvent.h:38
void InitProcess() override
To be executed at the beginning of the run (outside event loop)
TRestEvent * ProcessEvent(TRestEvent *inputEvent) override
Process one event.
void InitFromConfigFile() override
To make settings from rml file. This method must be implemented in the derived class.
RESTValue GetOutputEvent() const override
Get pointer to output event. Must be implemented in the derived class.
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 EndProcess() override
To be executed at the end of the run (outside event loop)