Project

General

Profile

Log into the production database (not the development one)

ssh -XY uboonegpvm01-05.fnal.gov
psql -h ifdbprod2 -p 5444 -d hootgibson_prod -U uboonedaq_web -W

Yep, you need the password. Jason, Andrzej, and Jen know it or can find it.

Syntax

Every line ends with a semicolon. Carriage returns are for humans only.

Default map query: Crate, Slot, FEM_channel, LArSoft_Channel

To get the version number, run the SELECT query below, then hit 'q' to skip the many many rows:

SELECT get_map_double_sec();
NOTICE:  Using data_taking_timestamp 2017-02-21 16:18:33.384785 AND swizzling_timestamp 2017-02-21 16:18:33.384785
NOTICE:  Version will be 4D
 get_map_double_sec 
--------------------
 (1,8,0,2016)
 (1,8,1,2017)
 (1,8,2,2018)
 (1,8,3,2019)
 (1,8,4,2020)
 (1,8,5,2021)

Generic query instead

Use the version number from the query above, which was 4D , here is an example :

SELECT wireplane, larsoft_wirenum, feedthru, service_feedthru_connector, mboard_id, ASIC_id
FROM AllEverythingAllVersions
WHERE version_set LIKE '4D' 
AND (
(wireplane LIKE 'U' AND larsoft_wirenum >= 1248 AND larsoft_wirenum <= 1258)
OR 
(wireplane LIKE 'U' AND larsoft_wirenum >= 1304 AND larsoft_wirenum <= 1322)
OR
(wireplane LIKE 'V' AND larsoft_wirenum >= 1920 AND larsoft_wirenum <= 1930)
OR 
(wireplane LIKE 'V' AND larsoft_wirenum >= 1978 AND larsoft_wirenum <= 1993)
OR
(wireplane LIKE 'Y' AND larsoft_wirenum >= 2368 AND larsoft_wirenum <= 2383)
OR 
(wireplane LIKE 'Y' AND larsoft_wirenum >= 2433 AND larsoft_wirenum <= 2447)
) 
ORDER BY feedthru, service_feedthru_connector, mboard_id, ASIC_id;

Important points:

  • SELECT : Specify what columns, or use * for all 69 columns.
  • WHERE Making sure to leave the requirement
    version_set LIKE '4D' 
    AND
    add the logical description of what you are looking for.
  • ORDER BY is the ordered list of how you want the rows ordered. Makes output much more comprehensible to humans!

Column headings useful for detector investigations

version_set 
rack 
rack_posn
crate_id
daq_slot 
physical_slot
slot
fecard_id
fecard_sn
fem_channel
adcreceiver_id 
adcreceiver_sn
adcreceiver_topbot
feedthru 
warmcable_id
intermediateamplifier_id
intermediateamplifier_sn
signal_feedthru_connector
service_feedthru_connector
servicecable_id
servicecard_id
servicecard_sn
faraday_cage_connector
coldcable_id
mboard_asicposn 
mboard_channel_id
mboard_id
mboardinputconnector
mboardinputconnector_pin
mboardoutputconnector_pinpair
motherboard_sn
orientation
side
asic_chan 
asic_id
asic_sn
larsoft_channel 
larsoft_wirenum
wirenum
channel_id
wireplane