CbmRoot
Loading...
Searching...
No Matches
cbm::sim::digitization::Run Class Reference

#include <Run.h>

Inheritance diagram for cbm::sim::digitization::Run:
[legend]
Collaboration diagram for cbm::sim::digitization::Run:
[legend]

Public Member Functions

 Run ()
 Constructor.
 
virtual ~Run ()
 Destructor

 
void AllowOverwrite ()
 Allow overwriting if output file already exists.
 
void Exec ()
 Run digitization.
 
const ConfigGetConfig () const
 Settings object.
 
std::string GetFileName (const TString file)
 Get file name without ending.
 
void LoadConfig (const char *fileName)
 Set configuration file name.
 
void SetConfig (const Config &config)
 Set configuration.
 
void SetGeoSetupTag (const char *tag)
 Set geometry setup tag.
 
void SetOutput (const char *fileName)
 Set output file name.
 
void SetTraFiles (const std::vector< std::string > files)
 Set transport file name.
 
void SetParFile (const char *fileName)
 Set parameter file name.
 
 ClassDef (cbm::sim::digitization::Run, 1)
 

Public Attributes

Config fConfig = {}
 

Private Member Functions

 Run (const Run &)=delete
 Copy constructor forbidden.
 
Run operator= (const Run &)=delete
 Assignment operator forbidden.
 
bool CheckFile (const char *fileName)
 Check existence of a file.
 

Private Attributes

CbmDigitization fRun {}
 
TString fOutput = ""
 
std::vector< TString > fTra
 
TString fPar = ""
 
TString fSetupTag = ""
 
CbmSetupfSetup = nullptr
 
bool fOverwrite = false
 

Detailed Description

Definition at line 29 of file sim/response/steer/Run.h.

Constructor & Destructor Documentation

◆ Run() [1/2]

cbm::sim::digitization::Run::Run ( )

Constructor.

Definition at line 35 of file sim/response/steer/Run.cxx.

◆ ~Run()

cbm::sim::digitization::Run::~Run ( )
virtual

Destructor

Definition at line 40 of file sim/response/steer/Run.cxx.

◆ Run() [2/2]

cbm::sim::digitization::Run::Run ( const Run & )
privatedelete

Copy constructor forbidden.

Member Function Documentation

◆ AllowOverwrite()

void cbm::sim::digitization::Run::AllowOverwrite ( )
inline

Allow overwriting if output file already exists.

Definition at line 41 of file sim/response/steer/Run.h.

References fOverwrite.

◆ CheckFile()

bool cbm::sim::digitization::Run::CheckFile ( const char * fileName)
private

Check existence of a file.

Parameters
fileNameFile name (absolute or relative to current directory)
Returns
true if file exists

Definition at line 45 of file sim/response/steer/Run.cxx.

References buffer.

Referenced by Exec().

◆ ClassDef()

cbm::sim::digitization::Run::ClassDef ( cbm::sim::digitization::Run ,
1  )

◆ Exec()

void cbm::sim::digitization::Run::Exec ( )

Run digitization.

Definition at line 54 of file sim/response/steer/Run.cxx.

References CbmDigitization::AddInput(), CheckFile(), CbmDigitization::Deactivate(), CbmDigitization::DeactivateAllBut(), CbmDigitization::EmbedInput(), cbm::sim::EventByEvent, cbm::sim::digitization::Config::f_bg_produceNoise, cbm::sim::digitization::Config::f_det_deactivate, cbm::sim::digitization::Config::f_det_deactivateAllBut, cbm::sim::digitization::Config::f_glb_firstTs, cbm::sim::digitization::Config::f_glb_logColor, cbm::sim::digitization::Config::f_glb_logLevel, cbm::sim::digitization::Config::f_glb_logVerbose, cbm::sim::digitization::Config::f_glb_mode, cbm::sim::digitization::Config::f_glb_numTs, cbm::sim::digitization::Config::f_src_embedToId, cbm::sim::digitization::Config::f_src_id, cbm::sim::digitization::Config::f_src_rate, cbm::sim::digitization::Config::f_src_treeAccessMode, cbm::sim::digitization::Config::f_ts_startTime, cbm::sim::digitization::Config::f_ts_storeAllTS, cbm::sim::digitization::Config::f_ts_timeDist, cbm::sim::digitization::Config::f_ts_tslength, fConfig, fOutput, fOverwrite, fPar, fRun, fSetup, fSetupTag, fTra, GetFileName(), CbmSetup::Instance(), kNotExist, CbmSetup::LoadSetup(), CbmDigitization::Run(), CbmDigitization::SetMode(), CbmDigitization::SetMonitorFile(), CbmDigitization::SetOutputFile(), CbmDigitization::SetParameterRootFile(), CbmDigitization::SetProduceNoise(), CbmDigitization::SetStartTime(), CbmDigitization::SetTimeSliceLength(), CbmDigitization::StoreAllTimeSlices(), cbm::sim::Timebased, and cbm::sim::digitization::Config::ToString().

