Skip to content

Commit 95293cf

Browse files
aphecetchektf
authored andcommitted
[O2-621] Rename executables from run/ directory.
o2sim_serial -> o2-sim-serial runTPC -> o2-sim-tpc O2SimDeviceRunner -> o2-sim-device-runner O2PrimaryServerDeviceRunner -> o2-sim-primary-server-device-runner O2HitMergerRunner -> o2-sim-hit-merger-runner o2sim -> o2_sim Couple of comments : - the hard-coded string "o2sim" is used is _A LOT_ of places throughout the code base. That should probably be fixed at some point. - o2-sim-hit-merger-runner could also be named o2-sim-hitmerger-runner depending on where one prefers to split the words. - ditto for o2-sim-primary-server vs o2-sim-primaryserver
1 parent f976728 commit 95293cf

File tree

8 files changed

+29
-29
lines changed

8 files changed

+29
-29
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ set(EXCLUDE_MACROS_FROM_TEST
249249
# Disabled from @mconcas: will be removed soon in any case
250250
${CMAKE_SOURCE_DIR}/macro/run_vert_ca_its.C
251251

252-
# This macro is used by the o2sim tests, no need to re-check. Parallel tests
252+
# This macro is used by the o2-sim tests, no need to re-check. Parallel tests
253253
# of the same macro are also breaking it
254254
${CMAKE_SOURCE_DIR}/DataFormats/simulation/test/checkStack.C
255255
)

Detectors/TPC/simulation/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,9 @@ O2_GENERATE_TESTS(
8080

8181
# add the TPC run sim as a unit test (if simulation was enabled)
8282
if (HAVESIMULATION)
83-
add_test_wrap(NAME tpcsim_G4 COMMAND ${CMAKE_BINARY_DIR}/bin/runTPC -n 2 -e TGeant4)
83+
add_test_wrap(NAME tpcsim_G4 COMMAND ${CMAKE_BINARY_DIR}/bin/o2-sim-tpc -n 2 -e TGeant4)
8484
set_tests_properties(tpcsim_G4 PROPERTIES PASS_REGULAR_EXPRESSION "Macro finished succesfully")
85-
add_test_wrap(NAME tpcsim_G3 COMMAND ${CMAKE_BINARY_DIR}/bin/runTPC -n 2 -e TGeant3)
85+
add_test_wrap(NAME tpcsim_G3 COMMAND ${CMAKE_BINARY_DIR}/bin/o2-sim-tpc -n 2 -e TGeant3)
8686
set_tests_properties(tpcsim_G3 PROPERTIES PASS_REGULAR_EXPRESSION "Macro finished succesfully")
8787
# sets the necessary environment
8888
set_tests_properties(tpcsim_G3 tpcsim_G4 PROPERTIES ENVIRONMENT VMCWORKDIR=${CMAKE_SOURCE_DIR})

Utilities/MCStepLogger/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ O2_GENERATE_EXECUTABLE(
5151

5252
# check correct functioning of the logger and the MC analysis chain
5353
if (HAVESIMULATION)
54-
add_test_wrap(NAME mcloggertest COMMAND ${CMAKE_BINARY_DIR}/bin/runTPC -n 1 -e TGeant3)
54+
add_test_wrap(NAME mcloggertest COMMAND ${CMAKE_BINARY_DIR}/bin/o2-sim-tpc -n 1 -e TGeant3)
5555
# tests if the logger was active
5656
set_tests_properties(mcloggertest PROPERTIES PASS_REGULAR_EXPRESSION "VolName.*COUNT")
5757
if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")

doc/DetectorSimulation.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ Detector simulation, the simulation of detector response from virtual particle e
1010
a) the generation of simple (energy deposit) traces in the detector due to the passage of particles and the interaction with the detector material.
1111
b) the conversion of those traces into (electronic) signals in the detector readout (usually called digitization).
1212

13-
The first part is handled by the `o2sim` executable. The second part is handled in the `digitizer-workflow`.
13+
The first part is handled by the `o2-sim` executable. The second part is handled in the `digitizer-workflow`.
1414

