BmnRoot 26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Loading...
Searching...
No Matches
prerun_create.C File Reference

Go to the source code of this file.

Functions

bool parse_datetime (TString datetime_string, TDatime &datetime)
int create_run_period (int period_number, TDatime start_datetime, TDatime end_datetime, bool isPeriodExists)
int create_fictitious_run (int period_number, int run_number, TDatime start_datetime, TDatime end_datetime)
int copy_detector_parameters (int period_number, int start_run, int end_run, int prev_period, int prev_run, bool isCopySingleRunValues=false)
int prerun_create (int period_number, TString start_datetime, TString end_datetime, int start_run=1, int end_run=100000, bool isCopySingleRunValues=false, bool isUpdateExistingPeriod=false)
 Main pre-run procedure to prepare metadata parameters for a new Run:

Function Documentation

◆ copy_detector_parameters()

int copy_detector_parameters ( int period_number,
int start_run,
int end_run,
int prev_period,
int prev_run,
bool isCopySingleRunValues = false )

Definition at line 78 of file prerun_create.C.

References TString::Format(), TSQLStatement::GetInt(), TSQLStatement::GetLong64(), TSQLStatement::GetNumAffectedRows(), UniConnection::GetSQLServer(), TSQLStatement::GetString(), TSQLStatement::NextResultRow(), UniConnection::Open(), TSQLStatement::Process(), TSQLServer::Statement(), and TSQLStatement::StoreResult().

Referenced by prerun_create().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ create_fictitious_run()

int create_fictitious_run ( int period_number,
int run_number,
TDatime start_datetime,
TDatime end_datetime )

Definition at line 48 of file prerun_create.C.

References UniRun::CheckRunExists(), and UniRun::CreateRun().

Referenced by prerun_create().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ create_run_period()

int create_run_period ( int period_number,
TDatime start_datetime,
TDatime end_datetime,
bool isPeriodExists )

Definition at line 16 of file prerun_create.C.

References TDatime::AsSQLString(), UniRunPeriod::CreateRunPeriod(), UniRunPeriod::GetRunPeriod(), UniRunPeriod::SetEndDatetime(), and UniRunPeriod::SetStartDatetime().

Referenced by prerun_create().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ parse_datetime()

bool parse_datetime ( TString datetime_string,
TDatime & datetime )

Definition at line 2 of file prerun_create.C.

References TString::Data(), TString::kBoth, TPRegexp::MatchB(), TDatime::Set(), and TString::Strip().

Referenced by prerun_create().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ prerun_create()

int prerun_create ( int period_number,
TString start_datetime,
TString end_datetime,
int start_run = 1,
int end_run = 100000,
bool isCopySingleRunValues = false,
bool isUpdateExistingPeriod = false )
  1. create the new period with the given time interval ("yyyy-mm-dd hh:mm:ss")
  2. create fictitious runs with start_run and end_run numbers for the period
  3. copy all detector parameter values valid for the last run before the period to period_number:start_run - period_number:end_run The fictitious run range is corrected to the real first and last runs after the session by postrun_update.C

If the period already exists then nothing is changed and the macro exits (returns 1), unless isUpdateExistingPeriod is true: then the period times are set to the given ones, absent fictitious runs are created and absent parameter values are copied

example: root -b -q 'prerun_create.C(10, "2026-10-01 00:00:00", "2027-04-01 00:00:00", 1, 100000)'

Definition at line 181 of file prerun_create.C.

References UniRunPeriod::CheckRunPeriodExists(), TDatime::Convert(), copy_detector_parameters(), create_fictitious_run(), create_run_period(), UniRun::FindPreviousRun(), and parse_datetime().

Here is the call graph for this function: