[MaskCreator] is prepending a path?

Dear experts,
I’m trying to read calibration files withing the EUDAQ converter
The calibration file name is passed by means of a cfg file:

[sensor.calibration]
fileName_hybridId1_chipId0                = "../../Run000000_Gain.root"
slopeVCal2Electrons_hybridId1_chipId0     = 11.67
interceptVCal2Electrons_hybridId1_chipId0 = 64

as you can see I’m giving a relative path.
Somehow in the [MaskCreator] I get the following error message:
Error in <TFile::TFile>: file /home/testbeam/TestBeamAnalysis_Mauro/run001382/Results/../../Run000000_Gain.root does not exist
Instead if I run modules like: [ClusteringSpatial] (or [DUTAssociation, [AnalysisDUT], [AnalysisEfficiency] it works perfectly.

It seems to me that for [MaskCreator] Corry is trying to prepend a path

Cheers,

  • Mauro.

@simonspa Could you help with this?

Hi @dinardo

could you provide us a few more details?

  • EventLoaderEUDAQ or EventLoaderEUDAQ2?
  • Where does the configuration file you are showing above belong to? The syntax doesn’t match Corry patterns

Cheers,
Simon

Hi Simon.
I’m using EventLoaderEUDAQ
Indeed, the code is in the EUDAQ converter plugin
Though, as from my understanding, the very same code is called both in [MaskCreator] and in [ClusteringSpatial].
But in [MaskCreator] somehow the path is not what I specified in my config file: which is ../../Run000000_Gain.root, but rather /home/testbeam/TestBeamAnalysis_Mauro/run001382/Results/../../Run000000_Gain.root

  • Mauro.

Hm, I still can’t put together the puzzle pieces. The MaskCreator module does not read any file at all - it just queries the detector it runs on for masking information:

The module appends the pixels to be masked to the mask files provided in the geometry file for each device. If no mask file is specified there, a new file mask_<detector_name>.txt is created in the globally configured output directory.

So if at all it attempts to read a file from the geometry of your setup.

OK, I see Simon.
Thanks for looking into that.
I’ve protected my EUDAQ Converter against wrong file names.
Cheers,

  • Mauro.

If the path is read in by means of config.getPath, then it gets turned into an absolute path, based on the config file you are retrieving the config object from - for all I can tell? But unclear to me how you’re even reading that specific sensor.calibration section - is that part of a dedicated config file? Where within what code does that file get used?