Library for reentant code
It would be desirable to have p348reco
, at least partially, as a library. A number of issues can be addressed at the same time:
- Build time for numerous executables in
p348reco/
dir had become a nuisance because of the number of#included
headers -- from STL, ROOT, GenFit, etc. Even small change in the reco code require ~2min of compiling a single.exe
. Library would sufficently decrease this time - Linkage with external projects. Putting implementation in header file results in a conflict if the header file is included into more than one linkage unit. That strictly constrains user code to a single-file unstructured projects.
- Better structuring of the entire project. Currently,
conddb.h
is of ~4k lines of code,p348reco.h
is of ~2k and despite of intended design it is sometimes hard to predict responsibility of particular code.
Since our Makefile
now looks rather like a package manager, with GenFit and TrackingTools patching and installation routines, it seems to become feasible in general to benefit from technology of shared libraries.
I would propose to discuss some pieces that can be packed up into library, from the point of view:
- maturity
- reentrant usage
- expensive build time.
First candidates for that:
- Shower profile reconstruction
- APV detector clustering
- Calibrations (including SDC)
I can implement this shortly, but would like to collect opinions first, since the whole collaboration could benefit from such refactoring.