1 / 20

Overview of LHCb applications and software environment

Overview of LHCb applications and software environment. Event Model / Detector Description / Conditions. MCHits. Gaudi. LHCb applications. MicroDST. DST. Raw Data. GenParticles. Stripping DaVinci. Analysis DaVinci. Simul. Gauss. Analysis Bender. Digit. Boole. HLT Moore.

tod
Download Presentation

Overview of LHCb applications and software environment

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Overview of LHCb applications and software environment LHCb software tutorial - September 2011

  2. Event Model / Detector Description / Conditions MCHits Gaudi LHCb applications MicroDST DST Raw Data GenParticles Stripping DaVinci Analysis DaVinci Simul. Gauss Analysis Bender Digit. Boole HLT Moore Reco. Brunel Ev.Disp. Panoramix MCParticles LHCb software tutorial - September 2011

  3. Software organisation • Applications are released as a stack of Projects • One project per application • e.g. Brunel, DaVinci • Several independent projects for components • e.g. Lbcom, Rec, Hlt, Analysis, Stripping • Four projects for the framework • Gaudi, LHCb, Phys, Online • Projects are collections of Packages • Group of classes in a logically cohesive physical unit. • Packaging structure reflects on: • Logical structure of the application • Organizational structure of the development team • Package is minimal entity that can be versioned • A project version uniquely defines the versions of the packages it contains, and of the projects it depends on • Users work in the environment defined for a given version of the chosen project • e.g. SetupProject DaVinci v29r0 Brunel Lbcom Rec LHCb Gaudi LHCb software tutorial - September 2011

  4. CMT (Configuration Management Tool) • Based around the notion of package • Provides a set of tools for automating the configuration and building of packages • What to build • How to build • Package dependencies CMT requirements makefile DevStudio files SVN repository code code Building tools (compilers, linkers, IDEs ) Libraries & Executables code code code LHCb software tutorial - September 2011

  5. packA Hat packA x86_64-slc5 -gcc43-opt x86_64_slc5_icc11_opt options doc src cmt python i686_winxp_vc9_dbg Package: Structure Mandatory documentation directory contains the release.notes file public scripts and configurables, will be on $PYTHONPATH $PACKAROOT Job options Mandatory manager directory contains the requirements file public include files #include “packA/xxx.h” . . . Generated binary directories LHCb software tutorial - September 2011

  6. Package versions • Packages have several versions • Defined in cmt requirements file • Version number formatted according to convention: v28r1p1 • Major version • Indicates a change in the interface: all packages that use it may have to change • Minor version • Indicates an internal only change • Patch version • Not always present. A minor bug fix to an existing release Major version 28 Minor version 1 Patch version 1 LHCb software tutorial - September 2011

  7. Package Categories • Application: is a package that sets up the environment and contains the job options needed for configuring and running a program. • Library: contains a list of classes and the list of dependent packages needed to compile it. • Package group: contains a list of other packages with their version number (e.g. LHCbSys) • Interface package: interfacing to packages not managed with CMT (e.g. Python, GSL, ROOT,…) LHCb software tutorial - September 2011

  8. Link vs. Component Libraries • Link libraries are linked to the program executable • (static or dynamic linking) • Base classes, event and geometry data classes • Loaded at program start • Must be found on LD_LIBRARY_PATH • Component libraries are loaded on demand at run-time • Collection of components (Algorithms, Tools, Services, etc.) • “Plug-ins” • No need to recompile or re-link program if plug-in changes LHCb software tutorial - September 2011

  9. CMT: requirements file package MyPackage version v1r0 # Structure, i.e. directories to process. branches cmt doc src # Used packages. use GaudiAlg v* # Component library building rule library MyPackage ../src/*.cpp # define component library link options apply_pattern component_library library=MyPackage LHCb software tutorial - September 2011

  10. CMT: Basic Commands • All commands must be executed from a directory containing a cmt requirements file • cmt config • Configures the package (creates setup and make files) • Invoked automatically by getpack (see later slide) • cmt show uses and/or cmt show projects • Show dependencies and actual versions used • cmt make • build the current package • cmt broadcast <command> • Recursive CMT command in all used packages found in the current CMT project • e.g. cmt broadcast cmt make • cmt run <command> • Executes <command> in current package environment LHCb software tutorial - September 2011

  11. Setting the CMT environment • Create a working directory for a given project • actually an alias for SetupProject --build-env <Project> [<version>] • creates working directory and cd to it: ~/cmtuser/<Project>_<version> • Packages are searched for in Projects that are on CMTPROJECTPATH • Default is ${User_release_area}:${LHCBPROJECTPATH} • Add additional paths with --nightly and --dev-dir switches of SetupProject > setenv<Project> [<version>] LHCb software tutorial - September 2011

  12. Getting a package • The “getpack” command • Script combining “svn checkout” + “cmt config” • If no version given, it suggests the latest version of the package consistent with the current environment • Suggested version is not necessarily the most recent version if you are not using the latest environment > getpack [hat/]<package> [<version>] [head] LHCb software tutorial - September 2011

  13. Building a package • Work in the /cmt directory • <hat>/<package>/cmt • Set the CMT configuration ($CMTCONFIG) • Defines platform, compiler, directories where to find binaries • slc5 default: x86_64-slc5-gcc43-opt • LbLogin –c i686-slc5-gcc43-dbg • setenv CMTCONFIG $CMTDEB • Invoke the make command, via cmt • In general,putting “cmt run” in front of any command ensures that the command is executed in a shell that has defined all the environment described by the requirements file. “cmt make” is a special case. > cmt make [-j][target][clean][binclean] LHCb software tutorial - September 2011

  14. Building several packages • A handy Makefile that wraps cmt is available in the directory <Project>_<version> • Allows to: • build all the packages in the directory • build a package with the ones it depends on • build just one package • Example workflow: > make > make <hat>/<package> > make PKG_ONLY=1 <hat>/<package> > SetupProject --build-envMyProject > getpack Pack1 > getpack Pack2 > make LHCb software tutorial - September 2011

  15. Running the application • Set the run time environment • Takes into account value of CMTCONFIG • Needed once after the build, then only if environment changes (new packages checked out, requirements file changed, CMTCONFIG changed, etc.) • Execute the program • But see also cmt run command in hands on > SetupProject <project> <version> • gaudirun.py job.py LHCb software tutorial - September 2011

  16. SVN (Version Control System) • Record the history of your source files • Share your development with other people • Commit often • But only codes that compiles and builds • Tested by nightly builds • LHCb and Gaudi Repositories reside on CERN-IT SVN server • Private repositories are also possible, but must be managed by yourself, see http://svn.web.cern.ch/svn/howto.php#creating-requesting LHCb software tutorial - September 2011

  17. Accessing LHCb SVN server • Web browsable • LHCb: • Trac: https://svnweb.cern.ch/trac/lhcb/browser • WebSVN: http://svnweb.cern.ch/world/wsvn/lhcb • Gaudi: • Trac: https://svnweb.cern.ch/trac/gaudi/browser • WebSVN: http://svnweb.cern.ch/world/wsvn/gaudi • World readable if authenticated • SSH authentication • Automatic if authenticated in CERN AFS cell (lxplus) • For write access • Register your account in the e-group lhcb-svn-writers • Detailed instructions athttps://twiki.cern.ch/twiki/bin/view/LHCb/SVNUsageGuidelines LHCb software tutorial - September 2011

  18. Eclipse IDE customisation • Eclipseplugins to help LHCb developers • Wizards for • SetupProject --build-env • getpack • Creation of requirements, components (Algoriithms, Tools, ...) • Shared pre-configured installation on AFS (used in the hands-on) • Eclipse repository of packages (update site) for easy installation of useful plugins • Documentation on Twiki • https://twiki.cern.ch/twiki/bin/view/LHCb/EclipseConfiguration • https://twiki.cern.ch/twiki/bin/view/LHCb/EclipseTutorial • https://twiki.cern.ch/twiki/bin/view/LHCb/EclipsePluginsTutorial LHCb software tutorial - September 2011

  19. Emacs customisation • A customisation of emacs for LHCb: • Templates for creation of files • E.g. MyAlgorithm.h, MyAlgorithm.cpp, requirements, release.notes etc. • Various shortcuts for code insertions • Optionally, load an EDT keypad emulation • Add following lines to ~/.emacs: • (load (expand-file-name "$EMACSDIR/edt")) • (load (expand-file-name "$EMACSDIR/lhcb")) • Or copy from $EMACSDIR/.emacs LHCb software tutorial - September 2011

  20. Exercise • Now read the web page attached to this lesson in the agenda and work through the exercises LHCb software tutorial - September 2011

More Related