Code: Difference between revisions

From Mu2eWiki
Jump to navigation Jump to search
 
(30 intermediate revisions by 3 users not shown)
Line 1: Line 1:
== Building code ==
== Building code ==


Consult the [[OfflineStatus]] page to learn which branch or tag of Mu2e Offline you should start from.
* [[End of Life for Scientific Linux 7]] Instructions needed for June 2024 only.
 
* [[UPS to Spack Transition]] ongoing from spring 2024
* Basic recipe for creating a satellite release based on 'Mu2e_release' installed in cvmfs
* [[CodeEnvironment]] how to setup the linux environment
<pre>
* [[GitIntro]] code management preliminaries for newcomers
source /cvmfs/fermilab.opensciencegrid.org/products/common/etc/setups
* [[OfflineStatus]] which branch or tag of Mu2e Offline you should start from
setup mu2e
* [[GitHubWorkflow]] - code repository checkout and commit procedures
/cvmfs/mu2e.opensciencegrid.org/Offline/'Mu2e_release'/SLF6/prof/Offline/bin/createSatelliteRelease
* [[IncludeFiles]] - where to find include files
cd Satellite
* [[Muse]] - Mu2e code setup and build scripts
source setup.sh
* [[scons]] - internal commercial build tool, called by Muse
[add content]
* [[Building Offline with cmake]] - DAQ is building Offline using a different commercial tool.
scons -j 4
* [[CodeDebugging|Debugging]] code debugging tools and tips
</pre>
* [https://www.github.com/Mu2e Mu2e github organization]
 
* [[UPS|UPS]] - using the Fermilab UPS product setup
* Basic recipe for setup, full checkout and build (GitHub) (For more details see [[GitHubWorkflow]]). The following will produce a working directory that CANNOT be used to update the remote repository.  It is useful only for running tests, not for developing code.
* [[Redmine]] - a few pieces of code are still in the redmine git repository
<pre>
source /cvmfs/fermilab.opensciencegrid.org/products/common/etc/setups
setup mu2e
git clone git@github.com:Mu2e/Offline
cd Offline
git checkout -b work
source setup.sh
scons -j 4
</pre>
 
* Basic recipe for setup, full checkout and build (Redmine)
<pre>
source /cvmfs/fermilab.opensciencegrid.org/products/common/etc/setups
setup mu2e
 
- The following will produce a working directory that CANNOT be used to update the remote repository.  It is useful only for running tests, not for developing code. -
git clone http://cdcvs.fnal.gov/projects/mu2eofflinesoftwaremu2eoffline/Offline.git
 
- For a read-write working directory appropriate for developing code.-
git clone ssh://p-mu2eofflinesoftwaremu2eoffline@cdcvs.fnal.gov/cvs/projects/mu2eofflinesoftwaremu2eoffline/Offline.git
 
cd Offline
git checkout -b work
source setup.sh
scons -j 4
</pre>
* for building options (debug,trigger,visualization) see <code>./buildopts --help</code>
<br>
* [[ReleaseList]] - notes on purpose for each published release
* [[UPS|UPS]] - notes on using the UPS product setup
* [[Git|git]] - code repository management
* [[scons]] - primary code build tool
* [[Muse]] - Mu2e multi-repo build system
* [[LinkLists|Link Lists]]
* [http://cdcvs.fnal.gov/lxr/mu2eofflinesoftware/index.html LXR] - cross-linked code browser
* [[GitPartialCheckout| pgit ]] - git partial checkout for building only the part of the code base you need
* [[SatelliteRelease|Satellite Releases]] - for building only the part of the code base you need
* [[CodeDebugging|Debugging]]
* [[CVS]] - a few pieces of code are still in the CVS repository
* [[CVS]] - a few pieces of code are still in the CVS repository


Line 63: Line 25:
* [[SimpleConfig|SimpleConfig]] - another way to input parameters to an executable
* [[SimpleConfig|SimpleConfig]] - another way to input parameters to an executable
* [[Simulation|Simulation]] - an overview
* [[Simulation|Simulation]] - an overview
** [[SimulationFCL]] - fcl procedures for MDC2020 and later
** [[Generators]] - generating the first particle
** [[Generators]] - generating the first particle
*** [[CORSIKA]] cosmic ray simulation
*** [[CORSIKA]] cosmic ray simulation
Line 90: Line 53:
** [[SchemaEvolution| Schema Evolution]]
** [[SchemaEvolution| Schema Evolution]]
* [[Geometry|Geometry]]
* [[Geometry|Geometry]]
** [http://mu2e-docdb.fnal.gov:8080/cgi-bin/ShowDocument?docid=1120 Units and Coordinate Systems]
** [http://mu2e-docdb.fnal.gov/cgi-bin/ShowDocument?docid=1120 Units and Coordinate Systems]
* [[Alignment]]
* [[Alignment]]
* Random numbers:  
* Random numbers:  
Line 96: Line 59:
** [[RandomNumbers|Complete Instructions]]
** [[RandomNumbers|Complete Instructions]]
* [[MagneticFieldMaps|Magnetic Field Maps]]  
* [[MagneticFieldMaps|Magnetic Field Maps]]  
* [[ConditionsData|Conditions Data]]  
* [[ConditionsData|Conditions Data]]
** [https://mu2einternalwiki.fnal.gov/wiki/CalibrationSets CalibrationSets]
* [[Services|Services]]
* [[Services|Services]]
** [[ArtServices|Framework services]]
** [[ArtServices|Framework services]]
Line 102: Line 66:
* [[Exceptions|Exceptions]]
* [[Exceptions|Exceptions]]
* [[MessageLogger|Message logger]]
* [[MessageLogger|Message logger]]
* [[PyWrap]] - wrap compiled c++ code so it can be used in python
* [https://cdcvs.fnal.gov/redmine/projects/art/wiki/ArtExitCodes art error codes]
* [https://cdcvs.fnal.gov/redmine/projects/art/wiki/ArtExitCodes art error codes]
* [[Elastic Analysis Facility (EAF)|Elastic Analysis Facility (EAF)]]


== Code Management ==
== Code Management ==


* [[Spack]] - setup and build tool to replace UPS and MRB
* [[SpackMaintenance]] - expert procedures and debugging
* [[Legacy_Access_to_SL7]]
* [[MuseMaintenance]] - Muse procedures for experts
* [[ReleaseList]]
* [[ReleaseList]]
* [[Git|git]] - overview and pointers to detailed and mu2e-specific instructions
* [[Git|git]] - overview and pointers to detailed and mu2e-specific instructions
* [[Validation]] - automatic and occasional procedures for validation
* [[Validation]] - automatic and occasional procedures for validation
* [[GeantChecklist]] - validation of new geant versions
* [[Jenkins]] - a central build platform
* [[Jenkins]] - a central build platform
** [http://mu2e.fnal.gov/atwork/computing/ops/nightlyBuild/nightly.shtml  Jenkins Nightly build results]
* [[Cvmfs|CVMFS]] - a virtual disk mount containing our code
* [[Cvmfs|CVMFS]]
* [[Docker]] a portable software container to hold and run our environment and software
* [[CodeDistribution|Download]] - pull a local copy to remote institutions or laptops
* [[CodeDistribution|Download]] - pull a local copy to remote institutions or laptops
* [[Scisoft|scisoft]] - server for product manifests
* [[Scisoft|scisoft]] - server for product manifests
* [[BTrk]] - the KalMan fitter code is in this non-standard product
* [[BTrk]] - (deprecated) the Kalman fitter code is in this non-standard product
* [[KinKal]] - a repo and UPS product containing the core track Kalman fit code
* [[CVS]]
* [[CVS]]
* [[CodeDepencyGraph]] - how ot make the code dependency graph
* [[CodeDepencyGraph]] - how to make the code dependency graph
* [[DAQ]] [https://cdcvs.fnal.gov/redmine/projects/mu2edaq/wiki DAQ redmine]
* [[DAQ]] [https://cdcvs.fnal.gov/redmine/projects/mu2edaq/wiki DAQ redmine]
* [[RootBuild|building root]]
* [[RootBuild|building root]]
* [https://cdcvs.fnal.gov/redmine/projects/artutilscripts/repository/revisions/master/raw/tools/checkPrerequisites checkPrerequisites tool] - check linux has rpms needed by art
* [https://cdcvs.fnal.gov/redmine/projects/artutilscripts/repository/revisions/master/raw/tools/checkPrerequisites checkPrerequisites tool] - check linux has rpms needed by art
* [[SconsUPS]] - how to build a new version of scons, packaged for UPS
* [[Pyana]] - setting up python analysis packages
* [[Github_CI_Maintenance|Github CI Maintenance]] - information about the CI repo, used by Jenkins for build tests


== Standards and Practices ==
== Standards and Practices ==
Line 137: Line 112:
** [[LinuxFAQ|linux]]
** [[LinuxFAQ|linux]]
** [[RootFAQ|root]]
** [[RootFAQ|root]]
** [http://thbecker.net/articles/rvalue_references/section_01.html move semantics and r-value references]


== External Packages ==
== External Packages ==
* [[UPS| UPS]] [https://cdcvs.fnal.gov/redmine/projects/ups/wiki/ReferenceManual/ manual] [https://cdcvs.fnal.gov/redmine/projects/ups/wiki/Getting_Started_Using_UPS getting started]
* [[UPS| UPS]] [https://cdcvs.fnal.gov/redmine/projects/ups/wiki/ReferenceManual/ manual] [https://cdcvs.fnal.gov/redmine/projects/ups/wiki/Getting_Started_Using_UPS getting started]
* [https://cdcvs.fnal.gov/redmine/projects/mu2eofflinesoftwaremu2eoffline/repository Mu2e code] [http://cdcvs.fnal.gov/lxr lab LXR] [http://cdcvs.fnal.gov/lxr/mu2eofflinesoftware/index.html Mu2e LXR] [https://lxr.sourceforge.io/en/index.php LXR project]
* Mu2e [https://github.com/Mu2e github] [https://cdcvs.fnal.gov/redmine/projects/mu2eofflinesoftwaremu2eoffline/repository redmine] [http://cdcvs.fnal.gov/lxr lab LXR] [http://cdcvs.fnal.gov/lxr/mu2eofflinesoftware/index.html Mu2e LXR] [https://lxr.sourceforge.io/en/index.php LXR project]
* [https://web.fnal.gov/project/ArtDoc/Pages/home.aspx art]  [https://web.fnal.gov/project/ArtDoc/SitePages/documentation.aspx doc] [https://cdcvs.fnal.gov/redmine/projects/art redmine] [https://cdcvs.fnal.gov/redmine/projects/art/repository/revisions/master/show/art browser] [https://listserv.fnal.gov/scripts/wa.exe?A0=ART-USERS art-users] [https://cdcvs.fnal.gov/redmine/projects/cet-is-public/wiki/AboutQualifiers product flags] [https://cdcvs.fnal.gov/redmine/projects/art/wiki/ArtExitCodes error codes]
* [https://web.fnal.gov/project/ArtDoc/Pages/home.aspx art]  [https://web.fnal.gov/project/ArtDoc/SitePages/documentation.aspx doc] [https://github.com/art-framework-suite github] [https://cdcvs.fnal.gov/redmine/projects/art redmine] [https://cdcvs.fnal.gov/redmine/projects/art/repository/revisions/master/show/art browser] [https://listserv.fnal.gov/scripts/wa.exe?A0=ART-USERS art-users] [https://cdcvs.fnal.gov/redmine/projects/cet-is-public/wiki/AboutQualifiers product flags] [https://cdcvs.fnal.gov/redmine/projects/art/wiki/ArtExitCodes error codes]
* [https://gcc.gnu.org/projects/cxx-status.html gcc features development] [https://gcc.gnu.org/onlinedocs/libstdc++/manual/status.html#manual.intro.status.iso gcc library dependence]
* [https://indico.fnal.gov/category/1191/ recent art stakeholders meetings]; [https://cdcvs.fnal.gov/redmine/projects/art/wiki/Stakeholder_meeting_presentations older art stakeholders meetings]
* [https://indico.fnal.gov/category/1191/ recent art stakeholders meetings]; [https://cdcvs.fnal.gov/redmine/projects/art/wiki/Stakeholder_meeting_presentations older art stakeholders meetings]
* [https://cdcvs.fnal.gov/redmine/projects/artdaq/wiki artdaq wiki]
* [https://cdcvs.fnal.gov/redmine/projects/artdaq/wiki artdaq wiki]
Line 151: Line 128:
* [https://root.cern.ch/root/ root] [https://root.cern.ch/guides/reference-guide docs]
* [https://root.cern.ch/root/ root] [https://root.cern.ch/guides/reference-guide docs]
* [http://geant4.web.cern.ch/geant4/  geant] [https://web.fnal.gov/project/Geant4/SitePages/Home.aspx at Fermilab]  [http://www-geant4.kek.jp/Reference/9.4.p01/Geant4 DOxygen(v9.4.p01)] [http://www-geant4.kek.jp/LXR/ LXR]
* [http://geant4.web.cern.ch/geant4/  geant] [https://web.fnal.gov/project/Geant4/SitePages/Home.aspx at Fermilab]  [http://www-geant4.kek.jp/Reference/9.4.p01/Geant4 DOxygen(v9.4.p01)] [http://www-geant4.kek.jp/LXR/ LXR]
* [http://public.muonsinc.com/Projects/G4beamline.aspx G4Beamline]  [http://mu2e-docdb.fnal.gov:8080/cgi-bin/ShowDocument?docid=1490 Mu2e manual]
* [[Geant4Examples]] How to run the standard Geant4 examples on the Mu2e interactive machines.
* [http://public.muonsinc.com/Projects/G4beamline.aspx G4Beamline]  [http://mu2e-docdb.fnal.gov/cgi-bin/ShowDocument?docid=1490 Mu2e manual]
* [http://proj-clhep.web.cern.ch/proj-clhep/ CLHEP] [http://proj-clhep.web.cern.ch/proj-clhep/doc/CLHEP_2_2_0_4/html/ CLHEP(v.2.2.0.4)]
* [http://proj-clhep.web.cern.ch/proj-clhep/ CLHEP] [http://proj-clhep.web.cern.ch/proj-clhep/doc/CLHEP_2_2_0_4/html/ CLHEP(v.2.2.0.4)]
* [http://lcgapp.cern.ch/project/simu/HepPDT/ HepPDT]
* [http://lcgapp.cern.ch/project/simu/HepPDT/ HepPDT]
* [https://cdcvs.fnal.gov/redmine/projects/fhicl/wiki fhicl] [https://cdcvs.fnal.gov/redmine/projects/fhicl-cpp/repository  fhicl-cpp]
* [https://cdcvs.fnal.gov/redmine/projects/fhicl/wiki fhicl] [https://cdcvs.fnal.gov/redmine/projects/fhicl-cpp/repository  fhicl-cpp]
* [https://cdcvs.fnal.gov/redmine/projects/cetlib cetlib] [https://cdcvs.fnal.gov/redmine/projects/cetlib/repository  browser]
* [https://cdcvs.fnal.gov/redmine/projects/cetlib cetlib] [https://cdcvs.fnal.gov/redmine/projects/cetlib/repository  browser] [https://fnalssi.github.io/cetmodules/ cetmodules]
* [https://cdcvs.fnal.gov/redmine/projects/messagefacility Message Facility] [https://cdcvs.fnal.gov/redmine/projects/messagefacility/repository browser]
* [https://cdcvs.fnal.gov/redmine/projects/messagefacility Message Facility] [https://cdcvs.fnal.gov/redmine/projects/messagefacility/repository browser]
* [https://cdcvs.fnal.gov/redmine/projects/cpp0x cpp0x] [https://cdcvs.fnal.gov/redmine/projects/cpp0x/repository browser]
* [https://cdcvs.fnal.gov/redmine/projects/cpp0x cpp0x] [https://cdcvs.fnal.gov/redmine/projects/cpp0x/repository browser]

Latest revision as of 16:15, 23 August 2024

Building code

Configuring executables

Modules, Products, and Services

Code Management

Standards and Practices

External Packages