Project

General

Profile

Support #24781

a bug in FCL parser ?

Added by Pavel Murat about 1 month ago. Updated about 1 month ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Target version:
-
Start date:
08/13/2020
Due date:
% Done:

100%

Estimated time:
Scope:
Internal
Experiment:
-
SSI Package:
Duration:

Description

I'm observing that parsing the x.fcl below results in table named 'physics' being

a) empty
b) different from tables named 'aa' and 'physics1' ?

Replacing the 'y : [] ' line with 'y : 1' line or 'y : {}' changes the parser behavior
and makes all three tables the same.

The behavior is the same for art (mu2e) v3_05_01 and v3_06_02

-- am I misusing FCL ? -- thanks, Pasha

--------------------------------- x.fcl 
# -*- mode: tcl -*-

x       : { 
    a : { 
    y : [ ]
    } 
}

aa       : { @table::x.a }
physics  : { @table::x.a }
physics1 : { @table::x.a }
--------------------------------

and here is the expanded version, produced by 'mu2e -c x.fcl --debug-config x_expanded.fcl' :

--------------------------------------------- x_expanded.fcl
aa: {
   y: []
}
physics: {}
physics1: {
   y: []
}
process_name: "DUMMY" 
services: {
   CatalogInterface: {
      service_provider: "TrivialFileDelivery" 
      service_type: "CatalogInterface" 
   }
   FileTransfer: {
      service_provider: "TrivialFileTransfer" 
      service_type: "FileTransfer" 
   }
   message: {
      destinations: {
         STDOUT: {
            categories: {
               ArtReport: {
                  limit: 100
               }
               MTdiagnostics: {
                  limit: 0
               }
               default: {
                  limit: -1
               }
            }
            threshold: "INFO" 
            type: "cout" 
         }
      }
   }
   scheduler: {
      debug: {
         fileName: "drop_debug.fcl" 
         option: "debug-config" 
         printMode: "raw" 
      }
      errorOnMissingConsumes: false
      errorOnSIGINT: true
      num_schedules: 1
      num_threads: 1
      pruneConfig: true
      reportUnused: false
   }
}
source: {
   maxEvents: 1
   module_label: "source" 
   module_type: "EmptyEvent" 
}
x: {
   a: {
      y: []
   }
}

History

#1 Updated by Kyle Knoepfel about 1 month ago

  • % Done changed from 0 to 100
  • Assignee set to Kyle Knoepfel
  • Status changed from New to Resolved
  • Tracker changed from Bug to Support

Pasha, this is not an issue with the FHiCL parser. Rather it has to do with configuration-pruning for an art job. For art, any sequence inside the physics table is interpreted to be a path. If the path is empty, then art's configuration system will remove that path from the configuration.

If you type 'mu2e -c x.fcl --debug-config cout --prune-config false', you will see the y sequence inside of the physics table.

In general, we recommend using fhicl-dump -c x.fcl to disentangle FHiCL processing from art-specific configuration handling.

#2 Updated by Kyle Knoepfel about 1 month ago

  • Status changed from Resolved to Closed


Also available in: Atom PDF