Developing With LArSoft » History » Version 52

Version 51 (Katherine Lato, 05/05/2016 03:53 PM) → Version 52/102 (Katherine Lato, 05/05/2016 06:26 PM)


h1(count). h1. Developing With LArSoft

h2(count). h2. 1 Quick links for Developing with LArSoft

* " LArSoft repositories packages and dependencies ":
* "Concepts in LArSoft":

h2(count). h2. 2 Designing

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.

h3(count). h3. 2.1 LArSoft architecture and design principles

"Latest architecture document as PDF download":

"Design principles on":

h3(count). h3. 2.2 LArSoft repositories

* [[ LArSoft repositories, packages and dependencies ]]


h3. 2.3
The _art_ framework and the LArSoft suite

* _art_
** "_art_ documentation on WordPress":
** "_art_ documentation in Redmine":
** "_art_ workbook":


h3. 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::@|\2. 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@|
|[[messagefacility:|Message Facility wiki documentation]]|@mf::@|Service for console messages|@$MESSAGEFACILITY_INC/@|
|[[NuSoft and LArSoft|nutools and LArSoft]]|@simb::@ ...|Neutrino platform tools|@$NUTOOLS_INC@|

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.

h2(count). h2. 3 Writing code

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.

h3(count). h3. 3.1 Guidelines

* [[The rules and guidelines|Coding guidelines]]
* [[Writing LArSoft service|Guidelines on writing (and using) services in LArSoft]] _(in general)_
* [[Writing LArSoft algorithms|Guidelines on writing (and using) algorithms in LArSoft]] _(not specific to any algorithm)_
* [[LArSoft examples|Examples!]]

h3(count). h3. 3.2 Tools and techniques

h4(count). h4. 3.2.1 git and git flow

* [[LArSoft_git_Guidelines|git guidelines]]
* [[cet-is-public:git flow quick start]]
* [[cet-is-public:GitTipsAndTricks|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.

h4(count). h4. 3.2.2 Profiling

* [[memory profiling tools]]
* [[time profiling tools]]
* [[profiling utilities]]


h4. 3.2.3

[[Debugging LArSoft]]


h2. 4

How to use the repositories and the build system

* *[[Quick Links|Look for experiment specific guides to using and developing LArSoft code ]]*
* [[UpdatingToNewRelease|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

Understanding CMakeLists.txt and product_deps files
* [[cet-is-public:Cetbuildtools cmake modules]]: such as @cet_make@ and @cet_add_compiler_flags@. Used in @CMakeLists.txt@ files throughout LArSoft
* [[cet-is-public:Art cmake modules]]: such as @art_make@ and @simple_plugin@. Used in @CMakeLists.txt@ files throughout LArSoft
* [[cet-is-public:Defining products in the CET build environment]]: explains the @product_deps@ file
* [[cet-is-public:AddingProductDependencies|Adding Product Dependencies]]: how to edit the @product_deps@ and @CMakeLists.txt@ files to add dependencies
* [[cet-is-public:CodeTips|Various helpful tips for coding in the CET C++ environment]]: things you hope you never need to know
* [[cet-is-public:Building your own code with cmake]]: pointer to a _really_ simple example

mrb and ups:
* mrb : the multi-repository build tool
** "mrb user guide":
** "mrb reference guide":
** "Documentation for buildtool":
*** mrb calls @buildtool@ (from the @cetbuildtools@ product) to perform the build.
* "About UPS":
** [[cet-is-public:AboutQualifiers|About qualifiers]]: the things after "-q" in setup <prod> <ver> -q <qual>
** "More Relocatable UPS Documentation":

h2(count). h2. 5 Testing

High-level description of testing is available at "":

h3(count). h3. 5.1 LArSoft Continuous Integration (CI) system

* "High-level description of CI":
* "CI results display page":
* [[LAr-Continuous-Integration:| LAr-Continuous-Integration subproject wiki)]]

h2(count). h2. 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.

* [[Getting new code into a LArSoft release]] _(Procedures and policies for making changes to LArSoft releases)_

h2(count). h2. 7 Misc.

* [[Using LArSoft on the GPVM nodes]]
* [[larsoft:Package Documentation]]
* [[larsoft:Geometry]]
* [[larsoft:Reconstruction]]
* [[larsoft:Simulation]]
* [[larsoft:Space Points]]
* [[larsoftsvn:Seed Finding and Bezier Tracking]]
* [[larsoftsvn:Optical Simulations]]

* "Past LArSoft meeting presentations -- Old physics/technical information (some of which may not be applicable since the transition to git / mrb / ups).":