QCG is a web graphical user interface for O2 Quality Control.
- Install QualityControl using
aliBuild
and configure database with following instructions. - Install QCG
aliBuild build qcg --default o2-dataflow
- Load QCG modules
alienv enter qcg/latest-o2-dataflow
- Run
TObject2Json
(it converts Objects into JSRoot readable format)
tobject2json --backend mysql://qc_user:qc_user@localhost/quality_control --zeromq-server tcp://127.0.0.1:7777
-
(Run
Information Service
if you need Online mode. For more details use QualityControl instructions). -
Run QCG server
qcg
- Open a browser and navigate to http://localhost:8080. Ensure that your browser is supported.
These steps are necessary only when you don't run QCG on localhost
.
In order to customise the QCG you can edit the following configuration file: $QCG_ROOT/config.js
Edit http
section to define custom:
port
numberhostname
of your server.
Edit mysql
section to define custom:
- MySQL database
host
name user
namepassword
database
name
Edit informationService
section to define custom:
host
nameport
of Information Service publish and reponse socket.
In order to customise hostname and port of TObject2Json
follow these two steps:
- Edit
tobject2json
section of configuration file to define custom:
host
nameport
number
- Run
TObject2Json
with updated parameters
tobject2json --backend mysql://<loign>:<password>@<hostname>:<port>/<database> --zeromq-server tcp://<host>:<port>
WHERE:
backend
is a Quality Control database URLzeromq-server
which provides communication betweenTObject2Json
and the GUI; it must match withhost
andport
that you set up in1.
.
- Register your application in the CERN OAuth service
- Provide any
client_id
, egqc_gui
- Set
redirect_uri
tohttps://<YOUR_HOSTNAME>/callback
- Fill these values and generated secret into
oAuth
section ofconfig.js
file.
Note: Enabling or disabling OAuth may impacts layout ownership model. When OAuth is disabled all users share the same id
(0
), otherwise id
equals to CERN Person ID. The layout ownership id
can be changed directly in the database - layout.owner_id
.
- Follow these steps to request a new CERN Grid Host Certificate
- Set up file paths to the generated key and certificate in the
http
section ofconfig.js
file. - Provide your hostname in the
hostname
filed ofhttp
section ofconfig.js
file.
QCG exposes two public REST API which can be read by any other application.
- Get all objects metadata
Request:curl 'http://localhost:8080/api/listObjects' -X GET
Result:[{"name": "AGENT/OBJECT"}]
- Get ROOT object data in JSON format to be used with JSROOT
Request:curl 'http://localhost:8080/api/readObjectData?objectName=AGENT/OBJECT' -X GET
Result:{"_typename":"TCanvas", ...}