+ All Categories
Home > Documents > Overview of LHCb applications and software...

Overview of LHCb applications and software...

Date post: 21-May-2020
Category:
Upload: others
View: 3 times
Download: 0 times
Share this document with a friend
23
Bologna Tutorial, June 2006 1 1 Overview of LHCb applications and software environment Overview of LHCb applications and software environment
Transcript
Page 1: Overview of LHCb applications and software environmentlhcb.web.cern.ch/lhcb/computing/Frameworks/Gaudi/... · 1-5 Tutorial@Dortmund, November 2006 Applications are built from packagesApplications

Bologna Tutorial, June 2006

11Overview of LHCb applications

and software environmentOverview of LHCb applications

and software environment

Page 2: Overview of LHCb applications and software environmentlhcb.web.cern.ch/lhcb/computing/Frameworks/Gaudi/... · 1-5 Tutorial@Dortmund, November 2006 Applications are built from packagesApplications

2

Simul.Gauss Recons.

& HLTBrunel

AnalysisDaVinci

MCHits

MiniDST

DigitsDST

MCParts

GenParts

Event model / Physics event model

AOD

RawDataDetectorDescription

ConditionsDatabase

Gaudi

Digit.Boole

LHCb applicationsLHCb applications

Page 3: Overview of LHCb applications and software environmentlhcb.web.cern.ch/lhcb/computing/Frameworks/Gaudi/... · 1-5 Tutorial@Dortmund, November 2006 Applications are built from packagesApplications

1-3 Tutorial@Dortmund, November 2006

Main LHCb applicationsMain LHCb applications• Gauss

– Event generation and GEANT4 simulation

• Boole– Detector response and digitization– Output in same format as real data

• Moore– Trigger reconstruction and HLT selection– Runs both online (in trigger farm) and offline

• Brunel– Event reconstruction– Output Tracks, Particle ID, “ProtoParticles”

• Gauss– Event generation and GEANT4 simulation

• Boole– Detector response and digitization– Output in same format as real data

• Moore– Trigger reconstruction and HLT selection– Runs both online (in trigger farm) and offline

• Brunel– Event reconstruction– Output Tracks, Particle ID, “ProtoParticles”

011010011101

1010100010101010110100

B00le

Page 4: Overview of LHCb applications and software environmentlhcb.web.cern.ch/lhcb/computing/Frameworks/Gaudi/... · 1-5 Tutorial@Dortmund, November 2006 Applications are built from packagesApplications

1-4 Tutorial@Dortmund, November 2006

More main LHCb applicationsMore main LHCb applications

• DaVinci– Physics analysis framework– Manipulate particles and vertices to identify and

measure physics processes

• Panoramix– Event and geometry display– Scripting based on Python

• Ganga– User interface for handling job preparation,

submission and retrieval (e.g. on the grid)

• DaVinci– Physics analysis framework– Manipulate particles and vertices to identify and

measure physics processes

• Panoramix– Event and geometry display– Scripting based on Python

• Ganga– User interface for handling job preparation,

submission and retrieval (e.g. on the grid)

+BENDER+ONLINE+EULER+ test_beams+…

Page 5: Overview of LHCb applications and software environmentlhcb.web.cern.ch/lhcb/computing/Frameworks/Gaudi/... · 1-5 Tutorial@Dortmund, November 2006 Applications are built from packagesApplications

1-5 Tutorial@Dortmund, November 2006

Applications are built from packagesApplications are built from packages

• Package Definition:– Collection of related classes in a

logically cohesive physical unit– Minimal entity that can be versioned

• Reflects on– Logical structure of the application– Organizational structure of the

development team

• Package Definition:– Collection of related classes in a

logically cohesive physical unit– Minimal entity that can be versioned

• Reflects on– Logical structure of the application– Organizational structure of the

development team

Page 6: Overview of LHCb applications and software environmentlhcb.web.cern.ch/lhcb/computing/Frameworks/Gaudi/... · 1-5 Tutorial@Dortmund, November 2006 Applications are built from packagesApplications

