IncludeFiles: Difference between revisions
Line 11: | Line 11: | ||
The remainder of this page will discuss how to find the source code for header files included in the Mu2e code. | The remainder of this page will discuss how to find the source code for header files included in the Mu2e code. | ||
The table below summarizes information about each external product that is used by Mu2e. The first column specifies the UPS package name. Second column gives the first element in an include path; it is often but | |||
not always the same as the UPS package name; note that there are some differences in capitalization and dash (-) vs underscore (_). The third column gives the environment variable used to locate the source file; in most, but not all cases, it follows the pattern of capitalizing the UPS package name and adding _INC. Note that include directives for ROOT files are just filenames with no additional path information. | |||
The fourth column gives the name of the namespace using within that packages; this is irregular and you just need to look it up as needed. Note that some repositories do not use a namespace and their symbols are in the global namespace; in all cases these packages name their files with a distinct prefix, such as gsl_, G4 or T, which serves as proxy for a namespace. The final column gives the url of the respository; if you use these urls, it's your responsibility to navigate to the correct version of the files you wish to view. | |||
{| class="wikitable" | {| class="wikitable" | ||
| Package | | UPS Package Name || Include Prefix || Environment Variable || Namespace || Source - Be careful to use the correct tag! | ||
|- | |- | ||
| art || ART_INC || art:: || [https://github.com/art-framework-suite/art https://github.com/art-framework-suite/art] | | art || art || ART_INC || art:: || [https://github.com/art-framework-suite/art https://github.com/art-framework-suite/art] | ||
|- | |- | ||
| artdaq-core || ARTDAQ_CORE_INC || artdaq:: || [https://github.com/art-daq/artdaq_core https://github.com/art-daq/artdaq_core] | |artdaq-core || artdaq-core || ARTDAQ_CORE_INC || artdaq:: || [https://github.com/art-daq/artdaq_core https://github.com/art-daq/artdaq_core] | ||
|- | |- | ||
| artdaq-core-mu2e || ARTDAQ_CORE_MU2E_INC || mu2e:: || [https://github.com/Mu2e/artdaq_core_mu2e https://github.com/Mu2e/artdaq_core_mu2e] | | artdaq-core-mu2e || artdaq-core-mu2e || ARTDAQ_CORE_MU2E_INC || mu2e:: || [https://github.com/Mu2e/artdaq_core_mu2e https://github.com/Mu2e/artdaq_core_mu2e] | ||
|- | |- | ||
| art_root_io || ART_ROOT_IO_INC || art:: || [https://github.com/art-framework-suite/art-root-io https://github.com/art-framework-suite/art-root-io] | | art_root_io || art_root_io || ART_ROOT_IO_INC || art:: || [https://github.com/art-framework-suite/art-root-io https://github.com/art-framework-suite/art-root-io] | ||
|- | |- | ||
| boost || BOOST_INC || boost:: || [https://github.com/boostorg/boost https://github.com/boostorg/boost] | | boost || boost || BOOST_INC || boost:: || [https://github.com/boostorg/boost https://github.com/boostorg/boost] | ||
|- | |- | ||
| BTrk || BTRK_INC || ( | | BTrk || BTrk || BTRK_INC || (global) || [https://github.com/KFTrack/BTrk https://github.com/KFTrack/BTrk] | ||
|- | |- | ||
| canvas || CANVAS_INC || art:: || [https://github.com/art-framework-suite/canvas https://github.com/art-framework-suite/canvas] | | canvas || canvas || CANVAS_INC || art:: || [https://github.com/art-framework-suite/canvas https://github.com/art-framework-suite/canvas] | ||
|- | |- | ||
| cetlib || CETLIB_INC || cet:: || [https://github.com/art-framework-suite/cetlib https://github.com/art-framework-suite/cetlib] | |cetlib || cetlib || CETLIB_INC || cet:: || [https://github.com/art-framework-suite/cetlib https://github.com/art-framework-suite/cetlib] | ||
|- | |- | ||
| cetlib_except || CETLIB_EXCEPT_INC || cet:: || [https://github.com/art-framework-suite/cetlib-except https://github.com/art-framework-suite/cetlib-except] | |cetlib_except || cetlib_except || CETLIB_EXCEPT_INC || cet:: || [https://github.com/art-framework-suite/cetlib-except https://github.com/art-framework-suite/cetlib-except] | ||
|- | |- | ||
| CLHEP || CLHEP_INC || CLHEP:: || [https://gitlab.cern.ch/CLHEP/CLHEP https://gitlab.cern.ch/CLHEP/CLHEP] | | clhep || CLHEP || CLHEP_INC || CLHEP:: || [https://gitlab.cern.ch/CLHEP/CLHEP https://gitlab.cern.ch/CLHEP/CLHEP] | ||
|- | |- | ||
| fhiclcpp || FHICLCPP_INC || fhicl:: || [https://github.com/art-framework-suite/fhicl-cpp https://github.com/art-framework-suite/fhicl-cpp] | | fhiclepp || fhiclcpp || FHICLCPP_INC || fhicl:: || [https://github.com/art-framework-suite/fhicl-cpp https://github.com/art-framework-suite/fhicl-cpp] | ||
|- | |- | ||
| Geant4 || G4INCLUDE || ( | | geatn4 || Geant4 || G4INCLUDE || (global) || [https://gitlab.cern.ch/geant4/geant4 https://gitlab.cern.ch/geant4/geant4] | ||
|- | |- | ||
| gsl || GSL_INC || ( | | gsl || gsl || GSL_INC || (global) || [https://github.com/ampl/gsl https://github.com/ampl/gsl] | ||
|- | |- | ||
| KinKal || KINKAL_INC || KinKal:: || [https://github.com/KFTrack/KinKal https://github.com/KFTrack/KinKal]] | | KinKal || KinKal || KINKAL_INC || KinKal:: || [https://github.com/KFTrack/KinKal https://github.com/KFTrack/KinKal]] | ||
|- | |- | ||
| mu2e_pcie_utils || MU2E_PCIE_UTILS_INC || DTCLib:: || [https://github.com/Mu2e/mu2e_pcie_utils https://github.com/Mu2e/mu2e_pcie_utils] | | mu2e_pcie_utils || mu2e_pcie_utils || MU2E_PCIE_UTILS_INC || DTCLib:: || [https://github.com/Mu2e/mu2e_pcie_utils https://github.com/Mu2e/mu2e_pcie_utils] | ||
|- | |- | ||
| messagefacility || MESSAGEFACILITY_INC || mf:: || [https://github.com/art-framework-suite/messagefacility https://github.com/art-framework-suite/messagefacility] | | messagefaciltiy || messagefacility || MESSAGEFACILITY_INC || mf:: || [https://github.com/art-framework-suite/messagefacility https://github.com/art-framework-suite/messagefacility] | ||
|- | |- | ||
| tbb || TBB_INC || tbb:: || | | tbb || tbb || TBB_INC || tbb:: || | ||
|- | |- | ||
| xercesc || XERCES_C_INC || xercesc:: || [https://github.com/apache/xerces-c https://github.com/apache/xerces-c] | | xercesc || xercesc || XERCES_C_INC || xercesc:: || [https://github.com/apache/xerces-c https://github.com/apache/xerces-c] | ||
|- | |- | ||
| ( | | root || (none) || ROOT_INC || (global) || [https://github.com/root-project/root https://github.com/root-project/root] | ||
|} | |} | ||
=== IDES vim and emacs === | |||
=== Files Included from ROOT=== | === Files Included from ROOT=== |
Revision as of 15:00, 7 September 2023
Finding Include Files
C++ Code
In the Mu2e repositories, you will see include directives that take one of the following forms,
#include "Offline/RecoDataProducts/inc/KalSeed.hh" #include "art/Framework/Principal/Event.h" #include "TH1F.h" #include <iostream>
The remainder of this page will discuss how to find the source code for header files included in the Mu2e code.
The table below summarizes information about each external product that is used by Mu2e. The first column specifies the UPS package name. Second column gives the first element in an include path; it is often but not always the same as the UPS package name; note that there are some differences in capitalization and dash (-) vs underscore (_). The third column gives the environment variable used to locate the source file; in most, but not all cases, it follows the pattern of capitalizing the UPS package name and adding _INC. Note that include directives for ROOT files are just filenames with no additional path information. The fourth column gives the name of the namespace using within that packages; this is irregular and you just need to look it up as needed. Note that some repositories do not use a namespace and their symbols are in the global namespace; in all cases these packages name their files with a distinct prefix, such as gsl_, G4 or T, which serves as proxy for a namespace. The final column gives the url of the respository; if you use these urls, it's your responsibility to navigate to the correct version of the files you wish to view.
UPS Package Name | Include Prefix | Environment Variable | Namespace | Source - Be careful to use the correct tag! |
art | art | ART_INC | art:: | https://github.com/art-framework-suite/art |
artdaq-core | artdaq-core | ARTDAQ_CORE_INC | artdaq:: | https://github.com/art-daq/artdaq_core |
artdaq-core-mu2e | artdaq-core-mu2e | ARTDAQ_CORE_MU2E_INC | mu2e:: | https://github.com/Mu2e/artdaq_core_mu2e |
art_root_io | art_root_io | ART_ROOT_IO_INC | art:: | https://github.com/art-framework-suite/art-root-io |
boost | boost | BOOST_INC | boost:: | https://github.com/boostorg/boost |
BTrk | BTrk | BTRK_INC | (global) | https://github.com/KFTrack/BTrk |
canvas | canvas | CANVAS_INC | art:: | https://github.com/art-framework-suite/canvas |
cetlib | cetlib | CETLIB_INC | cet:: | https://github.com/art-framework-suite/cetlib |
cetlib_except | cetlib_except | CETLIB_EXCEPT_INC | cet:: | https://github.com/art-framework-suite/cetlib-except |
clhep | CLHEP | CLHEP_INC | CLHEP:: | https://gitlab.cern.ch/CLHEP/CLHEP |
fhiclepp | fhiclcpp | FHICLCPP_INC | fhicl:: | https://github.com/art-framework-suite/fhicl-cpp |
geatn4 | Geant4 | G4INCLUDE | (global) | https://gitlab.cern.ch/geant4/geant4 |
gsl | gsl | GSL_INC | (global) | https://github.com/ampl/gsl |
KinKal | KinKal | KINKAL_INC | KinKal:: | https://github.com/KFTrack/KinKal] |
mu2e_pcie_utils | mu2e_pcie_utils | MU2E_PCIE_UTILS_INC | DTCLib:: | https://github.com/Mu2e/mu2e_pcie_utils |
messagefaciltiy | messagefacility | MESSAGEFACILITY_INC | mf:: | https://github.com/art-framework-suite/messagefacility |
tbb | tbb | TBB_INC | tbb:: | |
xercesc | xercesc | XERCES_C_INC | xercesc:: | https://github.com/apache/xerces-c |
root | (none) | ROOT_INC | (global) | https://github.com/root-project/root |
IDES vim and emacs
Files Included from ROOT
The syntax to incluude a root header file is to specify a path relative to $ROOT_INC. Because of the way that the root repository is structured, this results in most include directives containing only the filename. In almost all cases, the filename starts with a capital letter T, for example
#include "TH1F.h"
There are a small number of exceptional cases in which the filename starts with a capital letter R. Two cases that occur in the Mu2e code base are:
#include "Rtypes.h" #include "Riostream.h"
Finally, some header files live in subdirectories under $ROOT_INC. The two subdirectories that occur in the Mu2e code base are Math and TVMA, for example
#include "Math/Vector3D.h" #include "TMVA/Factory.h"
Exceptions
One other exception was found in a recent scan of Offline. The file included with,
#include "dtcInterfaceLib/DTC_Packets.h"
is found in the repository mu2e_pcie_utils, which can be found in the above table.
FCL Files
Auxillary Files
SimpleConfig, BField maps ...