Skip to content

Commit b2228c6

Browse files
Barthelemyknopers8
authored andcommitted
Rename binaries according to new rules (QC-164) (#153)
* Rename binaries according to new rules (kebab-case) * change name of modulesHelper.sh * fix indentation * Fix the broken merge
1 parent d7eed82 commit b2228c6

11 files changed

Lines changed: 50 additions & 28 deletions

Framework/CMakeLists.txt

Lines changed: 28 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,20 @@ set(
142142

143143
set(
144144
EXE_NAMES
145+
o2-qc-info-service
146+
o2-qc-info-service-dump
147+
o2-qc-run-basic
148+
o2-qc-run-advanced
149+
o2-qc-run-readout
150+
o2-qc-run-merger-test
151+
o2-qc-run-readout-for-data-dump
152+
o2-qc-repository-benchmark
153+
)
154+
155+
# These were the original names before the convention changed.
156+
# We will get rid of them but for the time being we want to create symlinks to avoid confusion.
157+
set(
158+
EXE_OLD_NAMES
145159
qcInfoService
146160
qcInfoServiceDump
147161
qcRunBasic
@@ -152,19 +166,29 @@ set(
152166
repositoryBenchmark
153167
)
154168

169+
# As per https://stackoverflow.com/questions/35765106/symbolic-links-cmake
170+
macro(install_symlink filepath sympath)
171+
install(CODE "execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink ${filepath} ${sympath})")
172+
install(CODE "message(\"-- Created symlink: ${sympath} -> ${filepath}\")")
173+
endmacro(install_symlink)
174+
155175
list(LENGTH EXE_SRCS count)
156176
math(EXPR count "${count}-1")
157177
foreach(i RANGE ${count})
158178
list(GET EXE_SRCS ${i} src)
159179
list(GET EXE_NAMES ${i} name)
180+
list(GET EXE_OLD_NAMES ${i} oldname)
160181
add_executable(${name} ${src})
161182
target_link_libraries(${name} PRIVATE QualityControl CURL::CURL)
183+
install_symlink(${CMAKE_INSTALL_FULL_BINDIR}/${name} ${CMAKE_INSTALL_FULL_BINDIR}/${oldname})
162184
endforeach()
163185

164186
# ---- Gui ----
165187

166188
set(DATADUMP "")
167189
if(GLFW_FOUND)
190+
set(DATADUMP "o2-qc-data-dump")
191+
168192
set(
169193
GUI_SRCS
170194
src/imgui/imgui.cpp
@@ -178,13 +202,11 @@ if(GLFW_FOUND)
178202
src/runDataDump.cxx
179203
)
180204

181-
add_executable(dataDump ${GUI_SRCS})
182-
183-
target_link_libraries(dataDump PRIVATE QualityControl GLFW::GLFW)
205+
add_executable(${DATADUMP} ${GUI_SRCS})
184206

185-
set(DATADUMP "dataDump")
207+
target_link_libraries(${DATADUMP} PRIVATE QualityControl GLFW::GLFW)
186208
else()
187-
message(STATUS "GLFW not found, DataDump will not be built")
209+
message(STATUS "GLFW not found, ${DATADUMP} will not be built")
188210
endif()
189211

190212
# ---- Tests ----
@@ -277,7 +299,7 @@ install(
277299

278300
# ---- Extra scripts ----
279301

280-
install(PROGRAMS script/qcDatabaseSetup.sh DESTINATION bin)
302+
install(PROGRAMS script/o2-qc-database-setup.sh DESTINATION bin)
281303
install(
282304
FILES
283305
example-default.json
File renamed without changes.
File renamed without changes.
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,17 +140,17 @@ function create_check {
140140
}
141141

142142
function print_usage {
143-
echo "Usage: ./modulesHelper.sh -m MODULE_NAME [OPTION]
143+
echo "Usage: ./o2-qc-module-configurator.sh -m MODULE_NAME [OPTION]
144144
145145
Generate template QC module and/or tasks, checks.
146146
If a module with specified name already exists, new tasks and checks are inserted to the existing one.
147147
Please follow UpperCamelCase convention for modules', tasks' and checks' names.
148148
149149
Example:
150150
# create new module and some task
151-
./modulesHelper.sh -m MyModule -t SuperTask
151+
./o2-qc-module-configurator.sh -m MyModule -t SuperTask
152152
# add one task and two checks
153-
./modulesHelper.sh -m MyModule -t EvenBetterTask -c HistoUniformityCheck -c MeanTest
153+
./o2-qc-module-configurator.sh -m MyModule -t EvenBetterTask -c HistoUniformityCheck -c MeanTest
154154
155155
Options:
156156
-h print this message

doc/Advanced.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ enabled=1
5555
In 3 separate terminals, do respectively
5656

5757
1. `readout.exe file:///absolute/path/to/config.cfg`
58-
2. `qcRunReadoutForDataDump --batch`
59-
3. `dataDump --mq-config $QUALITYCONTROL_ROOT/etc/dataDump.json --id dataDump --control static`
58+
2. `o2-qc-run-readout-for-data-dump --batch`
59+
3. `o2-qc-data-dump --mq-config $QUALITYCONTROL_ROOT/etc/dataDump.json --id dataDump --control static`
6060

6161
### Configuration
6262

@@ -83,7 +83,7 @@ and `$QUALITYCONTROL_ROOT/etc/dataDump.json`.
8383
```
8484
sudo systemctl start mariadb # for CC7, check for your specific OS
8585
alienv enter qcg/latest
86-
qcDatabaseSetup.sh
86+
o2-qc-database-setup.sh
8787
```
8888

8989
## Local CCDB setup
@@ -183,19 +183,19 @@ The JSON for all tasks looks like :
183183
```
184184
### Usage
185185
```
186-
qcInfoService -c /absolute/path/to/InformationService.json -n information_service \
186+
o2-qc-info-service -c /absolute/path/to/InformationService.json -n information_service \
187187
--id information_service --mq-config /absolute/path/to/InformationService.json
188188
```
189189

190-
The `qcInfoService` can provide fake data from a file. This is useful
190+
The `o2-qc-info-service` can provide fake data from a file. This is useful
191191
to test the clients. Use the option `--fake-data-file` and provide the
192192
absolute path to the file. The file `infoServiceFake.json` is provided
193193
as an example.
194194

195195
To check what is being output by the Information Service, one can
196196
run the InformationServiceDump :
197197
```
198-
qcInfoServiceDump -c /absolute/path/to/InformationService.json -n information_service_dump \
198+
o2-qc-info-service-dump -c /absolute/path/to/InformationService.json -n information_service_dump \
199199
--id information_service_dump --mq-config /absolute/path/to/InformationService.json
200200
--request-task myTask1
201201
```

doc/ModulesDevelopment.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ In case one needs to sample at a very high rate, or even monitor 100% of the dat
169169
}
170170
```
171171

172-
The file `basic-no-sampling.json` is provided as an example. To test it, you can run `qcRunBasic` with the option `--no-data-sampling` (it makes it use this config file instead of `basic.json`).
172+
The file `basic-no-sampling.json` is provided as an example. To test it, you can run `o2-qc-run-basic` with the option `--no-data-sampling` (it makes it use this config file instead of `basic.json`).
173173

174174
### Code Organization
175175

@@ -185,19 +185,19 @@ The Quality Control uses _plugins_ to load the actual code to be executed by the
185185

186186
Before starting to develop the code, one should create a new module if it does not exist yet. Typically each detector team should prepare a module.
187187

188-
The script `modulesHelper.sh`, in the directory _Modules_, is able to prepare a new module or to add a new _Task_ or a new _Check_ to an existing module. It must be run from __within QualityControl/Modules__. See the help message below:
188+
The script `o2-qc-module-configurator.sh`, in the directory _Modules_, is able to prepare a new module or to add a new _Task_ or a new _Check_ to an existing module. It must be run from __within QualityControl/Modules__. See the help message below:
189189
```
190-
Usage: ./modulesHelper.sh -m MODULE_NAME [OPTION]
190+
Usage: ./o2-qc-module-configurator.sh -m MODULE_NAME [OPTION]
191191
192192
Generate template QC module and/or tasks, checks.
193193
If a module with specified name already exists, new tasks and checks are inserted to the existing one.
194194
Please follow UpperCamelCase convention for modules', tasks' and checks' names.
195195
196196
Example:
197197
# create new module and some task
198-
./modulesHelper.sh -m MyModule -t SuperTask
198+
./o2-qc-module-configurator.sh -m MyModule -t SuperTask
199199
# add one task and two checks
200-
./modulesHelper.sh -m MyModule -t EvenBetterTask -c HistoUniformityCheck -c MeanTest
200+
./o2-qc-module-configurator.sh -m MyModule -t EvenBetterTask -c HistoUniformityCheck -c MeanTest
201201
202202
Options:
203203
-h print this message
@@ -210,8 +210,8 @@ For example, if your detector 3-letter code is ABC you might want to do
210210
```
211211
# we are in ~/alice
212212
cd QualityControl/Modules
213-
./modulesHelper.sh -m Abc # create the module
214-
./modulesHelper.sh -t RawDataQcTask # add a task
213+
./o2-qc-module-configurator.sh -m Abc # create the module
214+
./o2-qc-module-configurator.sh -t RawDataQcTask # add a task
215215
```
216216

217217
## Test run
@@ -238,7 +238,7 @@ Change the lines as indicated below :
238238
Now we can run it
239239

240240
```
241-
qcRunBasic
241+
o2-qc-run-basic
242242
```
243243

244244
You should see the QcTask at qcg-test.cern.ch with an object `Example` updating.

doc/QuickStart.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ The _Producer_ is a random data generator. In a more realistic setup it would be
5858

5959
To run it simply do
6060

61-
qcRunBasic
61+
o2-qc-run-basic
6262

6363
Thanks to the Data Processing Layer (DPL, more details later) it is a single process that steers all the _devices_, i.e. processes making up the workflow. A window should appear that shows a graphical representation of the workflow. The output of any of the processes is available by double clicking a box. If a box is red it means that the process has stopped, probably abnormaly.
6464

@@ -67,7 +67,7 @@ Thanks to the Data Processing Layer (DPL, more details later) it is a single pro
6767
__Repository and GUI__
6868

6969
The data is stored in the [ccdb-test](ccdb-test.cern.ch:8080/browse) at CERN. If everything works fine you should see the objects being published in the QC web GUI (QCG) at this address : [https://qcg-test.cern.ch/?page=objectTree](https://qcg-test.cern.ch/?page=objectTree). The link brings you to the hierarchy of objects (see screenshot below). Open "QcTask" (the task you are running) and click on "example" which is the name of your histogram. The plot should be displayed on the right. If you wait a bit and hit "REFRESH NOW" in the far left menu you should see it changing from time to time (see second screenshot below).
70-
Please note that anyone running qcRunBasic publishes the same object and you might see the one published by someone else.
70+
Please note that anyone running o2-qc-run-basic publishes the same object and you might see the one published by someone else.
7171

7272
![alt text](images/basic-qcg1.png)
7373
![alt text](images/basic-qcg2.png)
@@ -110,7 +110,7 @@ readout.exe file://$READOUT_ROOT/etc/readout.cfg
110110

111111
Start the QC and DS (DataSampling) workflow :
112112
```
113-
qcRunReadout
113+
o2-qc-run-readout
114114
```
115115

116116
The data sampling is configured to sample 1% of the data as the readout should run by default at full speed.
@@ -123,7 +123,7 @@ The payload received is a 2MB (configurable) data page made of CRU pages (8kB).
123123
__Configuration file__
124124

125125
The configuration file is installed in `$QUALITYCONTROL_ROOT/etc`. Each time you rebuild the code, `$QUALITYCONTROL_ROOT/etc/readout.json` is overwritten by the file in the source directory (`~/alice/QualityControl/Framework/readout.json`).
126-
To avoid this behaviour and preserve the changes you do to the configuration, you can copy the file and specify the path to it with the parameter `--config-path` when launch `qcRunReadout`.
126+
To avoid this behaviour and preserve the changes you do to the configuration, you can copy the file and specify the path to it with the parameter `--config-path` when launch `o2-qc-run-readout`.
127127

128128
To change the fraction of the data being monitored, change the option `fraction`.
129129

0 commit comments

Comments
 (0)