◆ GetConfig()

const Config & cbm::sim::digitization::Run::GetConfig ( ) const
inline

Settings object.

Definition at line 49 of file sim/response/steer/Run.h.

References fConfig.

◆ GetFileName()

std::string cbm::sim::digitization::Run::GetFileName ( const TString file)

Get file name without ending.

Parameters
filefull file name including ending

Definition at line 143 of file sim/response/steer/Run.cxx.

Referenced by Exec().

◆ LoadConfig()

void cbm::sim::digitization::Run::LoadConfig ( const char * fileName)

Set configuration file name.

Parameters
fileNameConfiguration file name

Legacy interface for running from ROOT prompt. In the executable, the config is read in by the application.

Definition at line 155 of file sim/response/steer/Run.cxx.

References fConfig, and cbm::sim::digitization::Config::LoadYaml().

◆ operator=()

Run cbm::sim::digitization::Run::operator= ( const Run & )
privatedelete

Assignment operator forbidden.

◆ SetConfig()

void cbm::sim::digitization::Run::SetConfig ( const Config & config)
inline

Set configuration.

Parameters
fileNameConfiguration object

Definition at line 69 of file sim/response/steer/Run.h.

References fConfig.

◆ SetGeoSetupTag()

void cbm::sim::digitization::Run::SetGeoSetupTag ( const char * tag)
inline

Set geometry setup tag.

Parameters
tagGeometry setup tag

Definition at line 75 of file sim/response/steer/Run.h.

References fSetupTag.

◆ SetOutput()

void cbm::sim::digitization::Run::SetOutput ( const char * fileName)
inline

Set output file name.

Parameters
fileNameOutput file name

Definition at line 81 of file sim/response/steer/Run.h.

References fOutput.

◆ SetParFile()

void cbm::sim::digitization::Run::SetParFile ( const char * fileName)
inline

Set parameter file name.

Parameters
fileNameParameter file name

Definition at line 93 of file sim/response/steer/Run.h.

References fPar.

◆ SetTraFiles()

void cbm::sim::digitization::Run::SetTraFiles ( const std::vector< std::string > files)

Set transport file name.

Parameters
filesTransport input sources

Definition at line 169 of file sim/response/steer/Run.cxx.

References fTra.

Member Data Documentation

◆ fConfig

Config cbm::sim::digitization::Run::fConfig = {}

Definition at line 122 of file sim/response/steer/Run.h.

Referenced by Exec(), GetConfig(), LoadConfig(), and SetConfig().

◆ fOutput

TString cbm::sim::digitization::Run::fOutput = ""
private

Definition at line 114 of file sim/response/steer/Run.h.

Referenced by Exec(), and SetOutput().

◆ fOverwrite

bool cbm::sim::digitization::Run::fOverwrite = false
private

Definition at line 119 of file sim/response/steer/Run.h.

Referenced by AllowOverwrite(), and Exec().

◆ fPar

TString cbm::sim::digitization::Run::fPar = ""
private

Definition at line 116 of file sim/response/steer/Run.h.

Referenced by Exec(), and SetParFile().

◆ fRun

CbmDigitization cbm::sim::digitization::Run::fRun {}
private

Definition at line 113 of file sim/response/steer/Run.h.

Referenced by Exec().

◆ fSetup

CbmSetup* cbm::sim::digitization::Run::fSetup = nullptr
private

Definition at line 118 of file sim/response/steer/Run.h.

Referenced by Exec().

◆ fSetupTag

TString cbm::sim::digitization::Run::fSetupTag = ""
private

Definition at line 117 of file sim/response/steer/Run.h.

Referenced by Exec(), and SetGeoSetupTag().

◆ fTra

std::vector<TString> cbm::sim::digitization::Run::fTra
private

Definition at line 115 of file sim/response/steer/Run.h.

Referenced by Exec(), and SetTraFiles().


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