REST-for-Physics  v2.3
Rare Event Searches ToolKit for Physics
TRestRawReadoutMetadataProcess.h
1//
2// Created by lobis on 24-Aug-23.
3//
4
5#ifndef REST_TRESTRAWREADOUTMETADATAPROCESS_H
6#define REST_TRESTRAWREADOUTMETADATAPROCESS_H
7
8#include <TRestDetectorReadout.h>
9#include <TRestEventProcess.h>
10#include <TRestRawReadoutMetadata.h>
11#include <TRestRawSignalEvent.h>
12
13#include <atomic>
14
16 private:
17 TRestRawSignalEvent* fSignalEvent = nullptr;
18 TRestDetectorReadout* fReadout;
19 private:
20 static std::mutex fMetadataMutex;
21
22 public:
23 RESTValue GetInputEvent() const override { return fSignalEvent; }
24 RESTValue GetOutputEvent() const override { return fSignalEvent; }
25
26 void InitProcess() override;
27 TRestEvent* ProcessEvent(TRestEvent* inputEvent) override;
28 void EndProcess() override {}
29
30 const char* GetProcessName() const override { return "readoutMetadata"; }
31
32 explicit TRestRawReadoutMetadataProcess(const char* configFilename){};
33
36
37 // this is a workaround
38 static TRestRawReadoutMetadata* fReadoutMetadata;
39
41};
42
43#endif // REST_TRESTRAWREADOUTMETADATAPROCESS_H
A metadata class to generate/store a readout description.
A base class for any REST event process.
A base class for any REST event.
Definition: TRestEvent.h:38
RESTValue GetOutputEvent() const override
Get pointer to output event. Must be implemented in the derived class.
TRestEvent * ProcessEvent(TRestEvent *inputEvent) override
Process one event.
ClassDefOverride(TRestRawReadoutMetadataProcess, 1)
// made static to avoid problems with MT
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)
void InitProcess() override
To be executed at the beginning of the run (outside event loop)
An event container for time rawdata signals with fixed length.