eventDispenser
Loading...
Searching...
No Matches
eventDispenser_options.cc
Go to the documentation of this file.
1// eventDispenser
3
4// gemc
6
14
15// namespace to define options
16namespace eventDispenser {
17// returns array of options definitions
19 // Create the module option set. The logger name is used for consistent diagnostics.
21
22 // Option: number of events
23 std::string help = "Example: -n=200\n";
24 goptions.defineOption(GVariable("n", 1, "number of events to process"), help);
25
26 // Option: run number
27 // Clarify that this is the *event* run number, distinct from -runno (geometry selection)
28 // and from the Geant4 internal run id (g4runno, set automatically).
29 help = "Run number assigned to the generated events; it is also the key looked up in the\n";
30 help += "-run_weights file. This is distinct from -runno, which selects the geometry/conditions\n";
31 help += "variation from the database, and from the Geant4 run id g4runno, set automatically.\n \n";
32 help += "Example: -run=12\n";
33 goptions.defineOption(GVariable("run", 1, "event run number"), help);
34
35 // Option: run weights file
36 help = "Text file with run number and their weights.\n \n";
37 help += guts::GTAB;
38 help +=
39 "The text file must have two columns: run# and weight. The weight represents the ratio of events desired for a run number.\n";
40 help += guts::GTAB;
41 help += "For example a \"weights.txt\" file that contains:\n \n";
42 help += guts::GTABTAB;
43 help += "11 0.1\n";
44 help += guts::GTABTAB;
45 help += "12 0.7\n";
46 help += guts::GTABTAB;
47 help += "13 0.2\n \n";
48 help += guts::GTAB;
49 help += "will simulate 10% of events with run number 11 conditions, 70% for run 12 and 20% for run 13.\n";
50
51 goptions.defineOption(
52 GVariable("run_weights", std::nullopt, "File with run number and weights"),
53 help
54 );
55
56 // Append options required by the dynamic digitization module.
58
59 return goptions;
60}
61} // namespace eventDispenser
Public declaration of the Event Dispenser module command-line / configuration options.
constexpr const char * EVENTDISPENSER_LOGGER
Logger name used by this module when creating a GLogger through the base infrastructure.
Namespace containing the Event Dispenser module option definitions.
GOptions defineOptions()
Builds and returns the complete set of options supported by the Event Dispenser module.
GOptions defineOptions()
constexpr char GTABTAB[]
constexpr char GTAB[]