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

Detailed Description

Managing applications and executing tasks.

This class provides a runtime for other REST application class. Its rml element is usually the root element in the file, inside which other REST application class elements are defined. TRestManager instantiates class objects according to the rml file and performs sequential startup for them. Then it runs specific tasks, which is also defined following the applications, to do the jobs. The tasks are handled by class TRestTask.


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 to xml reading and class startup procedure Kaixiang Ni


Definition at line 16 of file TRestManager.h.

#include <TRestManager.h>

Inheritance diagram for TRestManager:
TRestMetadata

Public Member Functions

 ClassDefOverride (TRestManager, 1)
 Call CINT to generate streamers for this class.
 
TRestAnalysisPlotGetAnaPlot ()
 
TRestMetadataGetMetadata (std::string name)
 Get the application metadata class, according to the name. More...
 
TRestMetadataGetMetadataClass (std::string type)
 Get the application metadata class, according to the type. More...
 
TRestProcessRunnerGetProcessRunner ()
 
TRestRunGetRunInfo ()
 
void InitFromConfigFile () override
 To make settings from rml file. This method must be implemented in the derived class. More...
 
void InitFromTask (std::string taskName, std::vector< std::string > arguments)
 
void Initialize () override
 Set the class name as section name during initialization. More...
 
int LoadSectionMetadata () override
 This method does some preparation of xml section. More...
 
void PrintMetadata () override
 PrintMetadata of this class. More...
 
Int_t ReadConfig (std::string keydeclare, TiXmlElement *e)
 Respond to the input xml element. More...
 

Private Attributes

std::vector< TRestMetadata * > fMetaObjects
 app-like metadata objects More...
 

Additional Inherited Members

Constructor & Destructor Documentation

◆ TRestManager()

TRestManager::TRestManager ( )

Definition at line 38 of file TRestManager.cxx.

◆ ~TRestManager()

TRestManager::~TRestManager ( )

Definition at line 40 of file TRestManager.cxx.

Member Function Documentation

◆ GetAnaPlot()

TRestAnalysisPlot * TRestManager::GetAnaPlot ( )
inline

Definition at line 50 of file TRestManager.h.

◆ GetMetadata()

TRestMetadata * TRestManager::GetMetadata ( std::string  name)

Get the application metadata class, according to the name.

Definition at line 196 of file TRestManager.cxx.

◆ GetMetadataClass()

TRestMetadata * TRestManager::GetMetadataClass ( std::string  type)

Get the application metadata class, according to the type.

Definition at line 184 of file TRestManager.cxx.

◆ GetProcessRunner()

TRestProcessRunner * TRestManager::GetProcessRunner ( )
inline

Definition at line 46 of file TRestManager.h.

◆ GetRunInfo()

TRestRun * TRestManager::GetRunInfo ( )
inline

Definition at line 49 of file TRestManager.h.

◆ InitFromConfigFile()

void TRestManager::InitFromConfigFile ( )
inlineoverridevirtual

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

Reimplemented from TRestMetadata.

Definition at line 23 of file TRestManager.h.

◆ InitFromTask()

void TRestManager::InitFromTask ( std::string  taskName,
std::vector< std::string >  arguments 
)

Definition at line 171 of file TRestManager.cxx.

◆ Initialize()

void TRestManager::Initialize ( )
overridevirtual

Set the class name as section name during initialization.

Reimplemented from TRestMetadata.

Definition at line 52 of file TRestManager.cxx.

◆ LoadSectionMetadata()

int TRestManager::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.

Definition at line 65 of file TRestManager.cxx.

◆ PrintMetadata()

void TRestManager::PrintMetadata ( )
overridevirtual

PrintMetadata of this class.

Not implemented.

Reimplemented from TRestMetadata.

Definition at line 210 of file TRestManager.cxx.

◆ ReadConfig()

Int_t TRestManager::ReadConfig ( std::string  keydeclare,
TiXmlElement *  e 
)

Respond to the input xml element.

If the declaration of the input element is:

  1. TRestXXX: Startup the TRestXXX class with this xml element(sequential startup).
  2. AddTask: Do some special operations for the managed application TRestMetadata class

Suppported tasks:

  1. processEvents, analysisPlot, saveMetadata: directly do the jobs
  2. name of a REST macro: instaintate TRestTask to parse it, then run this TRestTask.
  3. C++ style command: call gInterpreter to execute it. Other types of declarations will be omitted.

Definition at line 83 of file TRestManager.cxx.

Field Documentation

◆ fMetaObjects

std::vector<TRestMetadata*> TRestManager::fMetaObjects
private

app-like metadata objects

Definition at line 19 of file TRestManager.h.


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