Skip to content

Spaces in ProcessType List #20

@coreyjadams

Description

@coreyjadams

When writing a configuration file in larcv, spaces aren't allow in the configuration list. If you do accidentally have spaces, you get output that looks like this:

[NORMAL]  <ProcessDriver::configure> Instantiating Process ID=0 Type: ProdEventMeta2D w/ Name: ProdEventMeta2D
[NORMAL]  <ProcessDriver::configure> Instantiating Process ID=1 Type:  "Cluster2DThreshold w/ Name:  "Cluster2DThreshold
 [ERROR]  <ProcessFactory::create::L71> Found no registered class  "Cluster2DThreshold

To be clear, the difference in the configuration file is between this correct version:
ProcessType: ["ProdEventMeta2D","Cluster2DThreshold"] ProcessName: ["ProdEventMeta2D","Cluster2DThreshold"]

and this incorrect version:
ProcessType: ["ProdEventMeta2D", "Cluster2DThreshold"] ProcessName: ["ProdEventMeta2D", "Cluster2DThreshold"]

I don't want to cause a lot of work, but I spent a long time looking to find out today why my new class, Cluster2DThreshold, wasn't getting registered, and only figured out the problem when I noticed the " in the ERROR message.

We should do one of the following:

  • Implement better parsing to not complain about spaces
  • Implement better error messages to tell the user to fix their configuration file and stop search their C++ code forever.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions