REST-for-Physics  v2.3
Rare Event Searches ToolKit for Physics
Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Private Attributes
TRestEventProcess Class Referenceabstract

Detailed Description

A base class for any REST event process.

One of the core classes of REST. Absract class from which all REST "event process classes" must derive. An event process in REST is an atomic operation on one single (input) event, potentially producing a different (output) event. Which type of (input/output) events will depent on the type of process. Processes can be tailored via metadata classes. All this needs to be defined in the inherited class. TRestEventProcess provides the basic structure (virtual functions)


RESTsoft - Software for Rare Event Searches with TPCs

History of developments:

2014-june: First concept. As part of conceptualization of previous REST code (REST v2) Igor G. Irastorza

2017-Aug: Major change: added for multi-thread capability Kaixiang Ni


Definition at line 37 of file TRestEventProcess.h.

#include <TRestEventProcess.h>

Inheritance diagram for TRestEventProcess:
TRestMetadata TRestAxionAnalysisProcess TRestAxionEventProcess TRestAxionGeneratorProcess TRestBenchMarkProcess TRestDataQualityProcess TRestDetectorAvalancheProcess TRestDetectorDaqChannelSwitchingProcess TRestDetectorElectronDiffusionProcess TRestDetectorFiducializationProcess TRestDetectorGarfieldDriftProcess TRestDetectorHitmapAnalysisProcess TRestDetectorHits3DReconstructionProcess TRestDetectorHitsAnalysisProcess TRestDetectorHitsGaussAnalysisProcess TRestDetectorHitsNormalizationProcess TRestDetectorHitsReadoutAnalysisProcess TRestDetectorHitsReductionProcess TRestDetectorHitsRotationProcess TRestDetectorHitsShuffleProcess TRestDetectorHitsSmearingProcess TRestDetectorHitsSpecularProcess TRestDetectorHitsToSignalProcess TRestDetectorHitsToTrackFastProcess TRestDetectorHitsToTrackProcess TRestDetectorHitsTranslationProcess TRestDetectorLightAttenuationProcess TRestDetectorPositionMappingProcess TRestDetectorSignalChannelActivityProcess TRestDetectorSignalRecoveryProcess TRestDetectorSignalToHitsProcess TRestDetectorSignalToRawSignalProcess TRestDetectorSignalViewerProcess TRestDetectorSingleChannelAnalysisProcess TRestDetectorTriggerAnalysisProcess TRestEventRateAnalysisProcess TRestEventSelectionProcess TRestGeant4AnalysisProcess TRestGeant4BlobAnalysisProcess TRestGeant4NeutronTaggingProcess TRestGeant4QuenchingProcess TRestGeant4ToDetectorHitsProcess TRestGeant4VetoAnalysisProcess TRestLegacyProcess TRestMySQLToAnalysisProcess TRestRawBaseLineCorrectionProcess TRestRawBiPoAnalysisProcess TRestRawCommonNoiseReductionProcess TRestRawFindResponseSignalProcess TRestRawMemoryBufferToSignalProcess TRestRawPeaksFinderProcess TRestRawReadoutAnalysisProcess TRestRawReadoutMetadataProcess TRestRawSignalAddNoiseProcess TRestRawSignalAnalysisProcess TRestRawSignalChannelActivityProcess TRestRawSignalConvolutionFittingProcess TRestRawSignalFittingProcess TRestRawSignalGeneralFitProcess TRestRawSignalIdTaggingProcess TRestRawSignalRangeReductionProcess TRestRawSignalRemoveChannelsProcess TRestRawSignalShapingProcess TRestRawSignalViewerProcess TRestRawToDetectorSignalProcess TRestRawToSignalProcess TRestRawVetoAnalysisProcess TRestRealTimeAddInputFileProcess TRestRealTimeDrawingProcess TRestSummaryProcess TRestTrack2DAnalysisProcess TRestTrack3DAnalysisProcess TRestTrackAnalysisProcess TRestTrackBlobAnalysisProcess TRestTrackDetachIsolatedNodesProcess TRestTrackLineAnalysisProcess TRestTrackLinearizationProcess TRestTrackPathMinimizationProcess TRestTrackPointLikeAnalysisProcess TRestTrackReconnectionProcess TRestTrackReductionProcess TRestTrackToDetectorHitsProcess TRestTrackViewerProcess

Public Member Functions

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...
 
TRestAnalysisTreeGetAnalysisTree () const
 Return the local analysis tree (dummy) More...
 
TCanvas * GetCanvas () const
 Get canvas. More...
 
TRestAnalysisTreeGetFullAnalysisTree ()
 
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
 
