R3BRoot icon indicating copy to clipboard operation
R3BRoot copied to clipboard

[Proposal] Metadata file for experiments?

Open YanzhaoW opened this issue 5 months ago • 24 comments

Hi,

I would like to ask some opinions whether it's a good idea to have a metadata (JSON) file for experiments (in root folder or in config folder). It could be like:

[
  {
    "exp": "s509",
    "detectors": 
    {
      "neuland": 
      {
        "onspill_tpat": 1,
        "offspill_tpat": 14,
        "NumOfPlanes": 26,
      }
    }
  },
  {
    "exp": "s522",
    "detectors": 
    {
      "neuland": 
      {
        "onspill_tpat": 1,
        "offspill_tpat": 11,
        "NumOfPlanes": 26,
      }
    }
  },
  {
    "exp": "s118",
    "detectors": 
    {
      "neuland": 
      {
        "onspill_tpat": 1,
        "offspill_tpat": 14,
        "NumOfPlanes": 26,
      }
    }
  },
]

The JSON file can then be read by CMake. When configure the cmake, experiment ID can be set with:

cmake .. -DR3BEXP="s118"

and the corresponding C++ global constants can be set accordingly during the compile time. We could also set the default value of R3BEXP to be the latest experiment if not specified.

These are my initial thought. Any suggestions and comments are welcomed.

YanzhaoW avatar Jan 12 '24 18:01 YanzhaoW