REST-for-Physics  v2.3
Rare Event Searches ToolKit for Physics
TRestDetectorSignalViewerProcess.h
1 
12 #ifndef RestCore_TRestDetectorSignalViewerProcess
13 #define RestCore_TRestDetectorSignalViewerProcess
14 
15 #include <TH1D.h>
16 #include <TRestEventProcess.h>
17 
18 #include "TRestDetectorGas.h"
19 #include "TRestDetectorHitsEvent.h"
20 #include "TRestDetectorReadout.h"
21 #include "TRestDetectorSignalEvent.h"
22 
24  private:
25  TRestDetectorSignalEvent* fSignalEvent;
26 
27  std::vector<TObject*> fDrawingObjects;
28  Double_t fDrawRefresh;
29 
30  TVector2 fBaseLineRange;
31 
32  int eveCounter = 0;
33  int sgnCounter = 0;
34 
35  void InitFromConfigFile() override;
36 
37  void Initialize() override;
38 
39  void LoadDefaultConfig();
40 
41  protected:
42  // add here the members of your event process
43 
44  public:
45  RESTValue GetInputEvent() const override { return fSignalEvent; }
46  RESTValue GetOutputEvent() const override { return fSignalEvent; }
47 
48  void InitProcess() override;
49  TRestEvent* ProcessEvent(TRestEvent* inputEvent) override;
50  void EndProcess() override;
51 
52  void LoadConfig(const std::string& configFilename, const std::string& name = "");
53 
54  void PrintMetadata() override {
56 
57  std::cout << "Refresh value : " << fDrawRefresh << std::endl;
58 
59  EndPrintProcess();
60  }
61 
62  TPad* DrawSignal(Int_t signal);
63 
64  const char* GetProcessName() const override { return "rawSignalViewer"; }
65 
67  TRestDetectorSignalViewerProcess(const char* configFilename);
68 
70 
71  ClassDefOverride(TRestDetectorSignalViewerProcess, 1);
72 };
73 #endif
void Initialize() override
Making default settings.
void InitProcess() override
To be executed at the beginning of the run (outside event loop)
void PrintMetadata() override
Implemented it in the derived metadata class to print out specific metadata information.
RESTValue GetOutputEvent() const override
Get pointer to output event. Must be implemented in the derived class.
void InitFromConfigFile() override
To make settings from rml file. This method must be implemented in the derived class.
RESTValue GetInputEvent() const override
Get pointer to input event. Must be implemented in the derived class.
void EndProcess() override
To be executed at the end of the run (outside event loop)
TRestEvent * ProcessEvent(TRestEvent *inputEvent) override
Process one event.
A base class for any REST event process.
void BeginPrintProcess()
[name, cut range]
A base class for any REST event.
Definition: TRestEvent.h:38