art-framework-suite / art

The implementation of the art physics event processing framework
Other
2 stars 7 forks source link

art_root_io/RootDB actually belongs to canvas_root_io #106

Open knoepfel opened 2 years ago

knoepfel commented 2 years ago

This issue has been migrated from https://cdcvs.fnal.gov/redmine/issues/25551 (FNAL account required) Originally created by @PetrilloAtWork on 2021-02-23 22:23:24


That is my bold statement, and if you end up agreeing I would request that that code be moved into canvas_root_io.

The gain is an easier access to the FHiCL configuration stored in art/ROOT files from gallery.

knoepfel commented 2 years ago

Comment by @knoepfel on 2021-02-24 03:12:04


You may be right, Gianluca. Let me talk with some folks on this end. Could you give some examples, though, in how you would use it with gallery?

knoepfel commented 2 years ago

Comment by @PetrilloAtWork on 2021-02-24 15:31:08


It might be something similar to how config_dumper does:

art::SQLite3Wrapper sqliteDB(&file, "RootFileDB");
fhicl::ParameterSetRegistry::importFrom(sqliteDB);
fhicl::ParameterSetRegistry::stageIn();
auto const& collection = fhicl::ParameterSetRegistry::get();
for (auto const& pr : collection) { /* ... */ }

Right now, in ICARUS data there is some DAQ configuration in there that can be found. Or something like what happend in "DetectorClocksServiceStandard":https://github.com/LArSoft/lardata/blob/1d1ff479bd64ab6db99082570173de10ccb30fe0/lardata/DetectorInfoServices/DetectorClocksServiceStandard_service.cc#L103-L112. If there were some public tool to make this process even easier, it would be welcome (e.g. a sequence like the one in config_dumper, but not using a global instance but rather a local registry, not to mess with the rest of the configuration).