1-6 Tutorial@Dortmund, November 2006

Package: StructurePackage: Structure

packA

v1r0 v1r1 v2r0

cmt src doc win32_vc71_dbg

slc3_ia32_gcc323_dbg

slc3_ia32_gcc323packA

$PACKAROOT

Versionnumber

binariesmanager directory contains the requirements file

public include files#include “packA/xxx.h”

. . .

Page 7: Overview of LHCb applications and software environmentlhcb.web.cern.ch/lhcb/computing/Frameworks/Gaudi/... · 1-5 Tutorial@Dortmund, November 2006 Applications are built from packagesApplications

1-7 Tutorial@Dortmund, November 2006

Package versionsPackage versionsPackages have several versions:

v5r2p1

Major version • Indicates a change in the interface: all

packages that use it may have to changeMinor version• Indicates an internal only change

Patch version• Not usually present. A minor bug fix to an

existing release

Packages have several versions:Packages have several versions:v5r2p1v5r2p1

Major version Major version • Indicates a change in the interface: all

packages that use it may have to changeMinor versionMinor version• Indicates an internal only change

Patch versionPatch version• Not usually present. A minor bug fix to an

existing release

Major version 5

Minor version 2 Patch version 1

Page 8: Overview of LHCb applications and software environmentlhcb.web.cern.ch/lhcb/computing/Frameworks/Gaudi/... · 1-5 Tutorial@Dortmund, November 2006 Applications are built from packagesApplications

1-8 Tutorial@Dortmund, November 2006

ProjectProject• Projects are a collection of packages that are

released together– One project per application (e.g. Brunel,

DaVinci)– Several independent projects for

components (e.g. Lbcom, Rec, Phys)– Two projects for the framework (Gaudi,

LHCb)• Users work in the environment defined for a

given version of the chosen project– e.g. DaVinciEnv v17r5

• Projects are a collection of packages that are released together– One project per application (e.g. Brunel,

DaVinci)– Several independent projects for

components (e.g. Lbcom, Rec, Phys)– Two projects for the framework (Gaudi,

LHCb)• Users work in the environment defined for a

given version of the chosen project– e.g. DaVinciEnv v17r5

Page 9: Overview of LHCb applications and software environmentlhcb.web.cern.ch/lhcb/computing/Frameworks/Gaudi/... · 1-5 Tutorial@Dortmund, November 2006 Applications are built from packagesApplications

1-9 Tutorial@Dortmund, November 2006

CVSCVS

Version Control System• Record the history of

your source files• Helps you if you are

part of a group of people working on the same project.

(Repository, Module, File, Version, Tag)

Version Control SystemVersion Control System• Record the history of

your source files• Helps you if you are

part of a group of people working on the same project.

(Repository, Module, File, (Repository, Module, File, Version, Tag)Version, Tag)

Page 10: Overview of LHCb applications and software environmentlhcb.web.cern.ch/lhcb/computing/Frameworks/Gaudi/... · 1-5 Tutorial@Dortmund, November 2006 Applications are built from packagesApplications

1-10 Tutorial@Dortmund, November 2006

CVS: Common RepositoryCVS: Common Repository

• LHCb Repository on CERN-IT CVS server– Web browsable

– http://isscvs.cern.ch/cgi-bin/cvsweb.cgi/?cvsroot=lhcb– http://isscvs.cern.ch/cgi-bin/cvsweb.cgi/?cvsroot=Gaudi

– World readable if authenticated– Kerberos authentication (e.g. AFS on CERN Linux)

• Configured by LHCb group login at CERN– SSH authentication (e.g. from Windows)– Detailed instructions at

http://cvs.web.cern.ch/cvs/howto.html#accessing

– For write access– register with [email protected]

• LHCb Repository on CERN-IT CVS server– Web browsable

– http://isscvs.cern.ch/cgi-bin/cvsweb.cgi/?cvsroot=lhcb– http://isscvs.cern.ch/cgi-bin/cvsweb.cgi/?cvsroot=Gaudi

– World readable if authenticated– Kerberos authentication (e.g. AFS on CERN Linux)

