From 4803016893350e9c11216b18a8a70537009b7589 Mon Sep 17 00:00:00 2001 From: francescobrivio Date: Fri, 15 Jul 2022 17:09:17 +0200 Subject: [PATCH 1/2] fix conddb dump functionality for tags and gts --- CondCore/Utilities/scripts/conddb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CondCore/Utilities/scripts/conddb b/CondCore/Utilities/scripts/conddb index 862209888895a..a72ff3db7cfb8 100755 --- a/CondCore/Utilities/scripts/conddb +++ b/CondCore/Utilities/scripts/conddb @@ -2555,16 +2555,16 @@ def dump(args): filter(IOV.tag_name == name).\ distinct(): if args.format == 'xml': - xmlProcessor.payload2xml(session, payload) + xmlProcessor.payload2xml(session, payload, args.destfile) else: _dump_payload(session, payload, args.loadonly) - elif args.type == 'gt' and _exists(session, conddb.GlobalTag.name, name) != None: + elif args.type == 'gt' and _exists(session, GlobalTag.name, name) != None: for payload, in session.query(IOV.payload_hash).\ filter(GlobalTagMap.global_tag_name == name, IOV.tag_name == GlobalTagMap.tag_name).\ distinct(): if args.format == 'xml': - xmlProcessor.payload2xml(session, payload) + xmlProcessor.payload2xml(session, payload, args.destfile) else: _dump_payload(session, payload, args.loadonly) From 948d5993464c2c5064a9bccc8b89325f0df9860f Mon Sep 17 00:00:00 2001 From: francescobrivio Date: Mon, 18 Jul 2022 12:27:54 +0200 Subject: [PATCH 2/2] update conddb dump unitTest --- CondCore/Utilities/test/test_conddb.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/CondCore/Utilities/test/test_conddb.sh b/CondCore/Utilities/test/test_conddb.sh index 3858ce8f79bb3..aedac38dc0ce5 100755 --- a/CondCore/Utilities/test/test_conddb.sh +++ b/CondCore/Utilities/test/test_conddb.sh @@ -43,7 +43,12 @@ conddb diffGlobalTagsAtRun -R 120X_mcRun3_2021_realistic_v1 -T 120X_mcRun3_2021_ echo -ne '\n\n' echo "===========> testing conddb dump" -conddb dump 4b97f78682aac6254bbcba54cedbde468202bf5b || die 'failed comparing metadata with reference' $? +conddb dump 4b97f78682aac6254bbcba54cedbde468202bf5b || die 'failed conddb dump payload' $? +conddb dump 4b97f78682aac6254bbcba54cedbde468202bf5b --destfile payload_dump.xml || die 'failed conddb dump payload to file' $? +conddb dump SiPixelQuality_phase1_2021_v1 || die 'failed conddb dump tag' $? +conddb dump SiPixelQuality_phase1_2021_v1 --destfile tag_dump.xml || die 'failed conddb dump tag to file' $? +conddb dump Test_CMSSW_IB_unitTest_v1 || die 'failed conddb dump gt' $? +conddb dump Test_CMSSW_IB_unitTest_v1 --destfile gt_dump.xml || die 'failed conddb dump gt to file' $? echo -ne '\n\n' #conddb showFCSR || die 'failed conddb showFCSR' $? # the FCSR is not always a real run...