REST-for-Physics
v2.3
Rare Event Searches ToolKit for Physics
|
A base class for any REST metadata class.
One of the core classes of REST. Abstract class from which all REST "metadata classes" must derive. A metadata class in REST is any holder of data other than event data that is relevant to understand the origin and history of transformations that a given set of event data has gone through. For example the geometry of a simulation, the parameters of a process, the properties of a gas, the readout pattern used to "pixelize" data, etc... are examples of metadata. All metadata classes can be "initialized" via configuration (.rml) files that the user can write. Alternatively they can be read from root files. TRestMetadata contains the common functionality that allows metadata to be read from .rml files or previously stored
TRestMetadata structures stored in a ROOT file.
A class deriving from TRestMetadata can retrieve information from a plain text configuration file (or RML file). The syntaxis in an RML file is imposed by TRestMetadata. The rml file is encoded in standard xml format and has a structure similar to the real class structure. The following piece of code shows the common structure of the metadata description corresponding to a specific metadata class.
In REST, the key word "ClassName", "SomeCommand", "ContainedClassName" shown above are all called xml decalration. The key words like "field1="value1"" or "name="userGivenName"" are called fields or xml attributes. All the sealed xml structure is called xml element or xml section.
Note that the decalration "include", "for", "variable" and "constant" is reserved for the software. They works differently than others, which we will talk later.
The rml file is designed to start up/instruct all the metadata classes. Usually we implement the method Initialize() and calls it in the constructor to do some default settings.
The starter method LoadConfigFromFile() is implemented in this class, with four overloads, as shown in the following.
If no arguments are provided, LoadConfigFromFile() will only call the Initialize() method. If given the rml file name, it will find out the needed rml sections. We can also directly give the xml sections to the method. Two xml sections are used to startup the class: the section for the class and a global section. Additionally we can give a map object to the method to import additional variables.
The "section for the class" is an xml section with the value of class name. It is the main information source for the class's startup. The "global" section is a special xml section in the rml file, containing global information which could be seen by all the class sections.
With the xml sections given, LoadConfigFromFile() first merge them together. Then it calls LoadSectionMetadata(), which loads some universal parameters like name, title and verbose level. This method also preprocesses the config sections, expanding the include/for definition and replacing the variables. After this, LoadConfigFromFile() calls the method InitFromConfigFile().
InitFromConfigFile() is a pure virtual method and every child classes have to implement it. This method defines how the metadata class loads its xml config section. A simple kind of implementation is to add few lines of GetParameter():
A more advanced usage is sequential startup, when the metadata class contains another metadata class. We can write in the host class's InitFromConfigFile() to new the resident class, and the call the resident class's LoadConfigFromFile() method, giving the child section as the resident class's config section. The rml hierarchy could therefore be the same as class residence.
For example, when received an xml section declared "TRestRun", the host "TRestManager" will pass this section (together with its global section) to its resident "TRestRun". The TRestRun class can therefore perform a startup using these sections.
By default, LoadConfigFromFile() will look into only the first-level child sections of both global and sectional section. If the section value is either "variable" or "constant", the class will keep them for replacement.
LoadConfigFromFile() will replace the field values of xml sections before they are used. The procedure of replacing is as following:
After replacement, LoadConfigFromFile() will call TFormula to evaluate the string if it is identified as an math expression.
The result string of the field value is either a number string or a string with concrete content. In the example code above, the section declared with parameter
will have its field value reset to string 126.
See also the section The globals section.
It is possible to link to other files in any section. There are two include modes:
After the expansion is done, variable replacement is also performed.
If the target file is a root file, there will be a different way to load, see TRestRun::ImportMetadata()
The definition of FOR loops is implemented in RML in order to allow extense definitions, where many elements may need to be added to an existing array in our metadata structure. The use of FOR loops allows to introduce more versatil and extense definitions. Its implementation was fundamentally triggered by its use in the construction of complex, multi-channel generic readouts by TRestDetectorReadout.
The for loop definition can be either from-to-step
structure or in
structure. The loop variable is defined in variable
attribute, which is treated same as rml variable. In from-to-step
structure, the value must be numbers. REST will loop form from
to to
with step size step
. In in
structure, the values are treated as string, and must be separated with :
. For example:
The first for loop definition will be expanded to 64 <readoutChannel sections with 64 <addPixel sections in each. The nCh and nPix variables will be 0~64 in each section. The second for loop definition will be expanded to 7 <TRestAnalysisPlot sections with nMod be valued 0,2,3,4,6,8,9 respectivelly.
Definition at line 70 of file TRestMetadata.h.
#include <TRestMetadata.h>
Public Member Functions | |
void | AddLog (std::string log="", bool print=true) |
Add logs to messageBuffer. More... | |
void | DoNotStore () |
If this method is called the metadata information will not be stored in disk. More... | |
TVector2 | Get2DVectorParameterWithUnits (std::string parName, TVector2 defaultValue=TVector2(-1, -1)) |
TVector3 | Get3DVectorParameterWithUnits (std::string parName, TVector3 defaultValue=TVector3(-1, -1, -1)) |
TString | GetCommit () |
Returns the REST commit value stored in fCommit. More... | |
std::string | GetConfigBuffer () |
Returns the config section of this class. More... | |
std::string | GetDataMemberValue (std::string memberName) |
Get the value of data member as string. More... | |
std::vector< std::string > | GetDataMemberValues (std::string memberName, Int_t precision=0) |
Get the value of datamember as a vector of strings. More... | |
TString | GetDataPath () |
Returns a std::string with the path used for data storage. More... | |
Double_t | GetDblParameterWithUnits (std::string parName, Double_t defaultValue=PARAMETER_NOT_FOUND_DBL) |
Gets the value of the parameter name parName, after applying unit conversion. More... | |
Bool_t | GetError () const |
It returns true if an error was identified by a derived metadata class. More... | |
TString | GetErrorMessage () |
Returns a std::string containing the error message. More... | |
TString | GetLibraryVersion () |
Returns the REST libraty version stored in fLibraryVersion. More... | |
TString | GetMainDataPath () |
Gets a std::string with the path used for data storage. More... | |
Int_t | GetNumberOfErrors () const |
Int_t | GetNumberOfWarnings () const |
std::string | GetParameter (std::string parName, TString defaultValue=PARAMETER_NOT_FOUND_STR) |
Returns corresponding REST Metadata parameter from multiple sources. More... | |
std::string | GetSectionName () |
Returns the section name of this class, defined at the beginning of fSectionName. More... | |
TRestStringOutput::REST_Verbose_Level | GetVerboseLevel () |
returns the verboselevel in type of REST_Verbose_Level enumerator More... | |
TString | GetVerboseLevelString () |
returns the verbose level in type of TString More... | |
TString | GetVersion () |
Returns the REST version stored in fVersion. More... | |
Int_t | GetVersionCode () |
Bool_t | GetWarning () const |
It returns true if an error was identified by a derived metadata class. More... | |
TString | GetWarningMessage () |
Returns a std::string containing the warning message. More... | |
virtual void | Initialize () |
Making default settings. More... | |
TRestMetadata * | InstantiateChildMetadata (int index, std::string pattern="") |
This method will retrieve a new TRestMetadata instance of a child element of the present TRestMetadata instance based on the index given by argument, which defines the element order to be retrieved, 0 for first element found, 1 for the second element found, etc. More... | |
TRestMetadata * | InstantiateChildMetadata (std::string pattern="", std::string name="") |
This method will retrieve a new TRestMetadata instance of a child element of the present TRestMetadata instance based on the name given by argument. More... | |
Bool_t | isCleanState () const |
Bool_t | isOfficialRelease () const |
Int_t | LoadConfigFromBuffer () |
Initialize data from a string element buffer. More... | |
Int_t | LoadConfigFromElement (TiXmlElement *eSectional, TiXmlElement *eGlobal, std::map< std::string, std::string > envs={}) |
Main starter method. More... | |
Int_t | LoadConfigFromFile (const std::string &configFilename, const std::string §ionName="") |
Give the file name, find out the corresponding section. Then call the main starter. More... | |
virtual void | Merge (const TRestMetadata &) |
TRestMetadata & | operator= (const TRestMetadata &)=delete |
void | Print () |
Implementing TObject::Print() method. More... | |
void | PrintConfigBuffer () |
Print the config xml section stored in the class. More... | |
void | PrintMessageBuffer () |
Print the buffered message. More... | |
virtual void | PrintMetadata () |
Implemented it in the derived metadata class to print out specific metadata information. More... | |
void | PrintTimeStamp (Double_t timeStamp) |
Print the current time on local machine. More... | |
void | SetConfigFile (std::string configFilename) |
set config file path from external More... | |
void | SetError (std::string message="", bool print=true) |
A metadata class may use this method to signal that something went wrong. More... | |
void | SetHostmgr (TRestManager *m) |
Set the host manager for this class. More... | |
void | SetSectionName (std::string sName) |
set the section name, clear the section content More... | |
void | SetVerboseLevel (TRestStringOutput::REST_Verbose_Level v) |
sets the verbose level More... | |
void | SetWarning (std::string message="", bool print=true) |
A metadata class may use this method to signal that something went wrong. More... | |
void | Store () |
If this method is called the metadata information will be stored in disk. More... | |
TRestMetadata (const TRestMetadata &)=delete | |
virtual void | UpdateMetadataMembers () |
Method to allow implementation of specific metadata members updates at inherited classes. More... | |
virtual Int_t | Write (const char *name=nullptr, Int_t option=0, Int_t bufsize=0) |
overwriting the write() method with fStore considered More... | |
void | WriteConfigBuffer (std::string fName) |
Writes the config buffer to a file in append mode. More... | |
~TRestMetadata () | |
TRestMetadata default destructor. More... | |
Protected Member Functions | |
std::string | ElementToString (TiXmlElement *ele) |
Convert an TiXmlElement object to string. More... | |
TVector2 | Get2DVectorParameterWithUnits (std::string parName, TiXmlElement *e, TVector2 defaultValue=TVector2(-1, -1)) |
TVector3 | Get3DVectorParameterWithUnits (std::string parName, TiXmlElement *e, TVector3 defaultValue=TVector3(-1, -1, -1)) |
Double_t | GetDblParameterWithUnits (std::string parName, TiXmlElement *e, Double_t defaultVal=PARAMETER_NOT_FOUND_DBL) |
TiXmlElement * | GetElement (std::string eleDeclare, TiXmlElement *e=nullptr) |
Get an xml element from a given parent element, according to its declaration. More... | |
TiXmlElement * | GetElementFromFile (std::string configFilename, std::string NameOrDecalre="") |
Open an xml encoded file and find its element. More... | |
TiXmlElement * | GetElementWithName (std::string eleDeclare, std::string eleName) |
Get an xml element from the default location, according to its declaration and its field "name". More... | |
TiXmlElement * | GetElementWithName (std::string eleDeclare, std::string eleName, TiXmlElement *e) |
Get an xml element from a given parent element, according to its declaration and its field "name". More... | |
std::string | GetFieldValue (std::string fieldName, std::string definition, size_t fromPosition=0) |
Gets field value in an xml element string by parsing it as TiXmlElement. More... | |
std::string | GetFieldValue (std::string parName, TiXmlElement *e) |
Returns the field value of an xml element which has the specified name. More... | |
std::string | GetKEYDefinition (std::string keyName) |
Gets the first key definition for keyName found inside buffer starting at fromPosition. More... | |
std::string | GetKEYDefinition (std::string keyName, size_t &Position) |
std::string | GetKEYDefinition (std::string keyName, size_t &Position, std::string buffer) |
std::string | GetKEYDefinition (std::string keyName, std::string buffer) |
std::string | GetKEYStructure (std::string keyName) |
Gets the first key structure for keyName found inside buffer after fromPosition. More... | |
std::string | GetKEYStructure (std::string keyName, size_t &Position) |
std::string | GetKEYStructure (std::string keyName, size_t &Position, std::string buffer) |
std::string | GetKEYStructure (std::string keyName, size_t &Position, TiXmlElement *ele) |
std::string | GetKEYStructure (std::string keyName, std::string buffer) |
TiXmlElement * | GetNextElement (TiXmlElement *e) |
Get the next sibling xml element of this element, with same eleDeclare. More... | |
std::string | GetParameter (std::string parName, size_t &pos, std::string inputString) |
Returns the value for the parameter name parName found in inputString. More... | |
std::string | GetParameter (std::string parName, TiXmlElement *e, TString defaultValue=PARAMETER_NOT_FOUND_STR) |
Returns the value for the parameter named parName in the given section. More... | |
std::pair< std::string, std::string > | GetParameterAndUnits (std::string parname, TiXmlElement *e=nullptr) |
Returns the unit string of the given parameter of the given xml section. More... | |
std::map< std::string, std::string > | GetParametersList () |
It retrieves a map of all parameter:value found in the metadata class. More... | |
TString | GetSearchPath () |
virtual void | InitFromConfigFile () |
To make settings from rml file. This method must be implemented in the derived class. More... | |
virtual void | InitFromRootFile () |
Method called after the object is retrieved from root file. More... | |
virtual Int_t | LoadSectionMetadata () |
This method does some preparation of xml section. More... | |
void | ReadAllParameters () |
Reflection methods, Set value of a datamember in class according to TRestMetadata::fElement. More... | |
void | ReadParametersList (std::map< std::string, std::string > &list) |
It reads a parameter list and associates it to its corresponding metadata member. par0 --> fPar0. More... | |
std::string | ReplaceConstants (const std::string buffer) |
Identifies "constants" in the input buffer, and replace them with corresponding value. More... | |
std::string | ReplaceVariables (const std::string buffer) |
Identifies environmental variable replacing marks in the input buffer, and replace them with corresponding value. More... | |
void | ReSetVersion () |
Resets the version of TRestRun to REST_RELEASE. Only TRestRun is allowed to update version. More... | |
std::string | SearchFile (std::string filename) |
Search files in current directory and directories specified in "searchPath" section. More... | |
void | SetLibraryVersion (TString version) |
Set the library version of this metadata class. More... | |
TiXmlElement * | StringToElement (std::string definition) |
Parsing a string into TiXmlElement object. More... | |
TRestMetadata () | |
TRestMetadata default constructor. More... | |
TRestMetadata (const char *configFilename) | |
constructor More... | |
void | UnSetVersion () |
Resets the version of TRestRun to -1, in case the file is old REST file. Only TRestRun is allowed to update version. More... | |
Protected Attributes | |
std::string | configBuffer |
The buffer where the corresponding metadata section is stored. Filled only during Write() More... | |
std::string | fConfigFileName |
Full name of the rml file. More... | |
std::map< std::string, std::string > | fConstants |
Saving a list of rml constants. name-value std::pair. Constants are temporary for this class only. More... | |
TiXmlElement * | fElement |
Saving the sectional element together with global element. More... | |
TiXmlElement * | fElementGlobal |
Saving the global element, to be passed to the resident class, if necessary. More... | |
Bool_t | fError = false |
It can be used as a way to identify that something went wrong using SetError method. More... | |
TString | fErrorMessage = "" |
A std::string to store an optional error message through method SetError. More... | |
TRestManager * | fHostmgr |
All metadata classes can be initialized and managed by TRestManager. More... | |
Int_t | fNErrors = 0 |
It counts the number of errors notified. More... | |
Int_t | fNWarnings = 0 |
It counts the number of warnings notified. More... | |
std::string | fSectionName |
Section name given in the constructor of the derived metadata class. More... | |
Bool_t | fStore |
This variable is used to determine if the metadata structure should be stored in the ROOT file. More... | |
std::map< std::string, std::string > | fVariables |
Saving a list of rml variables. name-value std::pair. More... | |
TRestStringOutput::REST_Verbose_Level | fVerboseLevel |
Verbose level used to print debug info. More... | |
Bool_t | fWarning = false |
It can be used as a way to identify that something went wrong using SetWarning method. More... | |
TString | fWarningMessage = "" |
It can be used as a way to identify that something went wrong using SetWarning method. More... | |
std::string | messageBuffer |
The buffer to store the output message through TRestStringOutput in this class. More... | |
endl_t | RESTendl |
Termination flag object for TRestStringOutput. More... | |
Private Member Functions | |
void | ExpandForLoopOnce (TiXmlElement *e, const std::map< std::string, std::string > &forLoopVar) |
Helper method for TRestMetadata::ExpandForLoops(). More... | |
void | ExpandForLoops (TiXmlElement *e, std::map< std::string, std::string > forLoopVar) |
Expands the loop structures found in the given xml section. More... | |
void | ExpandIfSections (TiXmlElement *e) |
Judge the if condition and expands the elements inside it. More... | |
void | ExpandIncludeFile (TiXmlElement *e) |
Open the given rml file and find the corresponding section. More... | |
std::string | FieldNamesToUpper (std::string inputString) |
This method updates all the field names inside the definition string provided by argument to make them upper case, the result will be given in the return string. More... | |
std::string | GetUnits (TiXmlElement *e) |
Returns a string with the unit name given in the given xml element. More... | |
void | ReadElement (TiXmlElement *e, bool recursive=false) |
Read the given xml section, applying rml syntax(if, for, include, etc.) More... | |
void | ReadEnvInElement (TiXmlElement *e, bool overwrite=true) |
Identify an environmental variable section and add it into env section list. More... | |
void | ReadOneParameter (std::string name, std::string value) |
TiXmlElement * | ReplaceElementAttributes (TiXmlElement *e) |
replace the field value(attribute) of the given xml element More... | |
void | ReplaceForLoopVars (TiXmlElement *e, std::map< std::string, std::string > forLoopVar) |
Helper method for TRestMetadata::ExpandForLoops(). More... | |
Private Attributes | |
Bool_t | fCleanState = false |
TString | fCommit = REST_COMMIT |
TString | fLibraryVersion = "0" |
Bool_t | fOfficialRelease = false |
TString | fVersion = REST_RELEASE |
REST version std::string, only used for archive and retrieve. More... | |
|
protected |
TRestMetadata default constructor.
Definition at line 493 of file TRestMetadata.cxx.
|
protected |
constructor
Definition at line 518 of file TRestMetadata.cxx.
TRestMetadata::~TRestMetadata | ( | ) |
TRestMetadata default destructor.
Definition at line 543 of file TRestMetadata.cxx.
void TRestMetadata::AddLog | ( | std::string | log = "" , |
bool | print = true |
||
) |
Add logs to messageBuffer.
Definition at line 2628 of file TRestMetadata.cxx.
|
inline |
If this method is called the metadata information will not be stored in disk.
Definition at line 317 of file TRestMetadata.h.
|
protected |
Convert an TiXmlElement object to string.
This method does't arrange the output. All the contents are written in one line.
Definition at line 1883 of file TRestMetadata.cxx.
|
private |
Helper method for TRestMetadata::ExpandForLoops().
Definition at line 1068 of file TRestMetadata.cxx.
|
private |
Expands the loop structures found in the given xml section.
The expansion is done by creating new TiXmlElement objects and inserting them in the given xml section. Loop variable is treated samely as REST "variable"
Definition at line 1166 of file TRestMetadata.cxx.
|
private |
Judge the if condition and expands the elements inside it.
The example IF structure:
"evaluate" specifies the shell command, the output of which is used. "condition" specifies the comparing condition. So here if the home directory is "/home/nkx", the process "TRestRawZeroSuppresionProcess" will be added If the current date is larger than 2019-08-21, the process "TRestDetectorSignalToHitsProcess" will be added
Supports condition markers: ==
, !=
, >
, <
, <=
, >=
. Its better to escape the ">", "<" markers. Note that the >
, <
calculation is also valid for strings. The ordering is according to the alphabet
Definition at line 981 of file TRestMetadata.cxx.
|
private |
Open the given rml file and find the corresponding section.
It will search rml file in both current directory and "searchPath". Two include modes:
Definition at line 1246 of file TRestMetadata.cxx.
|
private |
This method updates all the field names inside the definition string provided by argument to make them upper case, the result will be given in the return string.
Definition at line 2031 of file TRestMetadata.cxx.
|
protected |
Definition at line 1529 of file TRestMetadata.cxx.
TVector2 TRestMetadata::Get2DVectorParameterWithUnits | ( | std::string | parName, |
TVector2 | defaultValue = TVector2(-1, -1) |
||
) |
Definition at line 1632 of file TRestMetadata.cxx.
|
protected |
Definition at line 1547 of file TRestMetadata.cxx.
TVector3 TRestMetadata::Get3DVectorParameterWithUnits | ( | std::string | parName, |
TVector3 | defaultValue = TVector3(-1, -1, -1) |
||
) |
Definition at line 1647 of file TRestMetadata.cxx.
TString TRestMetadata::GetCommit | ( | ) |
Returns the REST commit value stored in fCommit.
Definition at line 2263 of file TRestMetadata.cxx.
std::string TRestMetadata::GetConfigBuffer | ( | ) |
Returns the config section of this class.
Definition at line 2315 of file TRestMetadata.cxx.
string TRestMetadata::GetDataMemberValue | ( | std::string | memberName | ) |
Get the value of data member as string.
All kinds of data member can be found, including non-streamed data member and base-class data member
Definition at line 2322 of file TRestMetadata.cxx.
std::vector< string > TRestMetadata::GetDataMemberValues | ( | std::string | memberName, |
Int_t | precision = 0 |
||
) |
Get the value of datamember as a vector of strings.
If the datamember specified in the argument is a vector with several elements, those elements will be assigned to the std::vector. If the argument requests a data member that is not a vector in nature, this method will still return a valid vector string with a single element.
All kinds of data member can be found, including non-streamed data member and base-class data member
If precision value is higher than 0, then the resulting values will be truncated after finding ".". This can be used to define a float precision.
Definition at line 2340 of file TRestMetadata.cxx.
|
inline |
Returns a std::string with the path used for data storage.
Definition at line 291 of file TRestMetadata.h.
Double_t TRestMetadata::GetDblParameterWithUnits | ( | std::string | parName, |
Double_t | defaultVal = PARAMETER_NOT_FOUND_DBL |
||
) |
Gets the value of the parameter name parName, after applying unit conversion.
Searches the parameter in given element. The parameter must be defined providing the additional units, in the same field value or some where in the element. As in the following example :
Or
We recomment defining units in the same field value, which makes things clear.
parName | The name of the parameter from which we want to obtain the value. |
ele | The target element in which we are going to search. |
defaultVal | The default return value if it fails to find such parameter with unit. |
Definition at line 1619 of file TRestMetadata.cxx.
|
protected |
Definition at line 1513 of file TRestMetadata.cxx.
|
protected |
Get an xml element from a given parent element, according to its declaration.
Definition at line 1739 of file TRestMetadata.cxx.
|
protected |
Open an xml encoded file and find its element.
If NameOrDecalre is a blank string, then it will return the first root element Otherwise it will search within all the root elements and sub-root elements
The root element is the parent of any other xml elements in the file. There could be only one root element in each xml encoded file in standard xml foamat. We recommened the users to write rml in this way, however, multi-root element is still supported in this method.
Exits the whole program if the xml file does not exist, or is in wrong in syntax. Returns NULL if no element matches NameOrDecalre
Definition at line 1678 of file TRestMetadata.cxx.
|
protected |
Get an xml element from the default location, according to its declaration and its field "name".
Definition at line 1756 of file TRestMetadata.cxx.
|
protected |
Get an xml element from a given parent element, according to its declaration and its field "name".
Definition at line 1764 of file TRestMetadata.cxx.
|
inline |
It returns true if an error was identified by a derived metadata class.
Definition at line 210 of file TRestMetadata.h.
TString TRestMetadata::GetErrorMessage | ( | ) |
Returns a std::string containing the error message.
Definition at line 2657 of file TRestMetadata.cxx.
|
protected |
Gets field value in an xml element string by parsing it as TiXmlElement.
Definition at line 2053 of file TRestMetadata.cxx.
|
protected |
Returns the field value of an xml element which has the specified name.
A version of GetParameter() but only find parameter in the fields of xml element. If not found, the returned string is "Not defined"
Definition at line 1573 of file TRestMetadata.cxx.
|
protected |
Gets the first key definition for keyName found inside buffer starting at fromPosition.
A key definition is written as follows:
The returned key definition will be fixed to:
which is in standard xml form
Definition at line 1981 of file TRestMetadata.cxx.
|
protected |
Definition at line 1986 of file TRestMetadata.cxx.
|
protected |
Definition at line 1994 of file TRestMetadata.cxx.
|
protected |
Definition at line 1990 of file TRestMetadata.cxx.
|
protected |
Gets the first key structure for keyName found inside buffer after fromPosition.
A key definition is written as follows:
Definition at line 1929 of file TRestMetadata.cxx.
|
protected |
Definition at line 1935 of file TRestMetadata.cxx.
|
protected |
Definition at line 1946 of file TRestMetadata.cxx.
|
protected |
Definition at line 1952 of file TRestMetadata.cxx.
|
protected |
Definition at line 1940 of file TRestMetadata.cxx.
TString TRestMetadata::GetLibraryVersion | ( | ) |
Returns the REST libraty version stored in fLibraryVersion.
Definition at line 2268 of file TRestMetadata.cxx.
|
inline |
Gets a std::string with the path used for data storage.
Definition at line 306 of file TRestMetadata.h.
|
protected |
Get the next sibling xml element of this element, with same eleDeclare.
Definition at line 1747 of file TRestMetadata.cxx.
|
inline |
Definition at line 230 of file TRestMetadata.h.
|
inline |
Definition at line 232 of file TRestMetadata.h.
|
protected |
Returns the value for the parameter name parName found in inputString.
The methods starts searching in inputString after a given position pos.
Definition at line 2067 of file TRestMetadata.cxx.
|
protected |
Returns the value for the parameter named parName in the given section.
There are two kinds of parameter in REST.
The first one is obviously a parameter. The xml element itself serves as a peice of parameter. The name and the value are given in its fields. This is the classic definition. We also generalize the concept of parameter to the elements' fields. All the fields in an element can be seen as parameter. So there are 4 parameters in the second example, including: id, name, rotation and firstDaqChannel. This method first finds parameter in the fields of the given element. If not find, it searches its the child elements. If still not find, it returns the default value. If not specified, the default value string is "NO_SUCH_PARA".
parName | The name of the parameter from which we want to obtain the value. |
e | The target eml element where the program is to search the parameter |
defaultValue | The default value if the parameter is not found |
Definition at line 1489 of file TRestMetadata.cxx.
string TRestMetadata::GetParameter | ( | std::string | parName, |
TString | defaultValue = PARAMETER_NOT_FOUND_STR |
||
) |
Returns corresponding REST Metadata parameter from multiple sources.
It first finds the parameter from REST arguments from command line. If not found, it calls GetParameter() method to find parameter in TRestMetadata::fElement If still not found, it returns the default value.
parName | The name of the parameter from which we want to obtain the value. |
defaultValue | The default value if the parameter is not found |
Definition at line 1450 of file TRestMetadata.cxx.
|
protected |
Returns the unit string of the given parameter of the given xml section.
It will firstly find the parameter section from the given xml section. Then it will search units definition in:
If argument section is not given(==NULL), it will use the local section(fElement)
Definition at line 1836 of file TRestMetadata.cxx.
|
protected |
It retrieves a map of all parameter:value found in the metadata class.
Definition at line 2469 of file TRestMetadata.cxx.
|
protected |
Returns a string with a list of pathes defined, in decreasing order of precedence: 1) in sections "searchPath", 2) in "configPath"(the path of main rml file), 3) default data path: "$REST_PATH/data/"
To add a searchPath, use:
Or
"searchPath" can also be added multiple times. Both of them will be added into the output string. A separator ":" is inserted between each defined paths. To separate them, use inline method Split() provided by TRestStringHelper. Uniformed search path definition provides us uniformed file search tool, see TRestMetadata::SearchFile().
Definition at line 2390 of file TRestMetadata.cxx.
std::string TRestMetadata::GetSectionName | ( | ) |
Returns the section name of this class, defined at the beginning of fSectionName.
Definition at line 2307 of file TRestMetadata.cxx.
|
private |
Returns a string with the unit name given in the given xml element.
if given the target attribute, it will find the unit for this. e.g. value="(1,-13)mm" "-3mm" "50,units=mm" can both be recoginzed. if not given, it will find the unit as a parameter of the element. e.g. <... value="3" units="mm" .../>
Definition at line 1807 of file TRestMetadata.cxx.
|
inline |
returns the verboselevel in type of REST_Verbose_Level enumerator
Definition at line 300 of file TRestMetadata.h.
TString TRestMetadata::GetVerboseLevelString | ( | ) |
returns the verbose level in type of TString
Returns a string corresponding to current verbose level.
Definition at line 2358 of file TRestMetadata.cxx.
TString TRestMetadata::GetVersion | ( | ) |
Returns the REST version stored in fVersion.
Definition at line 2258 of file TRestMetadata.cxx.
Int_t TRestMetadata::GetVersionCode | ( | ) |
Definition at line 2302 of file TRestMetadata.cxx.
|
inline |
It returns true if an error was identified by a derived metadata class.
Definition at line 213 of file TRestMetadata.h.
TString TRestMetadata::GetWarningMessage | ( | ) |
Returns a std::string containing the warning message.
Definition at line 2664 of file TRestMetadata.cxx.
|
inlineprotectedvirtual |
To make settings from rml file. This method must be implemented in the derived class.
Reimplemented in TRestAxionBufferGas, TRestAxionLikelihood, TRestAxionMagneticField, TRestAxionOptics, TRestAxionSolarModel, TRestAxionSpectrum, TRestAxionTemplate, TRestAxionXrayWindow, TRestGeant4ParticleSource, TRestDataQualityProcess, TRestDataSetCalibration, TRestDataSetOdds, TRestMySQLToAnalysisProcess, TRestRealTimeAddInputFileProcess, TRestSummaryProcess, TRestAnalysisPlot, TRestCut, TRestDataSet, TRestDataSetPlot, TRestEventProcess, TRestGDMLParser, TRestManager, TRestMessenger, TRestMetadataPlot, TRestProcessRunner, TRestRun, TRestTask, TRestCombinedMask, TRestAxionMCPLOptics, TRestAxionTransmissionProcess, TRestAxionTrueWolterOptics, TRestAxionWolterOptics, TRestDetectorHitsToTrackFastProcess, TRestGeant4ToDetectorHitsProcess, TRestRawReadoutAnalysisProcess, TRestTrackToDetectorHitsProcess, TRestDetector, TRestDetectorAvalancheProcess, TRestDetectorDaqChannelSwitchingProcess, TRestDetectorDriftVolume, TRestDetectorElectronDiffusionProcess, TRestDetectorFiducializationProcess, TRestDetectorGainMap, TRestDetectorGas, TRestDetectorHits3DReconstructionProcess, TRestDetectorHitsAnalysisProcess, TRestDetectorHitsNormalizationProcess, TRestDetectorHitsReductionProcess, TRestDetectorHitsRotateAndTranslateProcess, TRestDetectorHitsShuffleProcess, TRestDetectorPositionMappingProcess, TRestDetectorReadout, TRestDetectorSetup, TRestDetectorSignalChannelActivityProcess, TRestDetectorSignalViewerProcess, TRestDetectorSingleChannelAnalysisProcess, TRestGeant4BlobAnalysisProcess, TRestGeant4Metadata, TRestGeant4NeutronTaggingProcess, TRestGeant4ParticleSourceDecay0, TRestGeant4PhysicsLists, TRestGeant4VetoAnalysisProcess, TRestRawDAQMetadata, TRestRawMemoryBufferToSignalProcess, TRestRawPeaksFinderProcess, TRestRawSignalAnalysisProcess, TRestRawSignalConvolutionFittingProcess, TRestRawSignalIdTaggingProcess, TRestRawSignalRangeReductionProcess, TRestRawSignalRemoveChannelsProcess, TRestRawSignalViewerProcess, TRestRawToSignalProcess, TRestRawVetoAnalysisProcess, TRestTrackAnalysisProcess, TRestTrackBlobAnalysisProcess, TRestTrackDetachIsolatedNodesProcess, TRestTrackPointLikeAnalysisProcess, TRestTrackReconnectionProcess, and TRestWimpSensitivity.
Definition at line 137 of file TRestMetadata.h.
|
inlineprotectedvirtual |
Method called after the object is retrieved from root file.
Reimplemented in TRestDetectorGas.
Definition at line 146 of file TRestMetadata.h.
|
inlinevirtual |
Making default settings.
Reimplemented in TRestAxionBufferGas, TRestAxionLikelihood, TRestAxionMagneticField, TRestAxionOptics, TRestAxionOpticsMirror, TRestAxionSolarFlux, TRestAxionSolarModel, TRestAxionSpectrum, TRestAxionTemplate, TRestAxionXrayWindow, TRestBenchMarkProcess, TRestDataQualityProcess, TRestDataSetCalibration, TRestDataSetOdds, TRestEventRateAnalysisProcess, TRestEventSelectionProcess, TRestMySQLToAnalysisProcess, TRestRealTimeAddInputFileProcess, TRestRealTimeDrawingProcess, TRestSummaryProcess, TRestAnalysisPlot, TRestCut, TRestDataSet, TRestDataSetPlot, TRestManager, TRestMessenger, TRestMetadataPlot, TRestProcessRunner, TRestRun, TRestCombinedMask, TRestGridMask, TRestRingsMask, TRestSpiderMask, TRestStrippedMask, TRestAxionAnalysisProcess, TRestAxionDeviationProcess, TRestAxionFieldPropagationProcess, TRestAxionGeneratorProcess, TRestAxionMCPLOptics, TRestAxionOpticsProcess, TRestAxionTransmissionProcess, TRestAxionTransportProcess, TRestAxionTrueWolterOptics, TRestAxionWolterOptics, TRestDetectorHitsToTrackFastProcess, TRestDetectorHitsToTrackProcess, TRestDetectorSignalToRawSignalProcess, TRestGeant4ToDetectorHitsProcess, TRestRawReadoutAnalysisProcess, TRestRawToDetectorSignalProcess, TRestTrackToDetectorHitsProcess, TRestDetectorAvalancheProcess, TRestDetectorDaqChannelSwitchingProcess, TRestDetectorDriftVolume, TRestDetectorElectronDiffusionProcess, TRestDetectorFiducializationProcess, TRestDetectorGarfieldDriftProcess, TRestDetectorGas, TRestDetectorHits3DReconstructionProcess, TRestDetectorHitsAnalysisProcess, TRestDetectorHitsGaussAnalysisProcess, TRestDetectorHitsNormalizationProcess, TRestDetectorHitsReductionProcess, TRestDetectorHitsRotateAndTranslateProcess, TRestDetectorHitsShuffleProcess, TRestDetectorHitsSmearingProcess, TRestDetectorHitsToSignalProcess, TRestDetectorPositionMappingProcess, TRestDetectorReadout, TRestDetectorSetup, TRestDetectorSignalChannelActivityProcess, TRestDetectorSignalRecoveryProcess, TRestDetectorSignalToHitsProcess, TRestDetectorSignalViewerProcess, TRestDetectorSingleChannelAnalysisProcess, TRestDetectorTriggerAnalysisProcess, TRestGeant4AnalysisProcess, TRestGeant4BlobAnalysisProcess, TRestGeant4Metadata, TRestGeant4NeutronTaggingProcess, TRestGeant4PhysicsLists, TRestGeant4VetoAnalysisProcess, TRestRawAFTERToSignalProcess, TRestRawBaseLineCorrectionProcess, TRestRawBiPoToSignalProcess, TRestRawCommonNoiseReductionProcess, TRestRawDAQMetadata, TRestRawFEUDreamToSignalProcess, TRestRawFindResponseSignalProcess, TRestRawMemoryBufferToSignalProcess, TRestRawMultiCoBoAsAdToSignalProcess, TRestRawMultiFEMINOSToSignalProcess, TRestRawSignalAddNoiseProcess, TRestRawSignalAnalysisProcess, TRestRawSignalChannelActivityProcess, TRestRawSignalConvolutionFittingProcess, TRestRawSignalFittingProcess, TRestRawSignalGeneralFitProcess, TRestRawSignalIdTaggingProcess, TRestRawSignalRangeReductionProcess, TRestRawSignalRemoveChannelsProcess, TRestRawSignalShapingProcess, TRestRawSignalViewerProcess, TRestRawTDSToSignalProcess, TRestRawToSignalProcess, TRestRawUSTCToSignalProcess, TRestRawVetoAnalysisProcess, TRestTrackAnalysisProcess, TRestTrackBlobAnalysisProcess, TRestTrackDetachIsolatedNodesProcess, TRestTrackLineAnalysisProcess, TRestTrackLinearizationProcess, TRestTrackPathMinimizationProcess, TRestTrackPointLikeAnalysisProcess, TRestTrackReconnectionProcess, TRestTrackReductionProcess, TRestTrackViewerProcess, and TRestWimpSensitivity.
Definition at line 247 of file TRestMetadata.h.
TRestMetadata * TRestMetadata::InstantiateChildMetadata | ( | int | index, |
std::string | pattern = "" |
||
) |
This method will retrieve a new TRestMetadata instance of a child element of the present TRestMetadata instance based on the index
given by argument, which defines the element order to be retrieved, 0 for first element found, 1 for the second element found, etc.
In brief, it will create an instance of TRestChildClass
in the following example:
An optional argument may help to restrict the search to a particular metadata element.
Otherwise, the first child section that satisfies that it starts by TRest
will be considered.
If no child element is found with the required criteria, nullptr
will be returned.
Definition at line 712 of file TRestMetadata.cxx.
TRestMetadata * TRestMetadata::InstantiateChildMetadata | ( | std::string | pattern = "" , |
std::string | name = "" |
||
) |
This method will retrieve a new TRestMetadata instance of a child element of the present TRestMetadata instance based on the name
given by argument.
In brief, it will create an instance of TRestChildClass
in the following example:
Two optional arguments may help to restrict the search to a particular metadata class name and user given name.
Otherwise, the first child section that satisfies that it starts by TRest
will be returned.
If no child element is found with the required criteria, nullptr
will be returned.
Definition at line 766 of file TRestMetadata.cxx.
|
inline |
Definition at line 287 of file TRestMetadata.h.
|
inline |
Definition at line 285 of file TRestMetadata.h.
Int_t TRestMetadata::LoadConfigFromBuffer | ( | ) |
Initialize data from a string element buffer.
This method is usually called when the object is retrieved from root file. It will call InitFromRootFile() after parsing configBuffer(string) to fElement(TiXmlElement)
Definition at line 675 of file TRestMetadata.cxx.
Int_t TRestMetadata::LoadConfigFromElement | ( | TiXmlElement * | eSectional, |
TiXmlElement * | eGlobal, | ||
std::map< std::string, std::string > | envs = {} |
||
) |
Main starter method.
First merge the sectional and global sections together, then save the input env section. To make start up it calls the following methods in sequence: LoadSectionMetadata(), InitFromConfigFile()
Definition at line 638 of file TRestMetadata.cxx.
Int_t TRestMetadata::LoadConfigFromFile | ( | const std::string & | configFilename, |
const std::string & | sectionName = "" |
||
) |
Give the file name, find out the corresponding section. Then call the main starter.
Definition at line 552 of file TRestMetadata.cxx.
|
protectedvirtual |
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 in TRestEventProcess, and TRestManager.
Definition at line 800 of file TRestMetadata.cxx.
|
virtual |
Merge the metadata information from another metadata object. Needs to be implemented in the derived class.
Definition at line 2671 of file TRestMetadata.cxx.
|
inline |
Implementing TObject::Print() method.
Definition at line 250 of file TRestMetadata.h.
void TRestMetadata::PrintConfigBuffer | ( | ) |
Print the config xml section stored in the class.
Prints current config buffer on screen.
Definition at line 2193 of file TRestMetadata.cxx.
void TRestMetadata::PrintMessageBuffer | ( | ) |
Print the buffered message.
Definition at line 2227 of file TRestMetadata.cxx.
|
virtual |
Implemented it in the derived metadata class to print out specific metadata information.
Prints metadata content on screen. Usually overloaded by the derived metadata class.
Reimplemented in TRestAxionBufferGas, TRestAxionLikelihood, TRestAxionMagneticField, TRestAxionOptics, TRestAxionOpticsMirror, TRestAxionSolarFlux, TRestAxionSolarModel, TRestAxionSpectrum, TRestAxionTemplate, TRestAxionXrayWindow, TRestBenchMarkProcess, TRestDataQualityProcess, TRestDataSetCalibration, TRestDataSetOdds, TRestEventRateAnalysisProcess, TRestEventSelectionProcess, TRestMySQLToAnalysisProcess, TRestRealTimeAddInputFileProcess, TRestRealTimeDrawingProcess, TRestSummaryProcess, TRestAnalysisPlot, TRestCut, TRestDataSet, TRestDataSetPlot, TRestManager, TRestMessenger, TRestMetadataPlot, TRestProcessRunner, TRestRun, TRestCombinedMask, TRestGridMask, TRestPatternMask, TRestRingsMask, TRestSpiderMask, TRestStrippedMask, TRestAxionAnalysisProcess, TRestAxionDeviationProcess, TRestAxionEventProcess, TRestAxionFieldPropagationProcess, TRestAxionGeneratorProcess, TRestAxionMCPLOptics, TRestAxionSolarQCDFlux, TRestAxionTransmissionProcess, TRestAxionTransportProcess, TRestAxionTrueWolterOptics, TRestAxionWolterOptics, TRestDetectorHitsToTrackFastProcess, TRestDetectorHitsToTrackProcess, TRestDetectorSignalToRawSignalProcess, TRestGeant4ToDetectorHitsProcess, TRestRawReadoutAnalysisProcess, TRestRawToDetectorSignalProcess, TRestTrackToDetectorHitsProcess, TRestDetector, TRestDetectorAvalancheProcess, TRestDetectorDaqChannelSwitchingProcess, TRestDetectorDriftVolume, TRestDetectorElectronDiffusionProcess, TRestDetectorFiducializationProcess, TRestDetectorGas, TRestDetectorHits3DReconstructionProcess, TRestDetectorHitsAnalysisProcess, TRestDetectorHitsGaussAnalysisProcess, TRestDetectorHitsNormalizationProcess, TRestDetectorHitsReductionProcess, TRestDetectorHitsRotateAndTranslateProcess, TRestDetectorHitsShuffleProcess, TRestDetectorHitsSmearingProcess, TRestDetectorHitsToSignalProcess, TRestDetectorPositionMappingProcess, TRestDetectorReadout, TRestDetectorSetup, TRestDetectorSignalChannelActivityProcess, TRestDetectorSignalRecoveryProcess, TRestDetectorSignalToHitsProcess, TRestDetectorSignalViewerProcess, TRestDetectorSingleChannelAnalysisProcess, TRestDetectorTriggerAnalysisProcess, TRestGeant4AnalysisProcess, TRestGeant4BlobAnalysisProcess, TRestGeant4Metadata, TRestGeant4NeutronTaggingProcess, TRestGeant4PhysicsLists, TRestGeant4VetoAnalysisProcess, TRestLegacyProcess, TRestRawZeroSuppresionProcess, TRestRawBaseLineCorrectionProcess, TRestRawBiPoToSignalProcess, TRestRawCommonNoiseReductionProcess, TRestRawDAQMetadata, TRestRawFindResponseSignalProcess, TRestRawMemoryBufferToSignalProcess, TRestRawPeaksFinderProcess, TRestRawSignalAddNoiseProcess, TRestRawSignalAnalysisProcess, TRestRawSignalChannelActivityProcess, TRestRawSignalConvolutionFittingProcess, TRestRawSignalFittingProcess, TRestRawSignalGeneralFitProcess, TRestRawSignalIdTaggingProcess, TRestRawSignalRangeReductionProcess, TRestRawSignalRemoveChannelsProcess, TRestRawSignalShapingProcess, TRestRawSignalViewerProcess, TRestRawToSignalProcess, TRestRawVetoAnalysisProcess, TRestTrackAnalysisProcess, TRestTrackBlobAnalysisProcess, TRestTrackDetachIsolatedNodesProcess, TRestTrackLineAnalysisProcess, TRestTrackLinearizationProcess, TRestTrackPathMinimizationProcess, TRestTrackPointLikeAnalysisProcess, TRestTrackReconnectionProcess, TRestTrackReductionProcess, TRestTrackViewerProcess, and TRestWimpSensitivity.
Definition at line 2233 of file TRestMetadata.cxx.
void TRestMetadata::PrintTimeStamp | ( | Double_t | timeStamp | ) |
Print the current time on local machine.
Prints a UNIX timestamp in human readable format.
Definition at line 2174 of file TRestMetadata.cxx.
|
protected |
Reflection methods, Set value of a datamember in class according to TRestMetadata::fElement.
It will loop over all the parameters in the rml and gDetector. (The repeated one won't override the existing one. rml parameters in prior.) Then it will find the corresponding datamember for the parameter. If found, it will set the datamember value. For example, we write:
After loading the rml file and calling this method, the value of "fPar0" will be set to 10.
We have a naming convention for the parameters in rml and the data members in class. The names of data member shall all start from "f" and have the second character in capital form. For example, data member "fTargetName" is linked to parameter "targetName". In the previous code "fPar0" is linked to "par0".
Note that parameters include <parameter section and all the attributes in fElement.
Definition at line 2448 of file TRestMetadata.cxx.
|
private |
Read the given xml section, applying rml syntax(if, for, include, etc.)
The expansion is done recursively except for child sections declared after "TRest". They are supposed to be a metadata class and to be doing the expansion themselves. If the argument "recursive" is true, these child sections will also be processed. Before expansion, ReplaceElementAttributes() will first be called.
Definition at line 924 of file TRestMetadata.cxx.
|
private |
Identify an environmental variable section and add it into env section list.
Vaild section declaration: "variable", "constant". If the section exists already, its value will be updated if "updateexisting" is true. If a system env with the same name has been defined already, then the system env will be used, unless the attribute "overwrite" is true.
Example of environmental variable section:
Definition at line 888 of file TRestMetadata.cxx.
|
private |
Definition at line 2520 of file TRestMetadata.cxx.
|
protected |
It reads a parameter list and associates it to its corresponding metadata member. par0 --> fPar0.
Definition at line 2460 of file TRestMetadata.cxx.
|
protected |
Identifies "constants" in the input buffer, and replace them with corresponding value.
Constans are the substrings directly appeared in the buffer
Definition at line 2130 of file TRestMetadata.cxx.
|
private |
replace the field value(attribute) of the given xml element
it calls ReplaceVariables(), ReplaceConstants() and ReplaceMathematicalExpressions() in sequence. "name" attribute won't be replaced by constants to avoid conflict.
Definition at line 848 of file TRestMetadata.cxx.
|
private |
Helper method for TRestMetadata::ExpandForLoops().
Definition at line 1099 of file TRestMetadata.cxx.
|
protected |
Identifies environmental variable replacing marks in the input buffer, and replace them with corresponding value.
Replacing marks is like ${VARIABLE_NAME}. "variables" include system env, values added through <variable section, and rest command line arguments(–c option). The replacing sequence is same. i.e. try to replace with system env first, if not found, try to replace <variable section, if still not found, try to replace with command line arguments. If all not found, return the initial value.
Definition at line 2086 of file TRestMetadata.cxx.
|
protected |
Resets the version of TRestRun to REST_RELEASE. Only TRestRun is allowed to update version.
Definition at line 2273 of file TRestMetadata.cxx.
|
protected |
Search files in current directory and directories specified in "searchPath" section.
Return blank string if file not found, return directly filename if found in current directory, return full name (path+name) if found in "searchPath".
Definition at line 2161 of file TRestMetadata.cxx.
|
inline |
set config file path from external
Definition at line 323 of file TRestMetadata.h.
void TRestMetadata::SetError | ( | std::string | message = "" , |
bool | print = true |
||
) |
A metadata class may use this method to signal that something went wrong.
Definition at line 2635 of file TRestMetadata.cxx.
|
inline |
Set the host manager for this class.
Definition at line 325 of file TRestMetadata.h.
|
protected |
Set the library version of this metadata class.
Definition at line 2300 of file TRestMetadata.cxx.
|
inline |
set the section name, clear the section content
Definition at line 321 of file TRestMetadata.h.
|
inline |
sets the verbose level
Definition at line 328 of file TRestMetadata.h.
void TRestMetadata::SetWarning | ( | std::string | message = "" , |
bool | print = true |
||
) |
A metadata class may use this method to signal that something went wrong.
Definition at line 2646 of file TRestMetadata.cxx.
|
inline |
If this method is called the metadata information will be stored in disk.
Definition at line 319 of file TRestMetadata.h.
|
protected |
Parsing a string into TiXmlElement object.
This method creates TiXmlElement object with the alloator "new". Be advised to delete the object after using it!
Definition at line 1871 of file TRestMetadata.cxx.
|
protected |
Resets the version of TRestRun to -1, in case the file is old REST file. Only TRestRun is allowed to update version.
Definition at line 2286 of file TRestMetadata.cxx.
|
inlinevirtual |
Method to allow implementation of specific metadata members updates at inherited classes.
Reimplemented in TRestDetector.
Definition at line 256 of file TRestMetadata.h.
|
virtual |
overwriting the write() method with fStore considered
Reimplemented in TRestCut, TRestDetectorGas, and TRestRun.
Definition at line 2415 of file TRestMetadata.cxx.
void TRestMetadata::WriteConfigBuffer | ( | std::string | fName | ) |
Writes the config buffer to a file in append mode.
Definition at line 2209 of file TRestMetadata.cxx.
|
protected |
The buffer where the corresponding metadata section is stored. Filled only during Write()
Definition at line 162 of file TRestMetadata.h.
|
private |
Definition at line 90 of file TRestMetadata.h.
|
private |
Definition at line 86 of file TRestMetadata.h.
|
protected |
Full name of the rml file.
Data members NOTE!! In root6 the "#ifndef __CINT__" structure is not helpful any more! Attatch "//! something" structure in comment line to avoid variables being saved by root. see more detail in https://root.cern.ch/root/htmldoc/guides/users-guide/ROOTUsersGuide.html#automatically-generated-streamers
Definition at line 158 of file TRestMetadata.h.
|
protected |
Saving a list of rml constants. name-value std::pair. Constants are temporary for this class only.
Definition at line 182 of file TRestMetadata.h.
|
protected |
Saving the sectional element together with global element.
Definition at line 176 of file TRestMetadata.h.
|
protected |
Saving the global element, to be passed to the resident class, if necessary.
Definition at line 178 of file TRestMetadata.h.
|
protected |
It can be used as a way to identify that something went wrong using SetError method.
Definition at line 185 of file TRestMetadata.h.
|
protected |
A std::string to store an optional error message through method SetError.
Definition at line 197 of file TRestMetadata.h.
|
protected |
All metadata classes can be initialized and managed by TRestManager.
Definition at line 172 of file TRestMetadata.h.
|
private |
Definition at line 87 of file TRestMetadata.h.
|
protected |
It counts the number of errors notified.
Definition at line 188 of file TRestMetadata.h.
|
protected |
It counts the number of warnings notified.
Definition at line 194 of file TRestMetadata.h.
|
private |
Definition at line 89 of file TRestMetadata.h.
|
protected |
Section name given in the constructor of the derived metadata class.
Definition at line 160 of file TRestMetadata.h.
|
protected |
This variable is used to determine if the metadata structure should be stored in the ROOT file.
Definition at line 174 of file TRestMetadata.h.
|
protected |
Saving a list of rml variables. name-value std::pair.
Definition at line 180 of file TRestMetadata.h.
|
protected |
Verbose level used to print debug info.
Definition at line 167 of file TRestMetadata.h.
|
private |
REST version std::string, only used for archive and retrieve.
Definition at line 85 of file TRestMetadata.h.
|
protected |
It can be used as a way to identify that something went wrong using SetWarning method.
Definition at line 191 of file TRestMetadata.h.
|
protected |
It can be used as a way to identify that something went wrong using SetWarning method.
Definition at line 200 of file TRestMetadata.h.
|
protected |
The buffer to store the output message through TRestStringOutput in this class.
Definition at line 164 of file TRestMetadata.h.
|
protected |
Termination flag object for TRestStringOutput.
Definition at line 169 of file TRestMetadata.h.