• Configured by LHCb group login at CERN– SSH authentication (e.g. from Windows)– Detailed instructions at

http://cvs.web.cern.ch/cvs/howto.html#accessing

– For write access– register with [email protected]

Page 11: Overview of LHCb applications and software environmentlhcb.web.cern.ch/lhcb/computing/Frameworks/Gaudi/... · 1-5 Tutorial@Dortmund, November 2006 Applications are built from packagesApplications

1-11 Tutorial@Dortmund, November 2006

CMTCMT

Configuration Management Tool written by C. Arnault (LAL, Orsay)

• It is based around the notion of Package• Provides a set of tools for automating

the configuration and building packages• It has been adopted by LHCb (other

experiments are also using it)

Configuration Management Tool written Configuration Management Tool written by C. by C. ArnaultArnault (LAL, (LAL, OrsayOrsay))

• It is based around the notion of Package• Provides a set of tools for automating

the configuration and building packages• It has been adopted by LHCb (other

experiments are also using it)

Page 12: Overview of LHCb applications and software environmentlhcb.web.cern.ch/lhcb/computing/Frameworks/Gaudi/... · 1-5 Tutorial@Dortmund, November 2006 Applications are built from packagesApplications

1-12 Tutorial@Dortmund, November 2006

How we use CMTHow we use CMT

CMTrequirements

codecodecodecodecode

CVSrepository

•What to build•How to build •Package dependencies

makefileDevStudio files

Buildingtools

(compilers, linkers, IDEs )

Libraries&

Executables

Page 13: Overview of LHCb applications and software environmentlhcb.web.cern.ch/lhcb/computing/Frameworks/Gaudi/... · 1-5 Tutorial@Dortmund, November 2006 Applications are built from packagesApplications

1-13 Tutorial@Dortmund, November 2006

CMT: Requirements fileCMT: Requirements filepackage MyPackageversion v1r0

# Structure, i.e. directories to process.branches cmt doc src

# Package does not export any public include filesinclude_path none

# Used packages.use GaudiAlg v*

# Component library building rulelibrary MyPackage ../src/*.cpp

# define component library link optionsapply_pattern component_library library=MyPackage

package MyPackageversion v1r0

# Structure, i.e. directories to process.branches cmt doc src

# Package does not export any public include filesinclude_path none

# Used packages.use GaudiAlg v*

# Component library building rulelibrary MyPackage ../src/*.cpp

# define component library link optionsapply_pattern component_library library=MyPackage

Page 14: Overview of LHCb applications and software environmentlhcb.web.cern.ch/lhcb/computing/Frameworks/Gaudi/... · 1-5 Tutorial@Dortmund, November 2006 Applications are built from packagesApplications

1-14 Tutorial@Dortmund, November 2006

CMT and projectsCMT and projects• CMTPATH

– The directories to look for CMT packages – Initialised to ~/cmtuser in LHCb login

• CMTCONFIG– The “default” configuration

• <Project>Env [<version>]– Adds to the CMTPATH the path where the project packages

are located and their dependent projects• <Project>_release_area

– Specifies the path to a project, in case it does not reside in the default release area

– Set to be equal $LHCBRELEASES– /afs/cern.ch/lhcb/software/releases @CERN– /software/lhcb/lhcb @UNI-DORTMUND

• CMTPATH– The directories to look for CMT packages – Initialised to ~/cmtuser in LHCb login

• CMTCONFIG– The “default” configuration

• <Project>Env [<version>]– Adds to the CMTPATH the path where the project packages

are located and their dependent projects• <Project>_release_area

– Specifies the path to a project, in case it does not reside in the default release area

– Set to be equal $LHCBRELEASES– /afs/cern.ch/lhcb/software/releases @CERN– /software/lhcb/lhcb @UNI-DORTMUND

Page 15: Overview of LHCb applications and software environmentlhcb.web.cern.ch/lhcb/computing/Frameworks/Gaudi/... · 1-5 Tutorial@Dortmund, November 2006 Applications are built from packagesApplications

