REST-for-Physics  v2.3
Rare Event Searches ToolKit for Physics
Public Member Functions | Private Attributes
TRestRawFemDAQToSignalProcess Class Reference

Detailed Description

Read data from the root file output of femdaq into a TRestRawSignalEvent

Definition at line 36 of file TRestRawFemDAQToSignalProcess.h.

#include <TRestRawFemDAQToSignalProcess.h>

Inheritance diagram for TRestRawFemDAQToSignalProcess:
TRestEventProcess TRestMetadata

Public Member Functions

 ClassDefOverride (TRestRawFemDAQToSignalProcess, 1)
 
void EndProcess () override
 To be executed at the end of the run (outside event loop) More...
 
RESTValue GetInputEvent () const override
 Get pointer to input event. Must be implemented in the derived class. More...
 
RESTValue GetOutputEvent () const override
 Get pointer to output event. Must be implemented in the derived class. More...
 
const char * GetProcessName () const override
 
void Initialize () override
 Making default settings. More...
 
void InitProcess () override
 To be executed at the beginning of the run (outside event loop) More...
 
void PrintMetadata () override
 It prints out the process parameters stored in the metadata structure. More...
 
TRestEvent * ProcessEvent (TRestEvent *inputEvent) override
 Process one event. More...
 
 TRestRawFemDAQToSignalProcess (const char *configFilename)
 
- Public Member Functions inherited from TRestEventProcess
virtual Bool_t AddInputFile (const std::string &file)
 
bool ApplyCut ()
 
virtual void BeginOfEventProcess (TRestEvent *inputEvent=nullptr)
 Begin of event process, preparation work. Called right before ProcessEvent() More...
 
 ClassDefOverride (TRestEventProcess, 3)
 
virtual void EndOfEventProcess (TRestEvent *inputEvent=nullptr)
 End of event process. Nothing to do. Called directly after ProcessEvent() More...
 
virtual void EndProcess ()
 To be executed at the end of the run (outside event loop) More...
 
TRestAnalysisTree * GetAnalysisTree () const
 Return the local analysis tree (dummy) More...
 
TCanvas * GetCanvas () const
 Get canvas. More...
 
TRestAnalysisTree * GetFullAnalysisTree ()
 
virtual RESTValue GetInputEvent () const =0
 Get pointer to input event. Must be implemented in the derived class. More...
 
std::vector< std::string > GetListOfAddedObservables ()
 
virtual RESTValue GetOutputEvent () const =0
 Get pointer to output event. Must be implemented in the derived class. More...
 
virtual const char * GetProcessName () const =0
 
TRestRun * GetRunInfo () const
 Return the pointer of the hosting TRestRun object. More...
 
virtual Long64_t GetTotalBytes () const
 
virtual Long64_t GetTotalBytesRead () const
 Interface to external file reading, get the read bytes. To be implemented in external processes. More...
 
virtual void InitFromConfigFile () override
 To make settings from rml file. This method must be implemented in the derived class. More...
 
virtual void InitProcess ()
 To be executed at the beginning of the run (outside event loop) More...
 
Bool_t isExternal () const
 Return whether this process is external process. More...
 
Int_t LoadSectionMetadata () override
 This method does some preparation of xml section. More...
 
virtual void NotifyAnalysisTreeReset ()
 In case the analysis tree is reset(switched to new file), some process needs to have action. More...
 
virtual Bool_t OpenInputFiles (const std::vector< std::string > &files)
 
virtual TRestEvent * ProcessEvent (TRestEvent *inputEvent)=0
 Process one event. More...
 
std::vector< std::string > ReadObservables ()
 
void RegisterAllObservables (Bool_t value=true)
 
virtual Bool_t ResetEntry ()
 
void SetAnalysisTree (TRestAnalysisTree *tree)
 Set analysis tree of this process, then add observables to it.
 
void SetCanvasSize (Int_t x, Int_t y)
 Set canvas size. More...
 
void SetFriendProcess (TRestEventProcess *p)
 Add friendly process to this process.
 
void SetObservableValidation (bool validate)
 
void SetParallelProcess (TRestEventProcess *p)
 Add parallel process to this process.
 
void SetRunInfo (TRestRun *r)
 Set TRestRun for this process. More...
 
Bool_t singleThreadOnly () const
 Return whether this process is single std::thread only. More...
 
 TRestEventProcess ()
 
 ~TRestEventProcess ()
 

Private Attributes

Double_t fEndTimestamp = 0
 
Int_t fEventID = 0
 
TFile * fInputFile = nullptr
 
TTree * fInputTree = nullptr
 
Long64_t fInputTreeEntry = 0
 
Bool_t fSetRunStartEndFromEvents = false
 
TRestRawSignalEvent * fSignalEvent = nullptr
 
std::vector< int > * fSignalIds = nullptr
 
std::vector< short > * fSignalValues = nullptr
 
Double_t fStartTimestamp = std::numeric_limits<double>::max()
 
Double_t fTimestamp = 0
 
Bool_t fUseFeminosDaqRunInfo = true
 

Additional Inherited Members

- Protected Types inherited from TRestEventProcess
enum  REST_Process_Output { No_Output , Observable , Internal_Var , Full_Output }
 
- Protected Member Functions inherited from TRestEventProcess
void BeginPrintProcess ()
 [name, cut range]
 
void CreateCanvas ()
 Create the canvas. More...
 
void EndPrintProcess ()
 
TRestEventProcess * GetFriend (const std::string &nameOrType)
 
TRestEventProcess * GetFriendLive (const std::string &nameOrType)
 
template<class T >
T * GetMetadata ()
 Get a metadata object from the host TRestRun. More...
 
TRestMetadata * GetMetadata (const std::string &nameOrType)
 
size_t GetNumberOfParallelProcesses () const
 
template<class T >
T GetObservableValue (const std::string &name)
 
TRestEventProcess * GetParallel (int i)
 
template<class T >
std::vector< T > GetParallelDataMembers (T *member_of_process)
 Get a list of data members from parallel processes which is same to this process's certain data member. More...
 
template<class T >
void SetObservableValue (const std::string &name, const T &value)
 Set observable value for AnalysisTree. More...
 
- Protected Attributes inherited from TRestEventProcess
TRestAnalysisTree * fAnalysisTree = nullptr
 
TCanvas * fCanvas = nullptr
 < Canvas for some viewer event More...
 
TVector2 fCanvasSize
 Canvas size. More...
 
std::vector< std::pair< std::string, TVector2 > > fCuts
 Stores cut definitions. Any listed observables should be in the range. More...
 
bool fDynamicObs = false
 It defines whether to use added observables only or all the observables appear in the code. More...
 
bool fIsExternal = false
 It defines if the process reads event data from an external source. More...
 
std::map< std::string, int > fObservablesDefined
 Stores the list of all the appeared process observables in the code. More...
 
std::map< std::string, int > fObservablesUpdated
 Stores the list of process observables updated when processing this event. More...
 
bool fReadOnly = false
 not used, keep for compatibility More...
 
TRestRun * fRunInfo = nullptr
 < Pointer to TRestRun object where to find metadata. More...
 
bool fSingleThreadOnly = false
 
bool fValidateObservables = false
 It defines if observable names should be added to the validation list. More...
 

Constructor & Destructor Documentation

◆ TRestRawFemDAQToSignalProcess() [1/2]

TRestRawFemDAQToSignalProcess::TRestRawFemDAQToSignalProcess ( )

Definition at line 86 of file TRestRawFemDAQToSignalProcess.cxx.

◆ TRestRawFemDAQToSignalProcess() [2/2]

TRestRawFemDAQToSignalProcess::TRestRawFemDAQToSignalProcess ( const char *  configFilename)

Definition at line 88 of file TRestRawFemDAQToSignalProcess.cxx.

◆ ~TRestRawFemDAQToSignalProcess()

TRestRawFemDAQToSignalProcess::~TRestRawFemDAQToSignalProcess ( )

Definition at line 90 of file TRestRawFemDAQToSignalProcess.cxx.

Member Function Documentation

◆ EndProcess()

void TRestRawFemDAQToSignalProcess::EndProcess ( )
overridevirtual

To be executed at the end of the run (outside event loop)

Reimplemented from TRestEventProcess.

Definition at line 212 of file TRestRawFemDAQToSignalProcess.cxx.

◆ GetInputEvent()

RESTValue TRestRawFemDAQToSignalProcess::GetInputEvent ( ) const
inlineoverridevirtual

Get pointer to input event. Must be implemented in the derived class.

Implements TRestEventProcess.

