|
1 | 1 | /******************************************************************************** |
2 | | - * Copyright (C) 2014-2022 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH * |
| 2 | + * Copyright (C) 2014-2023 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH * |
3 | 3 | * * |
4 | 4 | * This software is distributed under the terms of the * |
5 | 5 | * GNU Lesser General Public Licence (LGPL) version 3, * |
6 | 6 | * copied verbatim in the file "LICENSE" * |
7 | 7 | ********************************************************************************/ |
8 | 8 |
|
| 9 | +#include "FairExampleRunSim.h" |
| 10 | + |
9 | 11 | #if !defined(__CLING__) || defined(__ROOTCLING__) |
10 | | -#include <iostream> |
11 | 12 | #include "FairBoxGenerator.h" |
12 | 13 | #include "FairCave.h" |
13 | 14 | #include "FairParRootFileIo.h" |
14 | 15 | #include "FairPrimaryGenerator.h" |
15 | 16 | #include "FairRootFileSink.h" |
16 | | -#include "FairRunSim.h" |
17 | 17 | #include "FairSimConfig.h" |
18 | 18 | #include "FairSystemInfo.h" |
19 | 19 | #include "FairTutorialDet1.h" |
| 20 | +#endif |
20 | 21 |
|
21 | 22 | #include <TRandom3.h> |
22 | 23 | #include <TStopwatch.h> |
| 24 | +#include <iostream> |
23 | 25 |
|
24 | 26 | using std::cout; |
25 | 27 | using std::endl; |
26 | | -#endif |
27 | 28 |
|
28 | 29 | void run_tutorial1_main(const FairSimConfig& config); |
29 | 30 |
|
@@ -76,9 +77,8 @@ void run_tutorial1_main(const FairSimConfig& config) |
76 | 77 | // ------------------------------------------------------------------------ |
77 | 78 |
|
78 | 79 | // ----- Create simulation run ---------------------------------------- |
79 | | - FairRunSim run; |
80 | | - run.SetName(config.GetEngine()); // Transport engine |
81 | | - run.SetIsMT(config.IsMultiThreaded()); // Multi-threading mode (Geant4 only) |
| 80 | + FairExampleRunSim run{config.GetEngine()}; |
| 81 | + run.SetIsMT(config.IsMultiThreaded()); // Multi-threading mode (Geant4 only) |
82 | 82 | run.SetSink(std::make_unique<FairRootFileSink>(outFile)); |
83 | 83 | FairRuntimeDb* rtdb = run.GetRuntimeDb(); |
84 | 84 | // ------------------------------------------------------------------------ |
|
0 commit comments