Detector | DB instance | Construct | Tracking | QC |
---|---|---|---|---|
OT | INT2R | cms-tracker-assemblyOperators | cms-tracker-trackingOperators | cms-tracker-qcOperators |
OT | CMSR | cms-tracker-assemblyOperators | cms-tracker-trackingOperators | cms-tracker-qcOperators |
HGCAL | INT2R | cms-hgcal-assemblyOperators | cms-hgcal-trackingOperators | cms-hgcal-qcOperators |
HGCAL | CMSR | cms-hgcal-assemblyOperators | cms-hgcal-trackingOperators | cms-hgcal-qcOperators |
MTD | INT2R | * | * | * |
GEM | INT2R | * | * | * |
GEM | OMDS | * | * | * |
PPS | INT2R | * | * | * |
ECAL | INT2R | * | * | * |
Detector | DB instance | URL | Description |
---|---|---|---|
OT | INT2R | https://cmsdca.cern.ch/trk_loader/trker/int2r/doc/doc https://cmsdca.cern.ch/trk_loader/trker/int2r/doc/xsd |
Development DB |
OT | CMSR | https://cmsdca.cern.ch/trk_loader/trker/cmsr/doc/doc https://cmsdca.cern.ch/trk_loader/trker/cmsr/doc/xsd |
Production DB |
HGCAL | INT2R | https://cmsdca.cern.ch/hgc_loader/hgc/int2r/doc/doc https://cmsdca.cern.ch/hgc_loader/hgc/int2r/doc/xsd |
Development DB |
HGCAL | CMSR | https://cmsdca.cern.ch/hgc_loader/hgc/cmsr/doc/doc https://cmsdca.cern.ch/hgc_loader/hgc/cmsr/doc/xsd |
Production DB |
MTD | INT2R | https://cmsdca.cern.ch/mtd_loader/mtd/int2r/doc/doc https://cmsdca.cern.ch/mtd_loader/mtd/int2r/doc/xsd |
Development DB |
GEM | INT2R | https://cmsdca.cern.ch/gem_loader/gem/int2r/doc/doc https://cmsdca.cern.ch/gem_loader/gem/int2r/doc/xsd |
Development DB |
GEM | OMDS | https://cmsdca.cern.ch/gem_loader/gem/omds/doc/doc https://cmsdca.cern.ch/gem_loader/gem/omds/doc/xsd |
Production DB |
PPS | INT2R | https://cmsdca.cern.ch/pps_loader/pps/int2r/doc/doc https://cmsdca.cern.ch/pps_loader/pps/int2r/doc/xsd |
Development DB |
ECAL | INT2R | https://cmsdca.cern.ch/ecal_loader/ecal/int2r/doc/doc https://cmsdca.cern.ch/ecal_loader/ecal/int2r/doc/xsd |
Development DB |
GPN: /afs/cern.ch/user/v/valdo/public/rhapi.py Web: wget https://raw.githubusercontent.com/valdasraps/resthub/master/clients/python/src/main/python/rhapi.pyUsage scenarios:
cp /afs/cern.ch/user/v/valdo/public/rhapi.py . python3 rhapi.py --help # List folders (format: detector_database) python3 rhapi.py --url=http://dbloader-tracker:8113 # List folder tables python3 rhapi.py --url=http://dbloader-tracker:8113 trker_int2r # List table metadata python3 rhapi.py --url=http://dbloader-tracker:8113 trker_int2r.kinds_of_part # Execute query (default format: csv) python3 rhapi.py --url=http://dbloader-tracker:8113 "select * from trker_int2r.kinds_of_part p" # Count query result size python3 rhapi.py --url=http://dbloader-tracker:8113 "select * from trker_int2r.kinds_of_part p" -c # Data in JSON format python3 rhapi.py --url=http://dbloader-tracker:8113 "select * from trker_int2r.kinds_of_part p" -f json # Data in XML format python3 rhapi.py --url=http://dbloader-tracker:8113 "select * from trker_int2r.kinds_of_part p" -f xml # Paged output python3 rhapi.py --url=http://dbloader-tracker:8113 "select * from trker_int2r.parts p" -s 20 -g 1 python3 rhapi.py --url=http://dbloader-tracker:8113 "select * from trker_int2r.parts p" -s 20 -g 2 python3 rhapi.py --url=http://dbloader-tracker:8113 "select * from trker_int2r.parts p" -s 20 -g 3 # Count number of parts by type python3 /afs/cern.ch/user/v/valdo/public/rhapi.py --krb --url=https://cmsdca.cern.ch/hgc_rhapi "select p.KIND_OF_PART, count(p.ID) as count from hgc_int2r.parts p group by p.KIND_OF_PART" # Join tables in a single query python3 rhapi.py --url=http://dbloader-tracker:8113 "select d.* from trker_int2r.parts p, trker_int2r.datasets d where p.id = d.part_id order by d.insertion_time desc" -s 20 # Use query parameter python3 rhapi.py --url=http://dbloader-tracker:8113 "select d.* from trker_int2r.parts p, trker_int2r.datasets d, trker_int2r.runs r where p.id = d.part_id and r.id = d.run_id and r.run_number = :run order by d.insertion_time desc" -s 20 -prun=1 # Grouping python3 rhapi.py --url=http://dbloader-tracker:8113 "select p.serial_number as part, d.kind_of_condition as condition, count(d.id) as count from trker_int2r.parts p, trker_int2r.datasets d where p.id = d.part_id group by p.serial_number, d.kind_of_condition" -s 20
Type | Name | Description |
---|---|---|
Construction | kind_of_parts | Kinds of part from CONSTRUCT database |
Construction | parts | Parts from CONSTRUCT database |
Construction | p{part_id} | List of Parts for specific ID (Kind of Part). Lookup ID from kind_of_parts table. Specific kind of part extension and attribute columns are added. |
Condition | conditions | Kinds of conditions from CONDITIONS database |
Condition | runs | Runs from CONDITIONS database |
Condition | c{condition_id} | List of Condition data for specific ID (Kind of Condition). Lookup ID from conditions table. |
* | * | Any table data exposed via specific view |
python3 rhapi.py --url=http://dbloader-tracker:8113 "select * from trker_int2r.conditions c where c.DATABASE_TABLE = 'TEST_SENSOR_IV'"1.2. The output of "CONDITION_TABLE" will be our condition table name. In our case, it is "c1020". 2. Another name is using WEB just go to the condition table. In our example, it is with OT https://cmsdca.cern.ch/trk_rhapi/table/trker_int2r/conditions/data (For different subsystem, it will be a different link) The same is with parts. Just in order to the parts table name. The only difference is that we have to check the kinds_of_part table (see below).
GPN: /afs/cern.ch/user/v/valdo/public/cmsdbldr_client.py Web: wget https://raw.githubusercontent.com/valdasraps/cmsdbldr/master/src/main/python/cmsdbldr_client.pyUsage scenarios:
# Simple secure copy upload without client # host and path parts must match your detector scp testas.xml dbloader-tracker:/home/dbspool/spool/trk/int2r # With client from lxplus or other AFS based machine python3 cmsdbldr_client.py --krb --url=https://dbloader-tracker/trker/int2r PHS_testas.xml # From outside (see section below) with lightweight account login python3 cmsdbldr_client.py --login --url=https://cmsdca.cern.ch/trk_loader/trker/int2r PHS_testas.zip
GPN: /afs/cern.ch/user/v/valdo/public/venv.tar.gz Web: https://github.com/valdasraps/resthub/blob/master/clients/python/src/deploy/venv.tar.gz?raw=trueInstallation and usage:
tar xfz venv.tar.gz source venv/bin/activate python3 rhapi.py --url=https://cmsdca.cern.ch/trk_rhapi --login deactivateNote: this is a minimal runtime environment and does not contain various advanced features like ROOT support, etc.
auth-get-sso-cookie -hIf this utility is available you can proceed in executing application, i.e. from lxplus
python3 cmsdbldr_client.py --krb --url=https://cmsdca.cern.ch/trk_loader/trker/int2r LoadTrackerUmJoSensorWafers.xml python3 rhapi.py --krb --url=https://cmsdca.cern.ch/trk_rhapi
sudo pip3 install requests ilockExecute upload job. During the first execution the script the will ask username and password. Both will be cached (stored) in a file .session.cache for other consequent uses. Cookies once expired will be refreshed automatically:
python3 cmsdbldr_client.py --login --url=https://cmsdca.cern.ch/trk_loader/trker/int2r LoadTrackerUmJoSensorWafers.xml python3 rhapi.py --login --url=https://cmsdca.cern.ch/trk_rhapi
I | Attachment | History | Action | Size | Date | Who | Comment |
---|---|---|---|---|---|---|---|
png | Screenshot_from_2020-09-29_11-13-19.png | r1 | manage | 57.8 K | 2020-09-29 - 10:14 | AivarasSilale | Resthub conditions |
png | rh_model_(2).png | r1 | manage | 55.7 K | 2020-09-29 - 13:10 | AivarasSilale | RH model |