REST-for-Physics
v2.3
Rare Event Searches ToolKit for Physics
|
Data provider and manager in REST.
REST data, including metadata and event data, are all handled by this class A series of metadata objects is saved here after being loaded from rml/root file with sequential startup. Input file is also opened here, either being raw data file(opened with external process) or root file(opened with built- in reader). TRestRun extracts event data in the input file and wraps it into TRestEvent class, which is queried by other classes.
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 18 of file TRestRun.h.
#include <TRestRun.h>
Public Member Functions | |
void | AddEventBranch (TRestEvent *event) |
Add an event branch in output EventTree. | |
void | AddInputFileExternal (const std::string &file) |
void | AddMetadata (TRestMetadata *meta) |
add metadata object to the metadata list | |
void | cd () |
ClassDefOverride (TRestRun, 6) | |
void | CloseFile () |
Close both input file and output file, setting trees to nullptr also. | |
Bool_t | EvaluateMetadataMember (const std::string &instr) |
It will evaluate the expression given including the data member from the corresponding metadata class type or name defined in the input string. More... | |
TString | FormFormat (const TString &filenameFormat) |
Form output file name according to file info list, proc info list and run data. More... | |
TFile * | FormOutputFile () |
Create a new TFile as REST output file. Writing metadata objects into it. | |
TRestAnalysisTree * | GetAnalysisTree () const |
Long64_t | GetBytesRead () const |
int | GetCurrentEntry () const |
Double_t | GetElapsedTimeSeconds () const |
Double_t | GetEndTimestamp () const |
Long64_t | GetEntries () const |
void | GetEntry (Long64_t entry) |
Calls GetEntry() for both AnalysisTree and EventTree. | |
std::vector< int > | GetEventEntriesWithConditions (const std::string &, int startingIndex=0, int maxNumber=-1) |
std::vector< int > | GetEventIdsWithConditions (const std::string &, int startingIndex=0, int maxNumber=-1) |
TTree * | GetEventTree () const |
std::vector< std::string > | GetEventTypesList () |
It returns a list of available event types inside the file. | |
TRestEvent * | GetEventWithID (Int_t eventID, Int_t subEventID=-1, const TString &tag="") |
TString | GetExperimentName () const |
Long64_t | GetFeminosDaqTotalEvents () const |
TRestEventProcess * | GetFileProcess () const |
template<class T > | |
T * | GetInputEvent () |
Calling GetInputEvent<TRestGeant4Event>() will return a TRestGeant4Event* | |
TRestEvent * | GetInputEvent () const |
Calling GetInputEvent() will return a basic TRestEvent* | |
TString | GetInputEventName () const |
TFile * | GetInputFile () const |
std::string | GetInputFileName (unsigned int i) const |
std::string | GetInputFileNamePattern () const |
std::vector< TString > | GetInputFileNames () const |
Int_t | GetInputFileNumber () const |
TRestMetadata * | GetMetadata (const TString &name, TFile *file=nullptr) |
TRestMetadata * | GetMetadataClass (const TString &type, TFile *file=nullptr) |
std::string | GetMetadataMember (const std::string &instr) |
std::vector< std::string > | GetMetadataNames () |
std::vector< std::string > | GetMetadataTitles () |
void | GetNextEntry () |
Int_t | GetNextEvent (TRestEvent *targetEvent, TRestAnalysisTree *targetTree) |
Get next event by writing event data into target event and target tree. More... | |
TRestEvent * | GetNextEventWithConditions (const std::string &) |
Load the next event that satisfies the conditions specified by a string. More... | |
int | GetNumberOfMetadata () const |
Int_t | GetObservableID (const std::string &name) |
TFile * | GetOutputFile () const |
TString | GetOutputFileName () const |
Int_t | GetParentRunNumber () const |
TString | GetRunDescription () const |
std::string | GetRunInformation (const std::string &info) |
Double_t | GetRunLength () const |
Int_t | GetRunNumber () const |
TString | GetRunTag () const |
TString | GetRunType () const |
TString | GetRunUser () const |
Double_t | GetStartTimestamp () const |
Int_t | GetSubRunNumber () const |
Long64_t | GetTotalBytes () |
void | HangUpEndFile () |
void | ImportMetadata (const TString &rootFile, const TString &name, const TString &type, Bool_t store) |
Open the root file and import the metadata of the given name. More... | |
void | Initialize () override |
REST run class. More... | |
TFile * | MergeToOutputFile (std::vector< std::string > fileFullNames, std::string outputFileName="") |
Form REST output file by merging a list of files together. More... | |
Bool_t | ObservableExists (const std::string &name) |
void | OpenInputFile (const TString &filename, const std::string &mode="") |
Open the input file, read file info and the trees if it is root file. More... | |
void | OpenInputFile (int i) |
Open the i th file in the file list. | |
void | PassOutputFile () |
void | PrintAllMetadata () |
void | PrintEndDate () |
void | PrintErrors () |
Prints out all the warnings registered by metadata classes accessible to TRestRun, thats metadata and processes previously used in a data chain. | |
void | PrintEvent () const |
void | PrintMetadata () override |
Prints the basic run information. | |
void | PrintObservables () |
void | PrintStartDate () |
Prints the run start date and time in human format. | |
void | PrintTrees () const |
void | PrintWarnings () |
Prints out all the warnings registered by metadata classes accessible to TRestRun, thats metadata and processes previously used in a data chain. | |
void | ReadFileInfo (const std::string &filename) |
Extract file info from a file, and save it in the file info list. More... | |
void | ReadInputFileMetadata () |
void | ReadInputFileTrees () |
void | ReleaseEndFile () |
std::string | ReplaceMetadataMembers (const std::string &instr, Int_t precision=8) |
It will replace the data members contained inside the string given as input. The data members in the input string should be written using the following format [MetadataClass::fDataMember]. More... | |
void | ResetEntry () |
Reset file reading progress. More... | |
void | SetCurrentEntry (int i) |
void | SetEndTimeStamp (Double_t timestamp) |
void | SetExtProcess (TRestEventProcess *p) |
Set external file process. | |
void | SetFeminosDaqTotalEvents (Long64_t n) |
void | SetHistoricMetadataSaving (bool save) |
void | SetInputEvent (TRestEvent *event) |
Retarget input event in the tree. More... | |
void | SetInputFileName (const std::string &s) |
void | SetNFilesSplit (int n) |
void | SetOutputFileName (const std::string &s) |
void | SetParentRunNumber (Int_t number) |
void | SetRunDescription (const TString &description) |
void | SetRunNumber (Int_t number) |
void | SetRunTag (const TString &tag) |
void | SetRunType (const TString &type) |
void | SetRunUser (const TString &user) |
void | SetStartTimeStamp (Double_t timestamp) |
void | SetTotalBytes (Long64_t totalBytes) |
void | SkipEventTree () |
TRestRun (const std::string &filename) | |
TFile * | UpdateOutputFile () |
Int_t | Write (const char *name=nullptr, Int_t option=0, Int_t bufsize=0) override |
overwriting the write() method with fStore considered | |
void | WriteWithDataBase () |
Write this object into TFile and add a new entry in database. More... | |
Public Member Functions inherited from TRestMetadata | |
void | AddLog (std::string log="", bool print=true) |
Add logs to messageBuffer. | |
void | DoNotStore () |
If this method is called the metadata information will not be stored in disk. | |
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. | |
std::string | GetConfigBuffer () |
Returns the config section of this class. | |
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. | |
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. | |
TString | GetErrorMessage () |
Returns a std::string containing the error message. | |
TString | GetLibraryVersion () |
Returns the REST libraty version stored in fLibraryVersion. | |
TString | GetMainDataPath () |
Gets a std::string with the path used for data storage. | |
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. | |
TRestStringOutput::REST_Verbose_Level | GetVerboseLevel () |
returns the verboselevel in type of REST_Verbose_Level enumerator | |
TString | GetVerboseLevelString () |
returns the verbose level in type of TString More... | |
TString | GetVersion () |
Returns the REST version stored in fVersion. | |
Int_t | GetVersionCode () |
UInt_t | GetVersionMajor () const |
UInt_t | GetVersionMinor () const |
UInt_t | GetVersionPatch () const |
Bool_t | GetWarning () const |
It returns true if an error was identified by a derived metadata class. | |
TString | GetWarningMessage () |
Returns a std::string containing the warning message. | |
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. | |
virtual void | Merge (const TRestMetadata &) |
TRestMetadata & | operator= (const TRestMetadata &) |
void | Print () |
Implementing TObject::Print() method. | |
void | PrintConfigBuffer () |
Print the config xml section stored in the class. More... | |
void | PrintMessageBuffer () |
Print the buffered message. | |
void | PrintTimeStamp (Double_t timeStamp) |
Print the current time on local machine. More... | |
void | SetConfigFile (std::string configFilename) |
set config file path from external | |
void | SetError (std::string message="", bool print=true, int maxPrint=5) |
A metadata class may use this method to signal that something went wrong. | |
void | SetHostmgr (TRestManager *m) |
Set the host manager for this class. | |
void | SetSectionName (std::string sName) |
set the section name, clear the section content | |
void | SetVerboseLevel (TRestStringOutput::REST_Verbose_Level v) |
sets the verbose level | |
void | SetWarning (std::string message="", bool print=true, int maxPrint=5) |
A metadata class may use this method to signal that something went wrong. | |
void | Store () |
If this method is called the metadata information will be stored in disk. | |
TRestMetadata (const TRestMetadata &) | |
virtual void | UpdateMetadataMembers () |
Method to allow implementation of specific metadata members updates at inherited classes. | |
void | WriteConfigBuffer (std::string fName) |
Writes the config buffer to a file in append mode. | |
~TRestMetadata () | |
TRestMetadata default destructor. | |
Protected Member Functions | |
void | InitFromConfigFile () override |
Initialize logic of TRestRun. More... | |
Protected Member Functions inherited from TRestMetadata | |
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. | |
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". | |
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". | |
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. | |
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. | |
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. | |
TString | GetSearchPath () |
virtual void | InitFromRootFile () |
Method called after the object is retrieved from root file. | |
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. | |
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. | |
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. | |
TiXmlElement * | StringToElement (std::string definition) |
Parsing a string into TiXmlElement object. More... | |
TRestMetadata () | |
TRestMetadata default constructor. | |
TRestMetadata (const char *configFilename) | |
constructor | |
void | UnSetVersion () |
Resets the version of TRestRun to -1, in case the file is old REST file. Only TRestRun is allowed to update version. | |
Protected Attributes | |
TRestAnalysisTree * | fAnalysisTree |
Long64_t | fBytesRead |
int | fCurrentEvent |
Double_t | fEndTime |
Event absolute ending time/date (unix timestamp) | |
Int_t | fEntriesSaved |
int | fEventBranchLoc |
int | fEventIndexCounter = 0 |
TTree * | fEventTree |
TString | fExperimentName |
Long64_t | fFeminosDaqTotalEvents = 0 |
TRestEventProcess * | fFileProcess |
bool | fFromRML = false |
bool | fHangUpEndFile = false |
TRestEvent * | fInputEvent |
TFile * | fInputFile |
TString | fInputFileName |
std::vector< TString > | fInputFileNames |
std::vector< TRestMetadata * > | fInputMetadata |
std::vector< TRestMetadata * > | fMetadata |
Int_t | fNFilesSplit |
TFile * | fOutputFile |
TString | fOutputFileName |
bool | fOverwrite |
Int_t | fParentRunNumber |
It can be used as parent number of subrun number. | |
TString | fRunClassName |
TString | fRunDescription |
Int_t | fRunNumber |
TString | fRunTag |
TString | fRunType |
TString | fRunUser |
bool | fSaveHistoricData |
Double_t | fStartTime |
Event absolute starting time/date (unix timestamp) | |
Long64_t | fTotalBytes |
Protected Attributes inherited from TRestMetadata | |
std::string | configBuffer |
The buffer where the corresponding metadata section is stored. Filled only during Write() | |
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. | |
TiXmlElement * | fElement |
Saving the sectional element together with global element. | |
TiXmlElement * | fElementGlobal |
Saving the global element, to be passed to the resident class, if necessary. | |
Bool_t | fError = false |
It can be used as a way to identify that something went wrong using SetError method. | |
TString | fErrorMessage = "" |
A std::string to store an optional error message through method SetError. | |
TRestManager * | fHostmgr |
All metadata classes can be initialized and managed by TRestManager. | |
Int_t | fNErrors = 0 |
It counts the number of errors notified. | |
Int_t | fNWarnings = 0 |
It counts the number of warnings notified. | |
std::string | fSectionName |
Section name given in the constructor of the derived metadata class. | |
Bool_t | fStore |
This variable is used to determine if the metadata structure should be stored in the ROOT file. | |
std::map< std::string, std::string > | fVariables |
Saving a list of rml variables. name-value std::pair. | |
TRestStringOutput::REST_Verbose_Level | fVerboseLevel |
Verbose level used to print debug info. | |
Bool_t | fWarning = false |
It can be used as a way to identify that something went wrong using SetWarning method. | |
TString | fWarningMessage = "" |
It can be used as a way to identify that something went wrong using SetWarning method. | |
std::string | messageBuffer |
The buffer to store the output message through TRestStringOutput in this class. | |
endl_t | RESTendl |
Termination flag object for TRestStringOutput. | |
Private Member Functions | |
std::string | ReplaceMetadataMember (const std::string &instr, Int_t precision=0) |
It will replace the data member from the corresponding metadata class type or name defined in the input string. More... | |
Bool_t TRestRun::EvaluateMetadataMember | ( | const std::string & | instr | ) |
It will evaluate the expression given including the data member from the corresponding metadata class type or name defined in the input string.
The input expression should contain the metadata class type or name using the format metadata->member
or metadata::fMember
, where metadata might be the class name or the intrinsic name assigned to the metadata object.
Examples:
Both, ::
and ->
are allowed to separate class and the data member.
Definition at line 1768 of file TRestRun.cxx.
TString TRestRun::FormFormat | ( | const TString & | FilenameFormat | ) |
Form output file name according to file info list, proc info list and run data.
It will replace the fields in output file name surrounded by "[]". The file info list is created by TRestRun::ReadFileInfo(), the proc info list is created by TRestProcessRunner::ReadProcInfo(), the run data is from TRestRun's datamember(fRunNumber,fRunType, etc) e.g. we can set output file name like:
and generates:
Definition at line 940 of file TRestRun.cxx.
Int_t TRestRun::GetNextEvent | ( | TRestEvent * | targetEvent, |
TRestAnalysisTree * | targetTree | ||
) |
Get next event by writing event data into target event and target tree.
returns 0 if success, returns -1 if failed, e.g. end of file writing event data into target event calls the method TRestEvent::CloneTo() writing observable data into target analysistree calls memcpy It requires same branch structure, but we didn't verify it here.
Definition at line 796 of file TRestRun.cxx.
TRestEvent * TRestRun::GetNextEventWithConditions | ( | const std::string & | cuts | ) |
Load the next event that satisfies the conditions specified by a string.
conditions | string specifying conditions, supporting multiple conditions separated by ":", allowed symbols include "<", "<=", ">", ">=", "=", "==". For example "A>=2.2:B==4". |
Definition at line 1525 of file TRestRun.cxx.
void TRestRun::ImportMetadata | ( | const TString & | File, |
const TString & | name, | ||
const TString & | type, | ||
Bool_t | store | ||
) |
Open the root file and import the metadata of the given name.
The metadata class can be recovered to the same condition as when it is saved.
Definition at line 1298 of file TRestRun.cxx.
|
overrideprotectedvirtual |
Initialize logic of TRestRun.
Things doing in this method:
Reimplemented from TRestMetadata.
Definition at line 122 of file TRestRun.cxx.
|
overridevirtual |
REST run class.
Set variables by default during initialization.
Reimplemented from TRestMetadata.
Definition at line 71 of file TRestRun.cxx.
TFile * TRestRun::MergeToOutputFile | ( | std::vector< std::string > | fileFullNames, |
std::string | outputFileName = "" |
||
) |
Form REST output file by merging a list of files together.
If output file name is not given(=""), then it will recreate the output file according to fOutputFileName. Otherwise it will update the given file. File Merging is by calling TFileMerger. After this, it will format the merged file name. This method is used to create output file after TRestProcessRunner is finished. The metadata objects will also be written into the file.
Definition at line 985 of file TRestRun.cxx.
void TRestRun::OpenInputFile | ( | const TString & | filename, |
const std::string & | mode = "" |
||
) |
Open the input file, read file info and the trees if it is root file.
TRestRun will:
Definition at line 331 of file TRestRun.cxx.
void TRestRun::ReadFileInfo | ( | const std::string & | filename | ) |
Extract file info from a file, and save it in the file info list.
Items:
Definition at line 652 of file TRestRun.cxx.
|
private |
It will replace the data member from the corresponding metadata class type or name defined in the input string.
The input string should contain the metadata class type or name following the format string instr = "mdName::fDataMember";
or string instr = "TRestMetadataClass::fDataMember";
. or the format string instr = "mdName->fDataMember";
. Both, ::
and ->
are allowed to separate class and member of the class.
The method will work with both, metadata class or metadata name. First it will be evaluated if the metadata name is found, using the method TRestRun::GetMetadata. If not, it will try to check if the corresponding input string is giving a metadata class type, using the method TRestRun::GetMetadataClass.
Definition at line 1703 of file TRestRun.cxx.
string TRestRun::ReplaceMetadataMembers | ( | const std::string & | instr, |
Int_t | precision = 8 |
||
) |
It will replace the data members contained inside the string given as input. The data members in the input string should be written using the following format [MetadataClass::fDataMember].
Definition at line 1652 of file TRestRun.cxx.
void TRestRun::ResetEntry | ( | ) |
Reset file reading progress.
if input file is root file, just set current entry to be 0 if input file is external file, handled by external process, It will force the process to reload the file.
Definition at line 781 of file TRestRun.cxx.
void TRestRun::SetInputEvent | ( | TRestEvent * | event | ) |
Retarget input event in the tree.
The input event is by default the last branch in EventTree, by calling this method, it can be retargeted to other branches corresponding to the given event.
Definition at line 1245 of file TRestRun.cxx.
void TRestRun::WriteWithDataBase | ( | ) |
Write this object into TFile and add a new entry in database.
level=0 : add a new run in database. run number is the next number, subrun number is 0. level=1 (default) : add a new subrun in database. run number is determined in BeginOfInit(). subrun number is the next number. if run does not exist, it will create new if "force" is true. level>=2 : add a new file in database. run number is determined in BeginOfInit(). subrun number is 0. if not exist, it will create new if "force" is true.
Definition at line 1092 of file TRestRun.cxx.