Manages output operations including ntuple registration and persistent storage. More...
#include <RMGOutputManager.hh>
Public Member Functions | |
| RMGOutputManager (RMGOutputManager const &)=delete | |
| RMGOutputManager & | operator= (RMGOutputManager const &)=delete |
| RMGOutputManager (RMGOutputManager &&)=delete | |
| RMGOutputManager & | operator= (RMGOutputManager &&)=delete |
| bool | IsPersistencyEnabled () const |
| Checks if persistency is enabled. | |
| const std::string & | GetOutputFileName () |
| Retrieves the output file name. | |
| bool | HasOutputFileNameNone () const |
| Checks if the output file name is set to "none". | |
| bool | HasOutputFileName () const |
| Checks if a valid output file name is set. | |
| bool | GetOutputOverwriteFiles () const |
| Indicates whether output files should be overwritten. | |
| const std::string & | GetOutputNtupleDirectory () |
| Gets the directory name for output ntuples. | |
| bool | GetOutputNtuplePerDetector () const |
| Checks if output ntuples are generated per detector. | |
| bool | GetOutputNtupleUseVolumeName () const |
| Checks if volume names are used for output ntuple naming. | |
| const std::map< int, std::pair< int, std::string > > & | GetNtupleIDs () |
| Retrieves the set of registered ntuple detector identifiers. | |
| std::set< std::string > | GetAuxNtupleNames () |
| Retrieves the set of registered auxiliary ntuple identifiers. | |
| void | EnablePersistency (bool flag=true) |
| Enables or disables output persistency. | |
| void | SetOutputFileName (std::string filename) |
| Sets the output file name. | |
| void | SetOutputOverwriteFiles (bool overwrite) |
| Configures whether output files should be overwritten. | |
| void | SetOutputNtupleDirectory (std::string dir) |
| Sets the directory for output ntuples. | |
| int | RegisterNtuple (int det_uid, int ntuple_id, std::string table_name) |
| Registers an alreaday created ntuple for a given detector. | |
| int | CreateAndRegisterNtuple (int det_uid, std::string table_name, std::string oscheme, G4AnalysisManager *ana_man) |
| Creates and registers a ntuple for a given detector. | |
| int | CreateAndRegisterAuxNtuple (std::string table_name, std::string oscheme, G4AnalysisManager *ana_man) |
| Creates and registers an auxiliary ntuple. | |
| int | GetNtupleID (int det_uid) |
| Gets the ntuple identifier for a given detector. | |
| int | GetAuxNtupleID (std::string det_uid) |
| Gets the auxiliary ntuple identifier for a given key. | |
| void | ActivateOptionalOutputScheme (std::string name) |
| Activates an optional output scheme. | |
Static Public Member Functions | |
| static RMGOutputManager * | Instance () |
| Gets the singleton instance of RMGOutputManager. | |
Manages output operations including ntuple registration and persistent storage.
This singleton class provides methods for configuring output options, registering ntuples, and handling file persistency for analysis purposes.
| void RMGOutputManager::ActivateOptionalOutputScheme | ( | std::string | name | ) |
Activates an optional output scheme.
| name | Name of the output scheme to activate. |
| int RMGOutputManager::CreateAndRegisterAuxNtuple | ( | std::string | table_name, |
| std::string | oscheme, | ||
| G4AnalysisManager * | ana_man ) |
Creates and registers an auxiliary ntuple.
An auxiliary ntuple stores information not strictly related to stepping data. An IPC message keyed as "output_ntuple_aux" is automatically sent to communicate the output scheme name and the output table name.
| table_name | Name of the output table. |
| oscheme | Type name of the output scheme registering this ntuple. |
| ana_man | Pointer to the analysis manager. |
| int RMGOutputManager::CreateAndRegisterNtuple | ( | int | det_uid, |
| std::string | table_name, | ||
| std::string | oscheme, | ||
| G4AnalysisManager * | ana_man ) |
Creates and registers a ntuple for a given detector.
An ordinary ntuple that stores information related to stepping data. An IPC message keyed as "output_ntuple" is automatically sent to communicate the output scheme name and the output table name.
| det_uid | Unique identifier for the detector. |
| table_name | Name of the table. |
| oscheme | Type name of the output scheme registering this ntuple. |
| ana_man | Pointer to the analysis manager. |
|
inline |
Enables or disables output persistency.
| flag | Set to true to enable, false to disable. |
|
inline |
Gets the auxiliary ntuple identifier for a given key.
| det_uid | Key for the auxiliary ntuple. |
|
inline |
Retrieves the set of registered auxiliary ntuple identifiers.
|
inline |
Gets the ntuple identifier for a given detector.
| det_uid | Unique identifier for the detector. |
|
inline |
Retrieves the set of registered ntuple detector identifiers.
|
inline |
Retrieves the output file name.
|
inline |
Gets the directory name for output ntuples.
|
inlinenodiscard |
Checks if output ntuples are generated per detector.
|
inlinenodiscard |
Checks if volume names are used for output ntuple naming.
|
inlinenodiscard |
Indicates whether output files should be overwritten.
|
inlinenodiscard |
Checks if a valid output file name is set.
|
inlinenodiscard |
Checks if the output file name is set to "none".
|
inlinestatic |
Gets the singleton instance of RMGOutputManager.
Creates a new instance if none exists.
|
inlinenodiscard |
Checks if persistency is enabled.
| int RMGOutputManager::RegisterNtuple | ( | int | det_uid, |
| int | ntuple_id, | ||
| std::string | table_name ) |
Registers an alreaday created ntuple for a given detector.
| det_uid | Unique identifier for the detector. |
| ntuple_id | Identifier for the ntuple. |
| table_name | name of the the ntuple on disk. |
|
inline |
Sets the output file name.
| filename | The name of the output file. |
|
inline |
Sets the directory for output ntuples.
this might not be used by all output file formats.
| dir | The directory name for ntuple output. |
|
inline |
Configures whether output files should be overwritten.
| overwrite | True to enable overwriting, false otherwise. |