star-bnl / star-sw

Core software for STAR experiment
26 stars 63 forks source link

BFC tests fail in StiDefaultToolkit when using ROOT 6.24 #628

Closed plexoos closed 3 months ago

plexoos commented 6 months ago

https://github.com/star-bnl/star-sw/actions/runs/6800427946?pr=619

A number of test jobs (ROOT6.24) failed with the following message:

StiMaker:INFO  - TAttr::Found : usetracker = 1

StiKalmanTrackFinder::StiKalmanTrackFinder() - Started
StiKalmanTrackFinder::StiKalmanTrackFinder() - Done
StiMaker:INFO  - TAttr::Found : seedfinders = CA DEF

fatal error: cannot open file 'input_line_583': No such file or directory
root4star: .sl79_gcc485/OBJ/StRoot/Sti/StiDefaultToolkit.cxx:645: virtual StiTrackFinder* StiDefaultToolkit::getTrackSeedFinderCA(): Assertion `mySeed' failed.
Error: Process completed with exit code 1.

The offending code appears to be in StRoot/Sti/StiDefaultToolkit.cxx where a new seed finder is create via the ROOT interpreter.

640 StiTrackFinder   * StiDefaultToolkit::getTrackSeedFinderCA()                                                             
641 {                                                                                                                        
642   gSystem->Load("TPCCATracker");                                                                                         
643   gSystem->Load("StiCA");                                                                                                
644   auto *mySeed = (StiTrackFinder*)gROOT->ProcessLineFast("StiCALoader::New()");                                          
645   assert(mySeed);                                                                                                        
646   return mySeed;                                                                                                         
647 } 

It is not very clear to me why that statement was chosen to be "interpreted" by ROOT rather than simply compiled. It may help to rewrite the getters in this class. Any objections?

plexoos commented 6 months ago

A couple more findings related to this issue:

plexoos commented 6 months ago

Well, there is a solution for this particular issue with StiCA. It's not pretty but straightforward and the tests don't choke on the line invoking the ROOT interpreter. In short, we can move the code from StiCA into the Sti library in order to avoid the circular dependency, and instantiate a new CA seed finder directly in StiDefaultToolkit. AFAICT, it works but there might be a better approach. The fact that the original code works with 6.16 still bothers me, but the changes between 6.16 and 6.24 can be too significant to investigate further.

On the other hand, the original code loads a couple of libraries at runtime which I am not sure is in agreement with the usual STAR practices.

plexoos commented 6 months ago

@fgeurts @genevb @klendathu2k @veprbl for viz.