Legacy code: Lessons from NA61/SHINE offline software upgrade adventure

Oskar Wyszynski, Andras Laszlo, Antoni Marcinek, Tom Paul, Roland Sipos, Marek Szuba, Michael Unger, Darko Veberic

Research output: Conference article

3 Citations (Scopus)


Shine is the new offline software framework of the NA61/SHINE experiment[1] at the CERN SPS for data reconstruction, analysis and visualization as well as detector simulation. To allow for a smooth migration to the new framework, as well as to facilitate its validation, our transition strategy foresees to incorporate considerable parts of the old NA61/SHINE reconstruction chain which is based on the legacy code of the NA49 experiment[2]. Such a reuse of parts of old code, written mostly in C and Fortran, is an often arising problem in HEP experiments. Apart from the need to properly interface the old and new code, the migration task is complicated in our case due to the use of nonstandard commercial compilers in the NA49 code. In this presentation we will describe the challenges faced during the porting of legacy code and discuss solutions that can help developers embarking on a similar adventure. In particular, we will describe the transition from scattered Makefiles to a monolithic CMake built system, the design of C++ interfaces to the legacy code and the semi-automatic conversion of non-standard PGI-Fortran constructs to code that compiles with GFortran. In addition, the validation of the physics output of the new framework will be discussed..

Original languageEnglish
Article number052076
JournalJournal of Physics: Conference Series
Issue numberPART 5
Publication statusPublished - jan. 1 2012
EventInternational Conference on Computing in High Energy and Nuclear Physics 2012, CHEP 2012 - New York, NY, United States
Duration: máj. 21 2012máj. 25 2012

ASJC Scopus subject areas

  • Physics and Astronomy(all)

Fingerprint Dive into the research topics of 'Legacy code: Lessons from NA61/SHINE offline software upgrade adventure'. Together they form a unique fingerprint.

  • Cite this

    Wyszynski, O., Laszlo, A., Marcinek, A., Paul, T., Sipos, R., Szuba, M., Unger, M., & Veberic, D. (2012). Legacy code: Lessons from NA61/SHINE offline software upgrade adventure. Journal of Physics: Conference Series, 396(PART 5), [052076]. https://doi.org/10.1088/1742-6596/396/5/052076