star-bnl / star-sw

Core software for STAR experiment
26 stars 63 forks source link

StEvent/StEnumerations errors in ROOT6 #658

Closed genevb closed 2 months ago

genevb commented 2 months ago

There is some initialization performed in StEnumerations::detectorId() where it appears a gROOT->ProcessLineFast() is used to evaluate an expression that is an enumeration handle, like "kTpcId", to get its numerical equivalent:

https://github.com/star-bnl/star-sw/blob/2ffb8a419a411760a3d8187339c9685c93e2c750/StRoot/StEvent/StEnumerations.cxx#L60

This does not work in ROOT6, resulting in errors like:

input_line_720:2:2: error: use of undeclared identifier 'kTpcId'
 kTpcId
 ^

...so the numerical equivalent does not get properly determined this way, and the direct consequence is that the local ids[] array is all zeros. I am not sure what any downstream consequences of this there are.

How to reproduce:

starver SL23x config/v0.3.0-rhel7-root6.24.06
root4star -b -q -l 'bfc.C(10,"P2021a,StiCA,EbyET0,BEmcChkStat,-hitfilt,QAalltrigs","/star/rcf/test/daq/2021/134/st_physics_22134030_raw_4500015.daq")'
genevb commented 2 months ago

As a quick test, I tried changing from ProcessLineFast() to ProcessLine(), but this only caused a more detailed error message, but no change in the evaluated result:

input_line_722:2:3: error: use of undeclared identifier 'kTpcId'
 (kTpcId)
  ^
StiMaker:ERROR - HandleInterpreterException : Error evaluating expression (kTpcId).
Execution of your code was aborted.

(StiMaker is noted because that is the maker in which StEnumerations is first initialized.)

plexoos commented 2 months ago

Possibly a duplicate of https://github.com/star-bnl/star-sw/issues/454

genevb commented 2 months ago

Possibly a duplicate of #454

Definitely a duplicate....thanks for spotting this, @plexoos. I should have looked more carefully.