Project

General

Profile

Developing With LArSoft » History » Version 53

Version 52 (Katherine Lato, 05/05/2016 06:26 PM) → Version 53/102 (Erica Snider, 06/14/2016 03:50 PM)

{{>toc}}

h1(count). Developing With LArSoft

h2(count). Quick links for Developing with LArSoft

* " LArSoft repositories packages and dependencies ":https://cdcvs.fnal.gov/redmine/projects/larsoft/wiki/_LArSoft_repositories_packages_and_dependencies_
* "Concepts in LArSoft":http://larsoft.org/important-concepts-in-larsoft/

h2(count). 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). LArSoft architecture and design principles

"Latest architecture document as PDF download":https://cdcvs.fnal.gov/redmine/projects/larsoft-architecture/repository/revisions/master/raw/output/LArSoftArchitecture.pdf

"Design principles on larsoft.org":http://larsoft.org/important-concepts-in-larsoft/code-organization/

h3(count). LArSoft repositories

* [[ LArSoft repositories, packages and dependencies ]]

h3(count). The _art_ framework and the LArSoft suite

* _art_
** "_art_ documentation on WordPress":http://art.fnal.gov
** "_art_ documentation in Redmine":https://cdcvs.fnal.gov/redmine/projects/art/wiki
** "_art_ workbook":http://art.fnal.gov/art-workbook/

h3(count). External packages

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

|_.Package|_.Namespace|_.Short description|_.Location of headers|
|"C++":http://www.cplusplus.com/reference/|@std::@|\2. Extensions to base C++ that are part of the standard language|
|"ROOT":https://root.cern.ch|See below|Data-analysis tools|@$ROOT_INC@|
|"CLHEP":http://proj-clhep.web.cern.ch/proj-clhep/|@CLHEP::@|Class Library for High-Energy Physics|@$CLHEP_INC/CLHEP@|
|"Geant4":http://geant4.web.cern.ch/geant4/|See below|Detector simulations|@$G4INCLUDE@|
|"GENIE":http://www.genie-mc.org/|@genie::@|Neutrino Monte-Carlo Generator|@$GENIE_INC/GENIE@|
|"boost":http://www.boost.org/|@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":http://root.cern.ch/root/html522/TTree.html, "TH1":http://root.cern.ch/root/html522/TH1.html) while "Geant4 classes":http://geant4www.triumf.ca/lxr/ begin with "G4" (e.g., "G4Track":http://geant4www.triumf.ca/lxr/source//track/include/G4Track.hh, "G4Step":http://geant4www.triumf.ca/lxr/source//track/include/G4Step.hh). 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":http://root.cern.ch/root/html522/TLorentzVector.html and "CLHEP":http://proj-clhep.web.cern.ch/proj-clhep/doc/CLHEP_2_1_2_2/doxygen/html/LorentzVector_8h.html. 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). 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). Guidelines

* [[The rules and guidelines|Coding guidelines]]
* [[Code documentation 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). Tools and techniques

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

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

h4(count). Debugging

[[Debugging LArSoft]]

h2(count). Building

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 larsoft-team@fnal.gov.

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":https://cdcvs.fnal.gov/redmine/projects/mrb/wiki/MrbUserGuide
** "mrb reference guide":https://cdcvs.fnal.gov/redmine/projects/mrb/wiki/MrbRefereceGuide
** "Documentation for buildtool":https://cdcvs.fnal.gov/redmine/projects/cet-is-public/wiki/Buildtool_script
*** mrb calls @buildtool@ (from the @cetbuildtools@ product) to perform the build.
* "About UPS":https://cdcvs.fnal.gov/redmine/projects/cet-is-public/wiki/AboutUPS
** [[cet-is-public:AboutQualifiers|About qualifiers]]: the things after "-q" in setup <prod> <ver> -q <qual>
** "More Relocatable UPS Documentation":https://cdcvs.fnal.gov/redmine/projects/ups/wiki/Documentation

h2(count). Testing

High-level description of testing is available at "larsoft.org":http://larsoft.org/important-concepts-in-larsoft/code-organization/#testing

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

* "High-level description of CI":http://larsoft.org/continuous-integration/
* "CI results display page":http://lar-ci-history.fnal.gov:8080/LarCI/app/view_builds/index
* [[LAr-Continuous-Integration:| LAr-Continuous-Integration subproject wiki)]]

h2(count). 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). 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).":https://cdcvs.fnal.gov/redmine/projects/larsoftsvn/documents