1-15 Tutorial@Dortmund, November 2006

CMT: Basic CommandsCMT: Basic Commands• cmt config

– Configures the package (creates setup and make files)

• source setup.csh– Sets environment

• cmt show uses– Show dependencies and actual versions used

• cmt show macro <macro>– Show the value of a macro for the current configuration

• cmt binclean– Clean all binaries (libraries, executables, dictionaries,etc.)

• cmt broadcast <command>– Recursive CMT command in all used packages found on

first component of CMTPATH– e.g. cmt broadcast gmake

• cmt config– Configures the package (creates setup and make files)

• source setup.csh– Sets environment

• cmt show uses– Show dependencies and actual versions used

• cmt show macro <macro>– Show the value of a macro for the current configuration

• cmt binclean– Clean all binaries (libraries, executables, dictionaries,etc.)

• cmt broadcast <command>– Recursive CMT command in all used packages found on

first component of CMTPATH– e.g. cmt broadcast gmake

Page 16: Overview of LHCb applications and software environmentlhcb.web.cern.ch/lhcb/computing/Frameworks/Gaudi/... · 1-5 Tutorial@Dortmund, November 2006 Applications are built from packagesApplications

1-16 Tutorial@Dortmund, November 2006

Package CategoriesPackage Categories• Program: is a package that contains a main

routine and a list of dependent packages needed to link it.

• 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. GaudiSys)

• Interface package: interfacing to packages not managed with CMT (e.g. Python, GSL, ROOT,…)

• Program: is a package that contains a main routine and a list of dependent packages needed to link it.

• 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. GaudiSys)

• Interface package: interfacing to packages not managed with CMT (e.g. Python, GSL, ROOT,…)

Page 17: Overview of LHCb applications and software environmentlhcb.web.cern.ch/lhcb/computing/Frameworks/Gaudi/... · 1-5 Tutorial@Dortmund, November 2006 Applications are built from packagesApplications

1-17 Tutorial@Dortmund, November 2006

Link vs. Component LibrariesLink vs. Component Libraries

• Link libraries are need for linking the program (static or dynamic)– Traditional libraries.

• Component libraries are loaded at run-time (ApplicationMgr.DLLs property)– Collection of components

(Algorithms, Tools, Services, etc.)– Plug-in

• Link libraries are need for linking the program (static or dynamic)– Traditional libraries.

• Component libraries are loaded at run-time (ApplicationMgr.DLLs property)– Collection of components

(Algorithms, Tools, Services, etc.)– Plug-in

Page 18: Overview of LHCb applications and software environmentlhcb.web.cern.ch/lhcb/computing/Frameworks/Gaudi/... · 1-5 Tutorial@Dortmund, November 2006 Applications are built from packagesApplications

1-18 Tutorial@Dortmund, November 2006

Component LibrariesComponent Libraries

#include “GaudiKernel/DeclareFactoryEntries.h”DECLARE_FACTORY_ENTRIES ( Components ) {DECLARE_ALGORITHM( MyAlgorithm )DECLARE_SERVICE( MyService )DECLARE_TOOL( MyTool )

}

#include “GaudiKernel/DeclareFactoryEntries.h”DECLARE_FACTORY_ENTRIES ( Components ) {DECLARE_ALGORITHM( MyAlgorithm )DECLARE_SERVICE( MyService )DECLARE_TOOL( MyTool )

}

Components_load.cppComponents_load.cpp

#include “GaudiKernel/LoadFactoryEntries.h”LOAD_FACTORY_ENTRIES ( Components )#include “GaudiKernel/LoadFactoryEntries.h”LOAD_FACTORY_ENTRIES ( Components )

Components_dll.cppComponents_dll.cpp

Your components need to be added here

Your components need to be added here

No change neededNo change needed

Page 19: Overview of LHCb applications and software environmentlhcb.web.cern.ch/lhcb/computing/Frameworks/Gaudi/... · 1-5 Tutorial@Dortmund, November 2006 Applications are built from packagesApplications

1-19 Tutorial@Dortmund, November 2006

