Developing With LArSoft » History » Version 52
- Table of contents
- Developing With LArSoft
- Quick links for Developing with LArSoft
- Writing code
- Getting software into a LArSoft release
Developing With LArSoft¶
Quick links for Developing with LArSoft¶
To design LArSoft code, it's important to understand the core LArSoft suite and all the components used by it. Reference the items below when designing new software.
LArSoft architecture and design principles¶
The art framework and the LArSoft suite¶
These are package written and maintained by the general physics and computing communities.
|Package||Namespace||Short description||Location of headers|
||Extensions to base C++ that are part of the standard language|
|ROOT||See below||Data-analysis tools||
||Class Library for High-Energy Physics||
|Geant4||See below||Detector simulations||
||Neutrino Monte-Carlo Generator||
||General programming tools for C++||
|Message Facility wiki documentation||
||Service for console messages||
|nutools and LArSoft||
||Neutrino platform tools||
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
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.
Whether you are writing new code or modifying existing code, please follow the guidelines listed below. There are also development tools and techniques available that can make coding easier.
- Coding guidelines
- Guidelines on writing (and using) services in LArSoft (in general)
- Guidelines on writing (and using) algorithms in LArSoft (not specific to any algorithm)
Tools and techniques¶
git and git flow¶
- git guidelines
- 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.
How to use the repositories and the build system
- Look for experiment specific guides to using and developing LArSoft code * What to do when there is a new release * To get write access to the repositories, speak to the offline coordinator for your experiment. If you have a question, send email to email@example.com.
- Cetbuildtools cmake modules: such as
cet_add_compiler_flags. Used in
CMakeLists.txtfiles throughout LArSoft
- Art cmake modules: such as
simple_plugin. Used in
CMakeLists.txtfiles throughout LArSoft
- Defining products in the CET build environment: explains the
- Adding Product Dependencies: how to edit the
CMakeLists.txtfiles to add dependencies
- Various helpful tips for coding in the CET C++ environment: things you hope you never need to know
- Building your own code with cmake: pointer to a really simple example
- mrb : the multi-repository build tool
- About UPS
High-level description of testing is available at larsoft.org
LArSoft Continuous Integration (CI) system¶
- High-level description of CI * CI results display page * LAr-Continuous-Integration subproject wiki)
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.
- Getting new code into a LArSoft release (Procedures and policies for making changes to LArSoft releases)
- Using LArSoft on the GPVM nodes * Package Documentation * Geometry * Reconstruction * Simulation * Space Points * [[larsoftsvn:Seed Finding and Bezier Tracking]] * [[larsoftsvn:Optical Simulations]]