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.
 
TRestMetadataGetMetadataClass (std::string type)
 Get the application metadata class, according to the type.
 
TRestProcessRunnerGetProcessRunner ()
 
TRestRunGetRunInfo ()
 
void InitFromConfigFile () override
 To make settings from rml file. This method must be implemented in the derived class.
 
void InitFromTask (std::string taskName, std::vector< std::string > arguments)
 
void Initialize () override
 Set the class name as section name during initialization.
 
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
 

Additional Inherited Members

Member Function Documentation

◆ 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.


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