Getting a packageGetting a package

• The “getpack” command– Script combining “cvs checkout” +

“cmt config”

– If no version given, it suggests the latest version of package

– N.B. Suggested version is not necessarily consistent with current environment; especially if you are not using the latest environment

• The “getpack” command– Script combining “cvs checkout” +

“cmt config”

– If no version given, it suggests the latest version of package

– N.B. Suggested version is not necessarily consistent with current environment; especially if you are not using the latest environment

> getpack [hat/]<package> [<version>] [head]> getpack [hat/]<package> [<version>] [head]

Page 20: Overview of LHCb applications and software environmentlhcb.web.cern.ch/lhcb/computing/Frameworks/Gaudi/... · 1-5 Tutorial@Dortmund, November 2006 Applications are built from packagesApplications

1-20 Tutorial@Dortmund, November 2006

Building a packageBuilding a package• Working in the /cmt directory

– <package>/<version>/cmt• Invoke the make command

• Working in the /cmt directory– <package>/<version>/cmt

• Invoke the make command

> make [target] [tag=<configuration>] [clean]

configurations: $CMTCONFIG (default)$CMTDEB (for debug)

> make [target] [tag=<configuration>] [clean]

configurations: $CMTCONFIG (default)$CMTDEB (for debug)

• Set the run time environment– Not needed for building– MANDATORY TO RUN THE PROGRAM

• Set the run time environment– Not needed for building– MANDATORY TO RUN THE PROGRAM

> source setup.csh [-tag=<configuration>]> source setup.csh [-tag=<configuration>]

Page 21: Overview of LHCb applications and software environmentlhcb.web.cern.ch/lhcb/computing/Frameworks/Gaudi/... · 1-5 Tutorial@Dortmund, November 2006 Applications are built from packagesApplications

1-21 Tutorial@Dortmund, November 2006

CMT: 5 magic linesCMT: 5 magic lines• Experience shows that 90-95% of “misterios” problems

(compile-time and run-time) are due to misconfiguration• Please pay attention to correct configuration!• Many problems could be detected/eliminated by 5 magic

CMT-lines– cmt show uses [ | grep cmt ]

• Show dependencies and actual versions used

– cmt br make binclean• Cleanup ALL LOCAL packages

– cmt bt cmt config• Re-configures all local package

– cmt br make• Re-build all local packages

– source setup.csh• Sets environment

• Experience shows that 90-95% of “misterios” problems (compile-time and run-time) are due to misconfiguration

• Please pay attention to correct configuration!• Many problems could be detected/eliminated by 5 magic

CMT-lines– cmt show uses [ | grep cmt ]

• Show dependencies and actual versions used

– cmt br make binclean• Cleanup ALL LOCAL packages

– cmt bt cmt config• Re-configures all local package

– cmt br make• Re-build all local packages

– source setup.csh• Sets environment

Page 22: Overview of LHCb applications and software environmentlhcb.web.cern.ch/lhcb/computing/Frameworks/Gaudi/... · 1-5 Tutorial@Dortmund, November 2006 Applications are built from packagesApplications

1-22 Tutorial@Dortmund, November 2006

Emacs customisationEmacs customisation• A customisation of emacs for LHCb:

– Templates for creation of files– E.g. MyAlgorithm.h, .cpp, <Components>_load.cpp,

<Components>_dll.cpp, requirements 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

• A customisation of emacs for LHCb:– Templates for creation of files

– E.g. MyAlgorithm.h, .cpp, <Components>_load.cpp, <Components>_dll.cpp, requirements 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

Page 23: Overview of LHCb applications and software environmentlhcb.web.cern.ch/lhcb/computing/Frameworks/Gaudi/... · 1-5 Tutorial@Dortmund, November 2006 Applications are built from packagesApplications

1-23 Tutorial@Dortmund, November 2006

ExerciseExercise

Now read the web page attached to this lesson in the agenda and work through the exercises

Now read the web page attached to this Now read the web page attached to this lesson in the agenda and work through lesson in the agenda and work through the exercisesthe exercises


Recommended