15-
# Documentation of `o2sim`
15+
# Documentation of `o2-sim`
1616

17-
The purpose of the `o2sim` executable is to simulate the passage of particles emerging from a collision inside the detector and to obtain their effect in terms of energy deposits (called hits) which could be converted into detectable signals.
17+
The purpose of the `o2-sim` executable is to simulate the passage of particles emerging from a collision inside the detector and to obtain their effect in terms of energy deposits (called hits) which could be converted into detectable signals.
1818

1919
## Command overview
20-
* **Basic help:** Help on command line options can be obtained with `o2sim --help`
20+
* **Basic help:** Help on command line options can be obtained with `o2-sim --help`
2121
* **Typical example:** A typical (exemplary) invocation is of the form
2222

2323
```o2sim -n 10 -g pythia8 -e TGeant4 -j 2 --skipModules ZDC,PHS```
@@ -94,9 +94,9 @@ o2sim --embedIntoFile o2sim.background.root
9494
Background events are sampled one-by-one until all events have been used. At that point the events start to be reused.
9595

9696
#### 5. **How can I obtained detailed stepping information?**
97-
Run the simulation (currently only supported in combination with `o2sim_serial`) with a preloaded library:
97+
Run the simulation (currently only supported in combination with `o2-sim-serial`) with a preloaded library:
9898
```
99-
MCSTEPLOG_TTREE=1 LD_PRELOAD=$O2_ROOT/lib/libMCStepLogger.so o2sim_serial -j 1 -n 10
99+
MCSTEPLOG_TTREE=1 LD_PRELOAD=$O2_ROOT/lib/libMCStepLogger.so o2-sim-serial -j 1 -n 10
100100
```
101101
This will produce a file `MCStepLoggerOutput.root` containing detailed information about steps and processes (where, what, ...). The file can be analysed using a special analysis framework. See https://github.com/AliceO2Group/AliceO2/blob/dev/Utilities/MCStepLogger/README.md for more documentation.
102102

macro/runSimRecMatchITSTPC.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ nEvents=10
22
#To activate the continuos readout, assign a positive value to the rate
33
rate=50.e3
44

5-
o2sim -n $nEvents -m PIPE ITS TPC FRAME >& sim.log
5+
o2-sim -n $nEvents -m PIPE ITS TPC FRAME >& sim.log
66

77
macroPath="$O2_ROOT/share/macro"
88
preload="$macroPath"/loadExtDepLib.C

run/CMakeLists.txt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
Set(Exe_Names
2-
o2sim_serial
3-
runTPC
4-
O2SimDeviceRunner
5-
O2PrimaryServerDeviceRunner
6-
O2HitMergerRunner
7-
o2sim
2+
o2-sim-serial
3+
o2-sim-tpc
4+
o2-sim-device-runner
5+
o2-sim-primary-server-device-runner
6+
o2-sim-hit-merger-runner
7+
o2-sim
88
)
99

1010
Set(Exe_Source
@@ -55,7 +55,7 @@ if (HAVESIMULATION)
5555
DONT_FAIL_ON_TIMEOUT
5656
MAX_ATTEMPTS 2
5757
TIMEOUT 400
58-
COMMAND ${CMAKE_BINARY_DIR}/bin/o2sim_serial -n 1 -e TGeant4 --isMT on -o o2simG4MT)
58+
COMMAND ${CMAKE_BINARY_DIR}/bin/o2-sim-serial -n 1 -e TGeant4 --isMT on -o o2simG4MT)
5959
set_tests_properties(o2sim_G4_mt PROPERTIES PASS_REGULAR_EXPRESSION "Macro finished succesfully")
6060

