VMC Examples Version 6.7
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Modules Pages
listPLOptions.cxx File Reference

Print available base physics lists and EM options. More...

#include "G4PhysListFactory.hh"
#include "G4String.hh"
#include "G4ios.hh"
#include <vector>
Include dependency graph for listPLOptions.cxx:

Go to the source code of this file.

Functions

int main (int argc, char **argv)
 

Detailed Description

Print available base physics lists and EM options.

Usage:

    ./listPLOptions [-b base lists ] [-em em options ] [-v verbose]
       -b    list available base physics lists
       -em   list available EM options */
//     -v    precede lists with a title
/** 
Date
20/01/2025
Author
I. Hrivnacova; IJCLab, Orsay

Definition in file listPLOptions.cxx.

Function Documentation

◆ main()

int main ( int argc,
char ** argv )

Definition at line 52 of file listPLOptions.cxx.

53{
54 // Evaluate arguments
55 //
56 if (argc > 5) {
57 PrintUsage();
58 return 1;
59 }
60
61 G4bool baseLists = false;;
62 G4bool emOptions = false;
63 G4bool verbose = false;
64 for (G4int i = 1; i < argc; ++i) {
65 if (G4String(argv[i]) == "-b")
66 baseLists = true;
67 else if (G4String(argv[i]) == "-em")
68 emOptions = true;
69 else if (G4String(argv[i]) == "-v")
70 verbose = true;
71 else {
72 PrintUsage();
73 return 1;
74 }
75 }
76
77 if ( (! baseLists) && (! emOptions) ) {
78 PrintUsage();
79 return 1;
80 }
81
82 // Physics list factory
83 G4PhysListFactory factory;
84
85 if (baseLists) {
86 if (verbose) {
87 G4cout << "Base physics lists: ";
88 }
89 PrintNameList(factory.AvailablePhysLists());
90 }
91
92 if (emOptions) {
93 if (verbose) {
94 G4cout << "EM Options: ";
95 }
96 PrintNameList(factory.AvailablePhysListsEM());
97 }
98}
std::string verbose
Definition testE03c.cxx:75