Definition at line 54 of file TRestRawFemDAQToSignalProcess.h.

◆ GetOutputEvent()

RESTValue TRestRawFemDAQToSignalProcess::GetOutputEvent ( ) const
inlineoverridevirtual

Get pointer to output event. Must be implemented in the derived class.

Implements TRestEventProcess.

Definition at line 55 of file TRestRawFemDAQToSignalProcess.h.

◆ GetProcessName()

const char * TRestRawFemDAQToSignalProcess::GetProcessName ( ) const
inlineoverridevirtual

Implements TRestEventProcess.

Definition at line 62 of file TRestRawFemDAQToSignalProcess.h.

◆ Initialize()

void TRestRawFemDAQToSignalProcess::Initialize ( )
overridevirtual

Making default settings.

Reimplemented from TRestMetadata.

Definition at line 92 of file TRestRawFemDAQToSignalProcess.cxx.

◆ InitProcess()

void TRestRawFemDAQToSignalProcess::InitProcess ( )
overridevirtual

To be executed at the beginning of the run (outside event loop)

Reimplemented from TRestEventProcess.

Definition at line 100 of file TRestRawFemDAQToSignalProcess.cxx.

◆ PrintMetadata()

void TRestRawFemDAQToSignalProcess::PrintMetadata ( )
inlineoverridevirtual

It prints out the process parameters stored in the metadata structure.

Reimplemented from TRestMetadata.

Definition at line 65 of file TRestRawFemDAQToSignalProcess.h.

◆ ProcessEvent()

TRestEvent * TRestRawFemDAQToSignalProcess::ProcessEvent ( TRestEvent *  inputEvent)
overridevirtual

Process one event.

Implements TRestEventProcess.

Definition at line 170 of file TRestRawFemDAQToSignalProcess.cxx.

Field Documentation

◆ fEndTimestamp

Double_t TRestRawFemDAQToSignalProcess::fEndTimestamp = 0
private

Definition at line 49 of file TRestRawFemDAQToSignalProcess.h.

◆ fEventID

Int_t TRestRawFemDAQToSignalProcess::fEventID = 0
private

Definition at line 45 of file TRestRawFemDAQToSignalProcess.h.

◆ fInputFile

TFile* TRestRawFemDAQToSignalProcess::fInputFile = nullptr
private

Definition at line 41 of file TRestRawFemDAQToSignalProcess.h.

◆ fInputTree

TTree* TRestRawFemDAQToSignalProcess::fInputTree = nullptr
private

Definition at line 42 of file TRestRawFemDAQToSignalProcess.h.

◆ fInputTreeEntry

Long64_t TRestRawFemDAQToSignalProcess::fInputTreeEntry = 0
private

Definition at line 39 of file TRestRawFemDAQToSignalProcess.h.

◆ fSetRunStartEndFromEvents

Bool_t TRestRawFemDAQToSignalProcess::fSetRunStartEndFromEvents = false
private

Definition at line 51 of file TRestRawFemDAQToSignalProcess.h.

◆ fSignalEvent

TRestRawSignalEvent* TRestRawFemDAQToSignalProcess::fSignalEvent = nullptr
private

Definition at line 38 of file TRestRawFemDAQToSignalProcess.h.

◆ fSignalIds

std::vector<int>* TRestRawFemDAQToSignalProcess::fSignalIds = nullptr
private

Definition at line 46 of file TRestRawFemDAQToSignalProcess.h.

◆ fSignalValues

std::vector<short>* TRestRawFemDAQToSignalProcess::fSignalValues = nullptr
private

Definition at line 47 of file TRestRawFemDAQToSignalProcess.h.

◆ fStartTimestamp

Double_t TRestRawFemDAQToSignalProcess::fStartTimestamp = std::numeric_limits<double>::max()
private

Definition at line 48 of file TRestRawFemDAQToSignalProcess.h.

◆ fTimestamp

Double_t TRestRawFemDAQToSignalProcess::fTimestamp = 0
private

Definition at line 44 of file TRestRawFemDAQToSignalProcess.h.

◆ fUseFeminosDaqRunInfo

Bool_t TRestRawFemDAQToSignalProcess::fUseFeminosDaqRunInfo = true
private

Definition at line 50 of file TRestRawFemDAQToSignalProcess.h.


The documentation for this class was generated from the following files: