Project

General

Profile

Developing With LArSoft » History » Version 76

Katherine Lato, 08/29/2016 10:08 AM

1 3 Lynn Garren
{{>toc}}
2 3 Lynn Garren
3 52 Katherine Lato
h1(count). Developing With LArSoft
4 1 Katherine Lato
5 52 Katherine Lato
h2(count). Quick links for Developing with LArSoft
6 36 Katherine Lato
7 35 Katherine Lato
* " LArSoft repositories packages and dependencies ":https://cdcvs.fnal.gov/redmine/projects/larsoft/wiki/_LArSoft_repositories_packages_and_dependencies_
8 45 Katherine Lato
* "Concepts in LArSoft":http://larsoft.org/important-concepts-in-larsoft/
9 1 Katherine Lato
10 52 Katherine Lato
h2(count). Designing
11 30 Katherine Lato
12 41 Katherine Lato
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.
13 34 Erica Snider
14 52 Katherine Lato
h3(count). LArSoft architecture and design principles
15 1 Katherine Lato
16 61 Gianluca Petrillo
* "Latest architecture document as PDF download":https://cdcvs.fnal.gov/redmine/projects/larsoft-architecture/repository/revisions/master/raw/output/LArSoftArchitecture.pdf
17 76 Katherine Lato
* "Design principles on larsoft.org":http://larsoft.org/important-concepts-in-larsoft/design/
18 1 Katherine Lato
19 52 Katherine Lato
h3(count). LArSoft repositories
20 1 Katherine Lato
21 1 Katherine Lato
  * [[ LArSoft repositories, packages and dependencies ]]
22 1 Katherine Lato
23 63 Gianluca Petrillo
h3(count). The _art_ framework
24 29 Katherine Lato
25 66 Katherine Lato
  * "_art_ documentation on WordPress":http://art.fnal.gov for general information 
26 66 Katherine Lato
  * "_art_ documentation in Redmine":https://cdcvs.fnal.gov/redmine/projects/art/wiki for code specific information
27 66 Katherine Lato
  * "_art_ workbook":http://art.fnal.gov/art-workbook/ for examples and tutorials
28 64 Katherine Lato
  * [[Using art in LArSoft]]
29 1 Katherine Lato
30 52 Katherine Lato
h3(count). External packages
31 1 Katherine Lato
32 67 Katherine Lato
These are package written and maintained by the general physics and computing communities for 
33 1 Katherine Lato
34 36 Katherine Lato
|_.Package|_.Namespace|_.Short description|_.Location of headers|
35 36 Katherine Lato
|"C++":http://www.cplusplus.com/reference/|@std::@|\2. Extensions to base C++ that are part of the standard language|
36 36 Katherine Lato
|"ROOT":https://root.cern.ch|See below|Data-analysis tools|@$ROOT_INC@|
37 36 Katherine Lato
|"CLHEP":http://proj-clhep.web.cern.ch/proj-clhep/|@CLHEP::@|Class Library for High-Energy Physics|@$CLHEP_INC/CLHEP@|
38 36 Katherine Lato
|"Geant4":http://geant4.web.cern.ch/geant4/|See below|Detector simulations|@$G4INCLUDE@|
39 36 Katherine Lato
|"GENIE":http://www.genie-mc.org/|@genie::@|Neutrino Monte-Carlo Generator|@$GENIE_INC/GENIE@|
40 36 Katherine Lato
|"boost":http://www.boost.org/|@boost::@|General programming tools for C++|@$BOOST_INC/boost@|
41 65 Katherine Lato
|[[messagefacility:|Message Facility wiki documentation]]|@mf::@|Service for console messages|@$MESSAGEFACILITY_INC@|
42 72 Gianluca Petrillo
|[[art:wiki#Job-configuration|FHiCL Configuration]]|@fhicl::@|Configuration language and parsing tools|@$FHICLCPP_INC@|
43 42 Katherine Lato
|[[NuSoft and LArSoft|nutools and LArSoft]]|@simb::@ ...|Neutrino platform tools|@$NUTOOLS_INC@|
44 20 Katherine Lato
45 42 Katherine Lato
46 36 Katherine Lato
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::@).
47 20 Katherine Lato
48 36 Katherine Lato
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.
49 36 Katherine Lato
50 52 Katherine Lato
h2(count). Writing code
51 1 Katherine Lato
52 47 Katherine Lato
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.
53 47 Katherine Lato
54 52 Katherine Lato
h3(count). Guidelines
55 47 Katherine Lato
56 1 Katherine Lato
* [[The rules and guidelines|Coding guidelines]]
57 53 Erica Snider
* [[Code documentation guidelines]]
58 36 Katherine Lato
* [[Writing LArSoft service|Guidelines on writing (and using) services in LArSoft]] _(in general)_
59 46 Gianluca Petrillo
* [[Writing LArSoft algorithms|Guidelines on writing (and using) algorithms in LArSoft]] _(not specific to any algorithm)_
60 74 Katherine Lato
* [[Guidelines on using the geometry]]
61 1 Katherine Lato
* [[LArSoft examples|Examples!]]
62 69 Gianluca Petrillo
* [[Some C++ good practices|some C++ suggestions]]
63 1 Katherine Lato
64 60 Katherine Lato
---
65 60 Katherine Lato
66 52 Katherine Lato
h3(count). Tools and techniques
67 47 Katherine Lato
68 75 Gianluca Petrillo
h4(count). Documenting and browsing code
69 75 Gianluca Petrillo
70 75 Gianluca Petrillo
* "LArSoft Doxygen":http://nusoft.fnal.gov/larsoft/doxsvn/html/index.html - comments in the code are incorporated into documentation using "the Doxygen tool.":http://www.stack.nl/~dimitri/doxygen/manual/docblocks.html
71 75 Gianluca Petrillo
* "LXR Cross Referencer":http://cdcvs.fnal.gov/lxr/ -  general purpose source code indexer and cross-referencer that provides web-based browsing of source code with links to the definition and usage of any identifier. Supports multiple languages. Includes LArSoft code. Note, pages may take several seconds to load.
72 75 Gianluca Petrillo
73 52 Katherine Lato
h4(count). git and git flow
74 47 Katherine Lato
75 67 Katherine Lato
* [[LArSoft_git_Guidelines|git guidelines]]
76 57 Katherine Lato
* [[cet-is-public:git flow quick start]]
77 67 Katherine Lato
* [[cet-is-public:GitTipsAndTricks|Git Tips and Tricks]]
78 67 Katherine Lato
_(for the purposes of LArSoft development, please please ignore anything other than how to use various git commands to do specific tasks - and especially ignore the workflow advices)_
79 57 Katherine Lato
80 52 Katherine Lato
h4(count). Profiling
81 1 Katherine Lato
82 48 Katherine Lato
* [[memory profiling tools]]
83 48 Katherine Lato
* [[time profiling tools]]
84 48 Katherine Lato
* [[profiling utilities]]
85 48 Katherine Lato
86 52 Katherine Lato
h4(count). Debugging
87 48 Katherine Lato
88 56 Katherine Lato
* [[Debugging LArSoft with Allinea]] 
89 56 Katherine Lato
* [[Debugging LArSoft]] with RogueWave TotalView. (*TotalView is no longer being paid for. Please use Allinea above instead.*)
90 55 Katherine Lato
* [[Debugging with gdb]]
91 60 Katherine Lato
92 60 Katherine Lato
---
93 1 Katherine Lato
94 52 Katherine Lato
h2(count). Building
95 1 Katherine Lato
96 67 Katherine Lato
h3(count). Using the build system
97 1 Katherine Lato
98 36 Katherine Lato
  * *[[Quick Links|Look for experiment specific guides to using and developing LArSoft code ]]*
99 71 Katherine Lato
  *  Choose the correct release from the [[LArSoft release list|List of LArSoft Releases and Release Notes]]. 
100 73 Gianluca Petrillo
  * [[UpdatingToNewRelease|What to do when there is a new release ]] (a.k.a. **[[UpdatingToNewRelease|update LArSoft version]]**)
101 67 Katherine Lato
  
102 67 Katherine Lato
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.
103 44 Lynn Garren
104 67 Katherine Lato
h3(count). Understanding CMakeLists.txt and product_deps files
105 67 Katherine Lato
106 1 Katherine Lato
* [[cet-is-public:Cetbuildtools cmake modules]]:  such as @cet_make@ and @cet_add_compiler_flags@. Used in @CMakeLists.txt@ files throughout LArSoft
107 1 Katherine Lato
* [[cet-is-public:Art cmake modules]]: such as @art_make@ and @simple_plugin@. Used in @CMakeLists.txt@ files throughout LArSoft
108 1 Katherine Lato
* [[cet-is-public:Defining products in the CET build environment]]: explains the @product_deps@ file
109 1 Katherine Lato
* [[cet-is-public:AddingProductDependencies|Adding Product Dependencies]]: how to edit the @product_deps@ and @CMakeLists.txt@ files to add dependencies
110 1 Katherine Lato
* [[cet-is-public:CodeTips|Various helpful tips for coding in the CET C++ environment]]: things you hope you never need to know
111 1 Katherine Lato
* [[cet-is-public:Building your own code with cmake]]:  pointer to a _really_ simple example
112 1 Katherine Lato
113 67 Katherine Lato
h3(count). mrb (multi-repository build) tool
114 67 Katherine Lato
115 67 Katherine Lato
* "mrb user guide":https://cdcvs.fnal.gov/redmine/projects/mrb/wiki/MrbUserGuide
116 67 Katherine Lato
* "mrb reference guide":https://cdcvs.fnal.gov/redmine/projects/mrb/wiki/MrbRefereceGuide
117 67 Katherine Lato
* "Documentation for buildtool":https://cdcvs.fnal.gov/redmine/projects/cet-is-public/wiki/Buildtool_script
118 67 Katherine Lato
** mrb calls @buildtool@ (from the @cetbuildtools@ product) to perform the build. 
119 67 Katherine Lato
120 67 Katherine Lato
h3(count). ups
121 67 Katherine Lato
122 1 Katherine Lato
* "About UPS":https://cdcvs.fnal.gov/redmine/projects/cet-is-public/wiki/AboutUPS 
123 67 Katherine Lato
* [[cet-is-public:AboutQualifiers|About qualifiers]]:  the things after "-q" in setup <prod> <ver> -q <qual>
124 67 Katherine Lato
* "More Relocatable UPS Documentation":https://cdcvs.fnal.gov/redmine/projects/ups/wiki/Documentation
125 36 Katherine Lato
126 38 Katherine Lato
h2(count). Testing
127 1 Katherine Lato
128 76 Katherine Lato
High-level description of testing is available at "larsoft.org":http://larsoft.org/larsoft-testing/
129 38 Katherine Lato
130 38 Katherine Lato
h3(count). LArSoft Continuous Integration (CI) system
131 36 Katherine Lato
132 52 Katherine Lato
  * "High-level description of CI":http://larsoft.org/continuous-integration/
133 1 Katherine Lato
  * "CI results display page":http://lar-ci-history.fnal.gov:8080/LarCI/app/view_builds/index
134 36 Katherine Lato
  * [[LAr-Continuous-Integration:| LAr-Continuous-Integration subproject wiki]]
135 1 Katherine Lato
136 67 Katherine Lato
h2(count). Submitting for next release
137 36 Katherine Lato
138 52 Katherine Lato
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.
139 42 Katherine Lato
140 42 Katherine Lato
* [[Getting new code into a LArSoft release]]  _(Procedures and policies for making changes to LArSoft releases)_