TRestRunGetRunInfo () 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 TRestEventProcessEvent (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 ()
 

Protected Types

enum  REST_Process_Output { No_Output , Observable , Internal_Var , Full_Output }
 

Protected Member Functions

void BeginPrintProcess ()
 [name, cut range]
 
void CreateCanvas ()
 Create the canvas. More...
 
void EndPrintProcess ()
 
TRestEventProcessGetFriend (const std::string &nameOrType)
 
TRestEventProcessGetFriendLive (const std::string &nameOrType)
 
template<class T >
T * GetMetadata ()
 Get a metadata object from the host TRestRun. More...
 
TRestMetadataGetMetadata (const std::string &nameOrType)
 
size_t GetNumberOfParallelProcesses () const
 
template<class T >
GetObservableValue (const std::string &name)
 
TRestEventProcessGetParallel (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

TRestAnalysisTreefAnalysisTree = 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...
 
TRestRunfRunInfo = 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...
 

Private Attributes

std::vector< TRestEventProcess * > fFriendlyProcesses
 /// not used More...
 
TRestEventfInputEvent = nullptr
 < not used, keep for compatibility More...
 
TRestEventfOutputEvent = nullptr
 < not used, keep for compatibility More...
 
REST_Process_Output fOutputLevel
 not used, keep for compatibility More...
 
std::vector< TRestEventProcess * > fParallelProcesses
 Stores a list of parallel processes if multithreading is enabled. More...
 

Member Enumeration Documentation

◆ REST_Process_Output

Enumerator
No_Output 

creates no branch in analysis tree, user can still manually save what he wants.

Observable 

+saving observables as branches in root directory of the tree

Internal_Var 

+saving the process itself as a branch. branch name is the process name. Internal variables can be found as leaf of the branch

Full_Output 

+saving output event as another branch. branch name is process name+"_evtBranch"

Definition at line 39 of file TRestEventProcess.h.

Constructor & Destructor Documentation

◆ TRestEventProcess()

TRestEventProcess::TRestEventProcess ( )

TRestEventProcess default constructor

Definition at line 69 of file TRestEventProcess.cxx.

◆ ~TRestEventProcess()

TRestEventProcess::~TRestEventProcess ( )

TRestEventProcess destructor

Definition at line 79 of file TRestEventProcess.cxx.

Member Function Documentation

◆ AddInputFile()

virtual Bool_t TRestEventProcess::AddInputFile ( const std::string &  file)
inlinevirtual

Definition at line 214 of file TRestEventProcess.h.

◆ BeginOfEventProcess()

virtual void TRestEventProcess::BeginOfEventProcess ( TRestEvent inputEvent = nullptr)
virtual

Begin of event process, preparation work. Called right before ProcessEvent()

Reimplemented in TRestAxionEventProcess, and TRestRawMemoryBufferToSignalProcess.

◆ CreateCanvas()

void TRestEventProcess::CreateCanvas ( )
inlineprotected

Create the canvas.

Definition at line 191 of file TRestEventProcess.h.

◆ EndOfEventProcess()

virtual void TRestEventProcess::EndOfEventProcess ( TRestEvent inputEvent = nullptr)
virtual

End of event process. Nothing to do. Called directly after ProcessEvent()

Reimplemented in TRestAxionEventProcess.

◆ EndProcess()

virtual void TRestEventProcess::EndProcess ( )
inlinevirtual

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

Reimplemented in TRestLegacyProcess, TRestBenchMarkProcess, TRestDataQualityProcess, TRestRealTimeAddInputFileProcess, TRestRealTimeDrawingProcess, TRestSummaryProcess, TRestDetectorHitsToTrackFastProcess, TRestRawReadoutAnalysisProcess, TRestRawReadoutMetadataProcess, TRestTrackToDetectorHitsProcess, TRestDetectorAvalancheProcess, TRestDetectorDaqChannelSwitchingProcess, TRestDetectorElectronDiffusionProcess, TRestDetectorFiducializationProcess, TRestDetectorHits3DReconstructionProcess, TRestDetectorHitsAnalysisProcess, TRestDetectorHitsNormalizationProcess, TRestDetectorHitsReadoutAnalysisProcess, TRestDetectorHitsReductionProcess, TRestDetectorHitsShuffleProcess, TRestDetectorLightAttenuationProcess, TRestDetectorPositionMappingProcess, TRestDetectorSignalChannelActivityProcess, TRestDetectorSignalViewerProcess, TRestDetectorSingleChannelAnalysisProcess, TRestGeant4AnalysisProcess, TRestGeant4BlobAnalysisProcess, TRestGeant4NeutronTaggingProcess, TRestGeant4QuenchingProcess, TRestGeant4VetoAnalysisProcess, TRestRawBaseLineCorrectionProcess, TRestRawBiPoAnalysisProcess, TRestRawCommonNoiseReductionProcess, TRestRawFindResponseSignalProcess, TRestRawMultiCoBoAsAdToSignalProcess, TRestRawPeaksFinderProcess, TRestRawSignalChannelActivityProcess, TRestRawSignalConvolutionFittingProcess, TRestRawSignalFittingProcess, TRestRawSignalGeneralFitProcess, TRestRawSignalShapingProcess, TRestRawSignalViewerProcess, TRestRawUSTCToSignalProcess, TRestTrack2DAnalysisProcess, TRestTrack3DAnalysisProcess, TRestTrackAnalysisProcess, TRestTrackBlobAnalysisProcess, TRestTrackDetachIsolatedNodesProcess, TRestTrackLineAnalysisProcess, TRestTrackLinearizationProcess, TRestTrackPathMinimizationProcess, TRestTrackPointLikeAnalysisProcess, TRestTrackReconnectionProcess, TRestTrackReductionProcess, and TRestTrackViewerProcess.

Definition at line 232 of file TRestEventProcess.h.

◆ GetAnalysisTree()

TRestAnalysisTree * TRestEventProcess::GetAnalysisTree ( ) const
inline

Return the local analysis tree (dummy)

Definition at line 265 of file TRestEventProcess.h.

◆ GetCanvas()

TCanvas * TRestEventProcess::GetCanvas ( ) const
inline

Get canvas.

Definition at line 268 of file TRestEventProcess.h.

◆ GetInputEvent()

virtual RESTValue TRestEventProcess::GetInputEvent ( ) const
pure virtual

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

Implemented in TRestLegacyProcess, TRestBenchMarkProcess, TRestDataQualityProcess, TRestEventRateAnalysisProcess, TRestEventSelectionProcess, TRestMySQLToAnalysisProcess, TRestRealTimeAddInputFileProcess, TRestRealTimeDrawingProcess, TRestSummaryProcess, TRestAxionAnalysisProcess, TRestAxionEventProcess, TRestAxionFieldPropagationProcess, TRestAxionGeneratorProcess, TRestDetectorHitsToTrackFastProcess, TRestDetectorHitsToTrackProcess, TRestDetectorSignalToRawSignalProcess, TRestGeant4ToDetectorHitsProcess, TRestRawReadoutAnalysisProcess, TRestRawReadoutMetadataProcess, TRestRawToDetectorSignalProcess, TRestTrackToDetectorHitsProcess, TRestDetectorAvalancheProcess, TRestDetectorDaqChannelSwitchingProcess, TRestDetectorElectronDiffusionProcess, TRestDetectorFiducializationProcess, TRestDetectorGarfieldDriftProcess, TRestDetectorHitmapAnalysisProcess, TRestDetectorHits3DReconstructionProcess, TRestDetectorHitsAnalysisProcess, TRestDetectorHitsGaussAnalysisProcess, TRestDetectorHitsNormalizationProcess, TRestDetectorHitsReadoutAnalysisProcess, TRestDetectorHitsReductionProcess, TRestDetectorHitsRotationProcess, TRestDetectorHitsShuffleProcess, TRestDetectorHitsSmearingProcess, TRestDetectorHitsSpecularProcess, TRestDetectorHitsToSignalProcess, TRestDetectorHitsTranslationProcess, TRestDetectorLightAttenuationProcess, TRestDetectorPositionMappingProcess, TRestDetectorSignalChannelActivityProcess, TRestDetectorSignalRecoveryProcess, TRestDetectorSignalToHitsProcess, TRestDetectorSignalViewerProcess, TRestDetectorSingleChannelAnalysisProcess, TRestDetectorTriggerAnalysisProcess, TRestGeant4AnalysisProcess, TRestGeant4BlobAnalysisProcess, TRestGeant4NeutronTaggingProcess, TRestGeant4QuenchingProcess, TRestGeant4VetoAnalysisProcess, TRestRawBaseLineCorrectionProcess, TRestRawBiPoAnalysisProcess, TRestRawCommonNoiseReductionProcess, TRestRawFindResponseSignalProcess, TRestRawMemoryBufferToSignalProcess, TRestRawPeaksFinderProcess, TRestRawSignalAddNoiseProcess, TRestRawSignalAnalysisProcess, TRestRawSignalChannelActivityProcess, TRestRawSignalConvolutionFittingProcess, TRestRawSignalFittingProcess, TRestRawSignalGeneralFitProcess, TRestRawSignalIdTaggingProcess, TRestRawSignalRangeReductionProcess, TRestRawSignalRemoveChannelsProcess, TRestRawSignalShapingProcess, TRestRawSignalViewerProcess, TRestRawToSignalProcess, TRestRawVetoAnalysisProcess, TRestTrack2DAnalysisProcess, TRestTrack3DAnalysisProcess, TRestTrackAnalysisProcess, TRestTrackBlobAnalysisProcess, TRestTrackDetachIsolatedNodesProcess, TRestTrackLineAnalysisProcess, TRestTrackLinearizationProcess, TRestTrackPathMinimizationProcess, TRestTrackPointLikeAnalysisProcess, TRestTrackReconnectionProcess, TRestTrackReductionProcess, and TRestTrackViewerProcess.

◆ GetMetadata()

template<class T >
T * TRestEventProcess::GetMetadata ( )
inlineprotected

Get a metadata object from the host TRestRun.

Directly input the type as template argument. This helps to simplify the code and prevents mis-spelling. For example: fReadout = GetMetadata<TRestReadout>();. No need for type conversion.

Definition at line 104 of file TRestEventProcess.h.

◆ GetNumberOfParallelProcesses()

size_t TRestEventProcess::GetNumberOfParallelProcesses ( ) const
inlineprotected

Definition at line 111 of file TRestEventProcess.h.

◆ GetObservableValue()

template<class T >
T TRestEventProcess::GetObservableValue ( const std::string &  name)
inlineprotected

Definition at line 183 of file TRestEventProcess.h.

◆ GetOutputEvent()

virtual RESTValue TRestEventProcess::GetOutputEvent ( ) const
pure virtual

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

Implemented in TRestLegacyProcess, TRestBenchMarkProcess, TRestDataQualityProcess, TRestEventRateAnalysisProcess, TRestEventSelectionProcess, TRestMySQLToAnalysisProcess, TRestRealTimeAddInputFileProcess, TRestRealTimeDrawingProcess, TRestSummaryProcess, TRestAxionAnalysisProcess, TRestAxionEventProcess, TRestAxionFieldPropagationProcess, TRestAxionGeneratorProcess, TRestDetectorHitsToTrackFastProcess, TRestDetectorHitsToTrackProcess, TRestDetectorSignalToRawSignalProcess, TRestGeant4ToDetectorHitsProcess, TRestRawReadoutAnalysisProcess, TRestRawReadoutMetadataProcess, TRestRawToDetectorSignalProcess, TRestTrackToDetectorHitsProcess, TRestDetectorAvalancheProcess, TRestDetectorDaqChannelSwitchingProcess, TRestDetectorElectronDiffusionProcess, TRestDetectorFiducializationProcess, TRestDetectorGarfieldDriftProcess, TRestDetectorHitmapAnalysisProcess, TRestDetectorHits3DReconstructionProcess, TRestDetectorHitsAnalysisProcess, TRestDetectorHitsGaussAnalysisProcess, TRestDetectorHitsNormalizationProcess, TRestDetectorHitsReadoutAnalysisProcess, TRestDetectorHitsReductionProcess, TRestDetectorHitsRotationProcess, TRestDetectorHitsShuffleProcess, TRestDetectorHitsSmearingProcess, TRestDetectorHitsSpecularProcess, TRestDetectorHitsToSignalProcess, TRestDetectorHitsTranslationProcess, TRestDetectorLightAttenuationProcess, TRestDetectorPositionMappingProcess, TRestDetectorSignalChannelActivityProcess, TRestDetectorSignalRecoveryProcess, TRestDetectorSignalToHitsProcess, TRestDetectorSignalViewerProcess, TRestDetectorSingleChannelAnalysisProcess, TRestDetectorTriggerAnalysisProcess, TRestGeant4AnalysisProcess, TRestGeant4BlobAnalysisProcess, TRestGeant4NeutronTaggingProcess, TRestGeant4QuenchingProcess, TRestGeant4VetoAnalysisProcess, TRestRawBaseLineCorrectionProcess, TRestRawBiPoAnalysisProcess, TRestRawCommonNoiseReductionProcess, TRestRawFindResponseSignalProcess, TRestRawMemoryBufferToSignalProcess, TRestRawPeaksFinderProcess, TRestRawSignalAddNoiseProcess, TRestRawSignalAnalysisProcess, TRestRawSignalChannelActivityProcess, TRestRawSignalConvolutionFittingProcess, TRestRawSignalFittingProcess, TRestRawSignalGeneralFitProcess, TRestRawSignalIdTaggingProcess, TRestRawSignalRangeReductionProcess, TRestRawSignalRemoveChannelsProcess, TRestRawSignalShapingProcess, TRestRawSignalViewerProcess, TRestRawToSignalProcess, TRestRawVetoAnalysisProcess, TRestTrack2DAnalysisProcess, TRestTrack3DAnalysisProcess, TRestTrackAnalysisProcess, TRestTrackBlobAnalysisProcess, TRestTrackDetachIsolatedNodesProcess, TRestTrackLineAnalysisProcess, TRestTrackLinearizationProcess, TRestTrackPathMinimizationProcess, TRestTrackPointLikeAnalysisProcess, TRestTrackReconnectionProcess, TRestTrackReductionProcess, and TRestTrackViewerProcess.

◆ GetParallelDataMembers()

template<class T >
std::vector< T > TRestEventProcess::GetParallelDataMembers ( T *  member_of_process)
inlineprotected

Get a list of data members from parallel processes which is same to this process's certain data member.

This method can be used in merging and exporting histograms at the end of the process, to support multi-thread run.

Because all the parallel processes are in same data structure, this method directly gets the data members by accessing certain offset.

Usage: (suppose we defined fHist as data member) auto hists = this->GetParallelObjects(&fHist); for (auto h : hists) { fHist->Add(h); }

Definition at line 128 of file TRestEventProcess.h.

◆ GetProcessName()

virtual const char * TRestEventProcess::GetProcessName ( ) const
pure virtual

◆ GetRunInfo()

TRestRun * TRestEventProcess::GetRunInfo ( ) const
inline

Return the pointer of the hosting TRestRun object.

Definition at line 263 of file TRestEventProcess.h.

◆ GetTotalBytes()

virtual Long64_t TRestEventProcess::GetTotalBytes ( ) const
inlinevirtual

Interface to external file reading, get the total bytes of input binary file. To be implemented in external processes.

Reimplemented in TRestRawToSignalProcess.

Definition at line 255 of file TRestEventProcess.h.

◆ GetTotalBytesRead()

virtual Long64_t TRestEventProcess::GetTotalBytesRead ( ) const
inlinevirtual

Interface to external file reading, get the read bytes. To be implemented in external processes.

Reimplemented in TRestRawToSignalProcess.

Definition at line 257 of file TRestEventProcess.h.

◆ InitFromConfigFile()

virtual void TRestEventProcess::InitFromConfigFile ( )
inlineoverridevirtual

To make settings from rml file. This method must be implemented in the derived class.

Reimplemented from TRestMetadata.

Reimplemented in TRestDataQualityProcess, TRestMySQLToAnalysisProcess, TRestRealTimeAddInputFileProcess, TRestSummaryProcess, TRestAxionTransmissionProcess, TRestDetectorHitsToTrackFastProcess, TRestDetectorSignalToRawSignalProcess, TRestGeant4ToDetectorHitsProcess, TRestRawReadoutAnalysisProcess, TRestTrackToDetectorHitsProcess, TRestDetectorAvalancheProcess, TRestDetectorDaqChannelSwitchingProcess, TRestDetectorElectronDiffusionProcess, TRestDetectorFiducializationProcess, TRestDetectorHitmapAnalysisProcess, TRestDetectorHits3DReconstructionProcess, TRestDetectorHitsAnalysisProcess, TRestDetectorHitsNormalizationProcess, TRestDetectorHitsReadoutAnalysisProcess, TRestDetectorHitsReductionProcess, TRestDetectorHitsRotationProcess, TRestDetectorHitsShuffleProcess, TRestDetectorHitsSpecularProcess, TRestDetectorHitsTranslationProcess, TRestDetectorPositionMappingProcess, TRestDetectorSignalChannelActivityProcess, TRestDetectorSignalViewerProcess, TRestDetectorSingleChannelAnalysisProcess, TRestGeant4BlobAnalysisProcess, TRestGeant4NeutronTaggingProcess, TRestGeant4QuenchingProcess, TRestGeant4VetoAnalysisProcess, TRestRawMemoryBufferToSignalProcess, TRestRawPeaksFinderProcess, TRestRawSignalAnalysisProcess, TRestRawSignalConvolutionFittingProcess, TRestRawSignalIdTaggingProcess, TRestRawSignalRangeReductionProcess, TRestRawSignalRemoveChannelsProcess, TRestRawSignalViewerProcess, TRestRawToSignalProcess, TRestRawVetoAnalysisProcess, TRestTrack2DAnalysisProcess, TRestTrack3DAnalysisProcess, TRestTrackAnalysisProcess, TRestTrackBlobAnalysisProcess, TRestTrackDetachIsolatedNodesProcess, TRestTrackPointLikeAnalysisProcess, and TRestTrackReconnectionProcess.

Definition at line 203 of file TRestEventProcess.h.

◆ InitProcess()

virtual void TRestEventProcess::InitProcess ( )
inlinevirtual

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

Reimplemented in TRestLegacyProcess, TRestBenchMarkProcess, TRestDataQualityProcess, TRestEventRateAnalysisProcess, TRestEventSelectionProcess, TRestMySQLToAnalysisProcess, TRestRealTimeAddInputFileProcess, TRestRealTimeDrawingProcess, TRestSummaryProcess, TRestAxionDeviationProcess, TRestAxionEventProcess, TRestAxionFieldPropagationProcess, TRestAxionGeneratorProcess, TRestAxionOpticsProcess, TRestAxionTransmissionProcess, TRestAxionTransportProcess, TRestDetectorHitsToTrackFastProcess, TRestDetectorSignalToRawSignalProcess, TRestGeant4ToDetectorHitsProcess, TRestRawReadoutAnalysisProcess, TRestRawReadoutMetadataProcess, TRestTrackToDetectorHitsProcess, TRestDetectorAvalancheProcess, TRestDetectorDaqChannelSwitchingProcess, TRestDetectorElectronDiffusionProcess, TRestDetectorFiducializationProcess, TRestDetectorHits3DReconstructionProcess, TRestDetectorHitsAnalysisProcess, TRestDetectorHitsGaussAnalysisProcess, TRestDetectorHitsNormalizationProcess, TRestDetectorHitsReadoutAnalysisProcess, TRestDetectorHitsReductionProcess, TRestDetectorHitsShuffleProcess, TRestDetectorHitsSmearingProcess, TRestDetectorHitsToSignalProcess, TRestDetectorLightAttenuationProcess, TRestDetectorPositionMappingProcess, TRestDetectorSignalChannelActivityProcess, TRestDetectorSignalRecoveryProcess, TRestDetectorSignalToHitsProcess, TRestDetectorSignalViewerProcess, TRestDetectorSingleChannelAnalysisProcess, TRestDetectorTriggerAnalysisProcess, TRestGeant4AnalysisProcess, TRestGeant4BlobAnalysisProcess, TRestGeant4NeutronTaggingProcess, TRestGeant4QuenchingProcess, TRestGeant4VetoAnalysisProcess, TRestRawAFTERToSignalProcess, TRestRawBaseLineCorrectionProcess, TRestRawBiPoAnalysisProcess, TRestRawBiPoToSignalProcess, TRestRawCommonNoiseReductionProcess, TRestRawFEUDreamToSignalProcess, TRestRawFindResponseSignalProcess, TRestRawMemoryBufferToSignalProcess, TRestRawMultiCoBoAsAdToSignalProcess, TRestRawMultiFEMINOSToSignalProcess, TRestRawPeaksFinderProcess, TRestRawSignalAnalysisProcess, TRestRawSignalChannelActivityProcess, TRestRawSignalConvolutionFittingProcess, TRestRawSignalFittingProcess, TRestRawSignalGeneralFitProcess, TRestRawSignalIdTaggingProcess, TRestRawSignalRangeReductionProcess, TRestRawSignalShapingProcess, TRestRawSignalViewerProcess, TRestRawTDSToSignalProcess, TRestRawToSignalProcess, TRestRawUSTCToSignalProcess, TRestRawVetoAnalysisProcess, TRestTrack2DAnalysisProcess, TRestTrack3DAnalysisProcess, TRestTrackAnalysisProcess, TRestTrackBlobAnalysisProcess, TRestTrackDetachIsolatedNodesProcess, TRestTrackLineAnalysisProcess, TRestTrackLinearizationProcess, TRestTrackPathMinimizationProcess, TRestTrackPointLikeAnalysisProcess, TRestTrackReconnectionProcess, TRestTrackReductionProcess, and TRestTrackViewerProcess.

Definition at line 224 of file TRestEventProcess.h.

◆ isExternal()

Bool_t TRestEventProcess::isExternal ( ) const
inline

Return whether this process is external process.

Definition at line 261 of file TRestEventProcess.h.

◆ LoadSectionMetadata()

Int_t TRestEventProcess::LoadSectionMetadata ( )
overridevirtual

This method does some preparation of xml section.

Preparation includes: setting the name, title and verbose level of the current class. Finding out and saving the env sections.

By calling TRestMetadata::ReadElement(), is also expands for loops and include definitions, and replaces env and expressions in rml config section.

Reimplemented from TRestMetadata.

◆ NotifyAnalysisTreeReset()

virtual void TRestEventProcess::NotifyAnalysisTreeReset ( )
inlinevirtual

In case the analysis tree is reset(switched to new file), some process needs to have action.

Definition at line 246 of file TRestEventProcess.h.

◆ ProcessEvent()

virtual TRestEvent * TRestEventProcess::ProcessEvent ( TRestEvent inputEvent)
pure virtual

Process one event.

Implemented in TRestLegacyProcess, TRestAxionFieldPropagationProcess, TRestAxionGeneratorProcess, TRestDetectorSignalRecoveryProcess, TRestRawBaseLineCorrectionProcess, TRestRawBiPoAnalysisProcess, TRestAxionAnalysisProcess, TRestAxionDeviationProcess, TRestAxionOpticsProcess, TRestAxionTransmissionProcess, TRestAxionTransportProcess, TRestBenchMarkProcess, TRestDataQualityProcess, TRestEventRateAnalysisProcess, TRestEventSelectionProcess, TRestMySQLToAnalysisProcess, TRestRealTimeAddInputFileProcess, TRestRealTimeDrawingProcess, TRestSummaryProcess, TRestDetectorHitsToTrackFastProcess, TRestDetectorHitsToTrackProcess, TRestDetectorSignalToRawSignalProcess, TRestGeant4ToDetectorHitsProcess, TRestRawReadoutAnalysisProcess, TRestRawReadoutMetadataProcess, TRestRawToDetectorSignalProcess, TRestTrackToDetectorHitsProcess, TRestDetectorAvalancheProcess, TRestDetectorDaqChannelSwitchingProcess, TRestDetectorElectronDiffusionProcess, TRestDetectorFiducializationProcess, TRestDetectorGarfieldDriftProcess, TRestDetectorHitmapAnalysisProcess, TRestDetectorHits3DReconstructionProcess, TRestDetectorHitsAnalysisProcess, TRestDetectorHitsGaussAnalysisProcess, TRestDetectorHitsNormalizationProcess, TRestDetectorHitsReadoutAnalysisProcess, TRestDetectorHitsReductionProcess, TRestDetectorHitsRotationProcess, TRestDetectorHitsShuffleProcess, TRestDetectorHitsSmearingProcess, TRestDetectorHitsSpecularProcess, TRestDetectorHitsToSignalProcess, TRestDetectorHitsTranslationProcess, TRestDetectorLightAttenuationProcess, TRestDetectorPositionMappingProcess, TRestDetectorSignalChannelActivityProcess, TRestDetectorSignalToHitsProcess, TRestDetectorSignalViewerProcess, TRestDetectorSingleChannelAnalysisProcess, TRestDetectorTriggerAnalysisProcess, TRestGeant4AnalysisProcess, TRestGeant4BlobAnalysisProcess, TRestGeant4NeutronTaggingProcess, TRestGeant4QuenchingProcess, TRestGeant4VetoAnalysisProcess, TRestRawAFTERToSignalProcess, TRestRawBiPoToSignalProcess, TRestRawCommonNoiseReductionProcess, TRestRawFEUDreamToSignalProcess, TRestRawFindResponseSignalProcess, TRestRawMemoryBufferToSignalProcess, TRestRawMultiCoBoAsAdToSignalProcess, TRestRawMultiFEMINOSToSignalProcess, TRestRawPeaksFinderProcess, TRestRawSignalAddNoiseProcess, TRestRawSignalAnalysisProcess, TRestRawSignalChannelActivityProcess, TRestRawSignalConvolutionFittingProcess, TRestRawSignalFittingProcess, TRestRawSignalGeneralFitProcess, TRestRawSignalIdTaggingProcess, TRestRawSignalRangeReductionProcess, TRestRawSignalRemoveChannelsProcess, TRestRawSignalShapingProcess, TRestRawSignalViewerProcess, TRestRawTDSToSignalProcess, TRestRawUSTCToSignalProcess, TRestRawVetoAnalysisProcess, TRestTrack2DAnalysisProcess, TRestTrack3DAnalysisProcess, TRestTrackAnalysisProcess, TRestTrackBlobAnalysisProcess, TRestTrackDetachIsolatedNodesProcess, TRestTrackLineAnalysisProcess, TRestTrackLinearizationProcess, TRestTrackPathMinimizationProcess, TRestTrackPointLikeAnalysisProcess, TRestTrackReconnectionProcess, TRestTrackReductionProcess, and TRestTrackViewerProcess.

◆ RegisterAllObservables()

void TRestEventProcess::RegisterAllObservables ( Bool_t  value = true)
inline

Definition at line 220 of file TRestEventProcess.h.

◆ ResetEntry()

virtual Bool_t TRestEventProcess::ResetEntry ( )
inlinevirtual

Definition at line 216 of file TRestEventProcess.h.

◆ SetCanvasSize()

void TRestEventProcess::SetCanvasSize ( Int_t  x,
Int_t  y 
)
inline

Set canvas size.

Definition at line 240 of file TRestEventProcess.h.

◆ SetObservableValidation()

void TRestEventProcess::SetObservableValidation ( bool  validate)
inline

Definition at line 218 of file TRestEventProcess.h.

◆ SetObservableValue()

template<class T >
void TRestEventProcess::SetObservableValue ( const std::string &  name,
const T &  value 
)
inlineprotected

Set observable value for AnalysisTree.

It will rename the observable to "processName_obsName" If use dynamic observable, it will try to create new observable in the AnalysisTree if the observable is not found

Definition at line 151 of file TRestEventProcess.h.

◆ SetRunInfo()

void TRestEventProcess::SetRunInfo ( TRestRun r)
inline

Set TRestRun for this process.

Definition at line 238 of file TRestEventProcess.h.

◆ singleThreadOnly()

Bool_t TRestEventProcess::singleThreadOnly ( ) const
inline

Return whether this process is single std::thread only.

Definition at line 259 of file TRestEventProcess.h.

Field Documentation

◆ fAnalysisTree

TRestAnalysisTree* TRestEventProcess::fAnalysisTree = nullptr
protected

< Pointer to the analysis tree where to store observable definitions and values. Note that this tree does not write data to disk. It only keeps a list of observables and their addresses. It is the one from TRestRun that reads this tree's structure, calls Fill() method, and writes data to disk. In other words, this tree is dummy and has zero entries. To get the real one, use GetFullAnalysisTree()

Definition at line 72 of file TRestEventProcess.h.

◆ fCanvas

TCanvas* TRestEventProcess::fCanvas = nullptr
protected

< Canvas for some viewer event

Definition at line 64 of file TRestEventProcess.h.

◆ fCanvasSize

TVector2 TRestEventProcess::fCanvasSize
protected

Canvas size.

Definition at line 66 of file TRestEventProcess.h.

◆ fCuts

std::vector<std::pair<std::string, TVector2> > TRestEventProcess::fCuts
protected

Stores cut definitions. Any listed observables should be in the range.

[name, id in AnalysisTree]

Definition at line 92 of file TRestEventProcess.h.

◆ fDynamicObs

bool TRestEventProcess::fDynamicObs = false
protected

It defines whether to use added observables only or all the observables appear in the code.

Definition at line 84 of file TRestEventProcess.h.

◆ fFriendlyProcesses

std::vector<TRestEventProcess*> TRestEventProcess::fFriendlyProcesses
private

/// not used

Stores a list of friendly processes. Sometimes the process may behave differently according to the friend processes added. It can also get parameter or output event from friend processes

Definition at line 59 of file TRestEventProcess.h.

◆ fInputEvent

TRestEvent* TRestEventProcess::fInputEvent = nullptr
private

< not used, keep for compatibility

Definition at line 50 of file TRestEventProcess.h.

◆ fIsExternal

bool TRestEventProcess::fIsExternal = false
protected

It defines if the process reads event data from an external source.

Definition at line 76 of file TRestEventProcess.h.

◆ fObservablesDefined

std::map<std::string, int> TRestEventProcess::fObservablesDefined
protected

Stores the list of all the appeared process observables in the code.

[name, id in AnalysisTree]

Definition at line 90 of file TRestEventProcess.h.

◆ fObservablesUpdated

std::map<std::string, int> TRestEventProcess::fObservablesUpdated
protected

Stores the list of process observables updated when processing this event.

Definition at line 88 of file TRestEventProcess.h.

◆ fOutputEvent

TRestEvent* TRestEventProcess::fOutputEvent = nullptr
private

< not used, keep for compatibility

Definition at line 52 of file TRestEventProcess.h.

◆ fOutputLevel

REST_Process_Output TRestEventProcess::fOutputLevel
private

not used, keep for compatibility

Definition at line 54 of file TRestEventProcess.h.

◆ fParallelProcesses

std::vector<TRestEventProcess*> TRestEventProcess::fParallelProcesses
private

Stores a list of parallel processes if multithreading is enabled.

Definition at line 61 of file TRestEventProcess.h.

◆ fReadOnly

bool TRestEventProcess::fReadOnly = false
protected

not used, keep for compatibility

Definition at line 82 of file TRestEventProcess.h.

◆ fRunInfo

TRestRun* TRestEventProcess::fRunInfo = nullptr
protected

< Pointer to TRestRun object where to find metadata.

Definition at line 74 of file TRestEventProcess.h.

◆ fSingleThreadOnly

bool TRestEventProcess::fSingleThreadOnly = false
protected

It defines if the process can run only under single std::thread mode. If true, the whole process chain will not use multithreading. Useful for processes with viewing functionality. Always true for external processes.

Definition at line 80 of file TRestEventProcess.h.

◆ fValidateObservables

bool TRestEventProcess::fValidateObservables = false
protected

It defines if observable names should be added to the validation list.

Definition at line 86 of file TRestEventProcess.h.


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