Skip to content

Instantly share code, notes, and snippets.

@nsahoo
Created January 30, 2018 09:05
Show Gist options
  • Save nsahoo/3e91aaad3ccf9f7ec537241bd1c0ae2c to your computer and use it in GitHub Desktop.
Save nsahoo/3e91aaad3ccf9f7ec537241bd1c0ae2c to your computer and use it in GitHub Desktop.
dump L1 menu from a mc sample
$ conddb list 90X_upgrade2017_realistic_v6_C1 | grep L1TUtmTriggerMenuRcd
[2017-03-01 12:08:04,589] INFO: Connecting to pro [frontier://PromptProd/CMS_CONDITIONS]
L1TUtmTriggerMenuRcd - L1Menu_Collisions2016_v9_m2_xml
$ conddb list L1Menu_Collisions2016_v9_m2_xml
[2017-03-01 12:09:52,157] INFO: Connecting to pro [frontier://PromptProd/CMS_CONDITIONS]
[2017-03-01 12:09:52,634] INFO: Listing with a limit of 500 IOVs, starting from the highest since. If you need to see more, please increase the limit of returned results.
Since: Run Insertion Time Payload Object Type
----------- ------------------- ---------------------------------------- -----------------
1 2016-10-06 19:36:53 7d91b8ddc45380e6930ef03e211de3bc608f7a6b L1TUtmTriggerMenu
$ conddb dump 7d91b8ddc45380e6930ef03e211de3bc608f7a6b | xml_grep --text_only 'cmsCondPayload/name-'
[2017-03-01 12:26:34,255] INFO: Connecting to pro [frontier://PromptProd/CMS_CONDITIONS]
buillding done in 11.8869929314 sec., return code from build: 0
L1Menu_Collisions2016_v9
no element found at line 162346, column 0, byte 4879621 at /usr/lib64/perl5/vendor_perl/XML/Parser.pm line 187.
at /usr/bin/xml_grep line 175.
(ignore the error at the end, it's a problem with the conddb command and I just asked AlCa to fix it)
In fact, for an MC tag you can skip the second command, and get the same result use directly something like
$ conddb dump L1Menu_Collisions2016_v9_m2_xml | xml_grep --text_only 'cmsCondPayload/name-'
[2017-03-01 12:28:07,898] INFO: Connecting to pro [frontier://PromptProd/CMS_CONDITIONS]
buillding done in 11.4854879379 sec., return code from build: 0
L1Menu_Collisions2016_v9
no element found at line 162346, column 0, byte 4879621 at /usr/lib64/perl5/vendor_perl/XML/Parser.pm line 187.
at /usr/bin/xml_grep line 175.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment