Using web technologies (HTML/CSS/JS)
Clearly separated from UI
Using external APIs as much as possible
Those APIs might be used outside mchview as well
Not strictly required to be an API
But using it as a playground for API dev
One advantage (for mchview) is that it loads only what is needed for a view
Entry point gives you a help.
?dualsampas
URLs gives you the shape of dual sampas
In JSON format.
{
"DualSampas": [
{
"ID": 1025,
"Vertices": [
{
"X": 20,
"Y": 0
},
{
"X": 20,
"Y": -20
},
{
"X": 39.999999992,
"Y": -20
},
{
"X": 39.999999992,
"Y": 0
},
{
"X": 20,
"Y": 0
}
],
"Value": 0
},
{
"ID": 1026,
"Vertices": [
{
"X": 0,
"Y": 0
},
{
"X": 0,
"Y": -20
},
{
"X": 19.999999992,
"Y": -20
},
{
"X": 19.999999992,
"Y": 0
},
{
"X": 0,
"Y": 0
}
],
"Value": 0
}
]
}
That one is the official O2 CCDB one (WP10).
See e.g. this talk by Costin
A lightweight front-end to the CCDB to convert Root (muon) calibration objects to JSON format
The API that might be used by mchview to get calib data
(very alpha software. see serve-ocdb branch of alice-go repo)
> git clone https://github.com/mrrtf/mchview.git
> echo "MCHVIEW_PORT=4444\nMCH_MAPPING_API=http://mchmapping.aphecetche.me:3333\n
MCH_MAPPING_API_PORT=3333\n" > .env
> docker compose up -d mchview
> npm install && npm start
Open browser at http://localhost:4444
https://github.com/mrrtf/mchview