Project

General

Profile

Bug #20124

TFileMetadataSBND creates a parent object in the json when no parent exists

Added by Dominic Brailsford over 1 year ago. Updated over 1 year ago.

Status:
Resolved
Priority:
High
Category:
Services
Start date:
06/08/2018
Due date:
% Done:

0%

Estimated time:
First Occurred:
Occurs In:
Duration:

Description

The TFileMetadataSBND_service produces a json file for the auxiliary root file produced at each LArSoft stage.
The service produces a parent object in the json file in all cases, setting the file_name to "" when no parent exists i.e. for generation stage:
"parents": [ {
"file_name": ""
}
],
SAM believes this to be an error (missing parent name) rather than assuming that that there is no parent, making the json invalid.

We can hack a metadata_extractor script to remove empty parent lines, though it is going to be a pain to do.
The most correct thing to do is to add in a check to the service to only create the parent object block if a parent exists.

Associated revisions

Revision 478edf8e (diff)
Added by Dominic Brailsford over 1 year ago

Only fill parent std::set<std::string> if the parent string contains any characters.
Only create the parent object if the parent std::set<std::string> contains any strings.
Fixes redmine issue #20124.

History

#1 Updated by Dominic Brailsford over 1 year ago

  • Status changed from New to Resolved

Fixed in develop.



Also available in: Atom PDF