Developing With LArSoft » History » Version 38

« Previous - Version 38/102 (diff) - Next » - Current version
Katherine Lato, 03/10/2016 11:59 AM

Developing With LArSoft

1 Quick links for Developing with LArSoft

2 Designing

To design LArSoft code, it's important to understand the core LArSoft suite and all the things used by the suite. These are things to reference when designing new software.

2.1 LArSoft architecture and design principles

Design principles

2.2 LArSoft repositories

2.3 The art framework and the LArSoft suite

2.4 External packages

These are package written and maintained by the general physics and computing communities.

Package Namespace Short description Location of headers
C++ std:: Extensions to base C++ that are part of the standard language
ROOT See below Data-analysis tools $ROOT_INC
CLHEP CLHEP:: Class Library for High-Energy Physics $CLHEP_INC/CLHEP
Geant4 See below Detector simulations $G4INCLUDE
GENIE genie:: Neutrino Monte-Carlo Generator $GENIE_INC/GENIE
boost boost:: General programming tools for C++ $BOOST_INC/boost

ROOT and Geant4 do not use namespaces. In general, ROOT classes begin with "T" (e.g., TTree, TH1) while Geant4 classes begin with "G4" (e.g., G4Track, G4Step). Exception: Some of the newer ROOT sub-packages have namespaces (such as ROOT::Math::, ROOT::Fit::, ROOT::Minuit2::, Reflex::, TMVA::).

Some of these packages duplicate functionality; e.g., 4-vectors are implemented in both ROOT and CLHEP. Given a choice, use a package that's higher in the above tables over one that's lower; e.g., choose ROOT classes over their CLHEP equivalents.

3 Coding

git and git flow:
  • git flow quick start
  • Git Tips and Tricks (Note that "git help" works, but "man git" and "git help <command>" does not on any of the gpvm machines. Nor do any of the "git <command> -h" commands.) For the purposes of LArSoft development, please please ignore the workflow advice as anything other than an example of how to use various git commands to do specific tasks.

4 Building

How to use the repositories and the build system

Understanding CMakeLists.txt and product_deps files mrb and ups:

5 Testing

High-level description of testing is available at

5.1 LArSoft Continuous Integration (CI) system

6 Getting software into a LArSoft release

After designing, coding, building and testing a piece of software, submit it to the LArSoft development branch so it is included in a new release.

7 Misc.