6161
add_test_wrap(NAME o2sim_checksimkinematics_G4

run/o2sim_parallel.cxx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ int main(int argc, char* argv[])
197197
if (conf.getNEvents() <= 0) {
198198
LOG(INFO) << "No events to be simulated; Switching to non-distributed mode";
199199
const int Nargs = argc + 1;
200-
std::string name("o2sim_serial");
200+
std::string name("o2-sim-serial");
201201
const char* arguments[Nargs];
202202
arguments[0] = name.c_str();
203203
for (int i = 1; i < argc; ++i) {
@@ -242,9 +242,9 @@ int main(int argc, char* argv[])
242242
dup2(fd, 2); // make stderr go to file - you may choose to not do this
243243
// or perhaps send stderr to another file
244244
close(pipe_serverdriver_fd[0]);
245-
close(fd); // fd no longer needed - the dup'ed handles are sufficient
245+
close(fd); // fd no longer needed - the dup'ed handles are sufficient
246246

247-
const std::string name("O2PrimaryServerDeviceRunner");
247+
const std::string name("o2-sim-primary-server-device-runner");
248248
const std::string path = installpath + "/" + name;
249249
const std::string config = localconfig;
250250

@@ -299,7 +299,7 @@ int main(int argc, char* argv[])
299299
// or perhaps send stderr to another file
300300
close(fd); // fd no longer needed - the dup'ed handles are sufficient
301301

302-
const std::string name("O2SimDeviceRunner");
302+
const std::string name("o2-sim-device-runner");
303303
const std::string path = installpath + "/" + name;
304304
execl(path.c_str(), name.c_str(), "--control", "static", "--id", workerss.str().c_str(), "--config-key",
305305
"worker", "--mq-config", localconfig.c_str(), "--severity", "info", (char*)nullptr);
@@ -327,7 +327,7 @@ int main(int argc, char* argv[])
327327
close(pipe_mergerdriver_fd[0]);
328328
setenv("ALICE_O2SIMMERGERTODRIVER_PIPE", std::to_string(pipe_mergerdriver_fd[1]).c_str(), 1);
329329

330-
const std::string name("O2HitMergerRunner");
330+
const std::string name("o2-sim-hit-merger-runner");
331331
const std::string path = installpath + "/" + name;
332332
execl(path.c_str(), name.c_str(), "--control", "static", "--catch-signals", "0", "--id", "hitmerger", "--mq-config", localconfig.c_str(),
333333
(char*)nullptr);

run/startSim.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,17 @@
33
NSIMWORKERS=$1
44

55
killall -9 xterm
6-
killall -9 O2PrimaryServerDeviceRunner
7-
killall -9 O2SimDeviceRunner
8-
killall -9 O2HitMergerRunner
6+
killall -9 o2-sim-primary-server-device-runner
7+
killall -9 o2-sim-device-runner
8+
killall -9 o2-sim-hit-merger-runner
99

1010
topologyfile=${O2_ROOT}/share/config/o2simtopology.json
1111

1212
# we have one primary distributor
13-
xterm -geometry 80x25+0+0 -e "O2PrimaryServerDeviceRunner --control static --id primary-server --mq-config ${topologyfile} -n 20 -m PIPE TOF TRD TPC PHS EMC FIT MCH -g pythia8 -e TGeant3 | tee serverlog;bash" &
13+
xterm -geometry 80x25+0+0 -e "o2-sim-primary-server-device-runner --control static --id primary-server --mq-config ${topologyfile} -n 20 -m PIPE TOF TRD TPC PHS EMC FIT MCH -g pythia8 -e TGeant3 | tee serverlog;bash" &
1414

1515
for i in `seq 1 ${NSIMWORKERS}`; do
16-
xterm -geometry 80x25+500+0 -e "O2SimDeviceRunner --control static --id worker${i} --config-key worker --mq-config ${topologyfile} --severity info | tee simlog${i};bash" &
16+
xterm -geometry 80x25+500+0 -e "o2-sim-device-runner --control static --id worker${i} --config-key worker --mq-config ${topologyfile} --severity info | tee simlog${i};bash" &
1717
done
1818

1919

@@ -22,5 +22,5 @@ done
2222

2323

2424
# one hit merger -> the time measures the walltime of the complete session
25-
time O2HitMergerRunner --id hitmerger --control static --mq-config ${topologyfile} | tee mergelog
25+
time o2-sim-hit-merger-runner --id hitmerger --control static --mq-config ${topologyfile} | tee mergelog
2626

0 commit comments

Comments
 (0)