230 likes | 250 Views
Explore the history, structure, and tools of the BESIII offline software system, including the BOSS package, version details, and development environment. Learn about the Configuration Management Tool (CMT) and its role in software production. Discover package types, requirements, and usage in physics research experiments.
E N D
BESIII Offline Software Development Environment * Development environment * Configuration & management tool * Software development in BOSS Ma qiumei 2004.5.26
Part I : Development environment • History of BESIII offline software system • BOSS package structure • Development environment 12th BES Annual Meeting
History of BESIII offline software system • Besfv1 : The original version based on belle • Besfv2 : Improving with babar, gaudi … • Besfv3 : New building tools—CMT added • BOSSv1.0.0 : The testing version based on Gaudi • BOSSv2.0.0 : The current version 12th BES Annual Meeting
BOSS package structure (1) • The boss packages in boss/2.0.0 /BesPolicy -- define some standard patterns /BesCxxPolicy -- define standard patterns for c++ compilier /BesFortranPolicy -- define standard patterns forfortran compilier /BesRelease -- for all packages release /Calibration -- for calibration /Calorimeter -- for Calorimeter /Control /Database -- the data IO of database /DetectorDescription -- for detectors’ description /Event -- for every type event /EventDisplay -- the interface for event display Based on Athena 12th BES Annual Meeting
BOSS package structure (2) /EventFilter --for event filter /External -- enviroments for external libs /MDC -- for main drift chamber /MuonCounter --for muon counter /PhyTool -- some tools for physics analysis /Reconstruction -- for reconstruction /Simulation -- for simulation /TestRelease -- for some test release /TOF -- for time /Trigger -- for trigger /Utilities -- for some utilities • More details please see the website: http://koala.ihep.ac.cn/cgi-bin/viewcvs.cgi/BossCvs 12th BES Annual Meeting
Development enviroment • Machine: koala.ihep.ac.cn(PC server) • OS : Linux-7.2 • Compiler : gcc-2.95 • Framework : Besfv3 • External Libs: CERNLIB、ROOT、PGSQL、CLHEP • Developing language : C++ • Database : PostgreSql • Version management tool : CVS • Browsing files in CVS repository :ViewCVS • Configuration management tool : CMT 12th BES Annual Meeting
Part II:Configuration & management tool • Brief introduction of CMT • Types of package • Brief introduction of requirements • Useful variables and commands 12th BES Annual Meeting
CMT-- Configuration management tool • A set of tools and conventions • Structure software development or production • Organise software into packages • Describe package properties • Describe package constituents • Operate the software production (management, build, import/export, etc...) • by transparently configuring and driving the various conventional tools (CVS, make, MSDev, Web, tar, compilers, linkers, archivers, etc...) 12th BES Annual Meeting
Who are using CMT • The physics research experiments using CMT as the following: a.. Virgo b.. LHCb c.. GLAST d.. Atlas e.. Nemo f.. Opera g.. Planck h.. Auger i.. GANIL j.. GAM • Related documents pls see such website: http://www.cmtsite.org http://atlas.web.cern.ch/Atlas/Groups/software/oo/tools/cmt http://calib0/public_html/group/source_man.html 12th BES Annual Meeting
Types of package Packages may have particular semantics • Normal packages provide software or documents • Container packages manage other packages • Policy packages hold specifications for project-wide policies • External packages install external software into the CMT conventions CLHEP , ROOT , CERN , etc… 12th BES Annual Meeting
area / package-name / version-tag / cmt / requirements src / sources package-name / headers linux-i686 / Linux binaries test /test application …… Public release Private dev. Common software Inter-project com. Domain specific dev. Automatically created at build time and on demand according to cmt system A-00-00-01 A-01-00-02 A-03-01-01 Search list defined in CMTPATH • Specified at package creation • Obtained by cmt checkout The directory structure of a package 12th BES Annual Meeting
The requirements file The requirements file centralizes all configuration parameters Make macros and environment variables and their possible values on various platforms, sites, environments Author(s), manager(s) Customization for new languages, or document generators • Constituents • Libraries • Applications • generated documents The requirements file • Structural information • specialized directory structure • used packages • links to external packages Definition of conventional behavioural patterns Sufficient for transparently generating all required makefiles and setup scripts, or for launching test procedures. They are the sources of all queries. 12th BES Annual Meeting
BesGeoMdc BesGeoMdc-00-* BesRelease BesRelease-00-00-01 use BesPolicy BesPolicy-01-* MDCGeomSvc MDCGeomSvc-00-00-01 use External/CLHEP CLHEP-00-01-* use use Release area use CLHEP use use use MDCGeomSvc MDCGeomSvc-01-00-01 External area User area Global software organization use 12th BES Annual Meeting
Useful variables and commands (1) • The CVSROOT environment variable • Default value on koala is: :pserver:username@koala.ihep.ac.cn:/bes/bes • The CMTCONFIG environment variable - Default value on koala is :Linux-i686 • The CMTPATH environment variable • Locations that CMT looks in to locate packages continue… 12th BES Annual Meeting
Useful variables and commands (2) • The CMT command Basic Syntax: cmt <verb> [ -<option>=<value> <parameters…> ] • Main commands cmt config re-configure a package cmt create …create a new package cmt show … monitors configuration parameters cmt broadcast … launch shell command over several packages cmt co … interface to CVS’ checkout operation cmt help get the list of possible commands source cleanup.sh undo the source setup source setup.sh do the source setup 12th BES Annual Meeting
Part III : Software development in BOSS • Creating a new package • Building a package • Checking out a package from CVS • Checking in to CVS 12th BES Annual Meeting
Creating a new package • Choosing a location • i.e. Which area? … e.g. Your private dev. • Choosing a name • Must be a unique package name in boss (should not either just differentiate by case of letters) • Choosing a version • The command as listed below: cmt create A A-00-00-01 12th BES Annual Meeting
Building a package • The basic development cycle • Set enviroment Vi ../cmt/requirements • Compile vi ../src/… • Build source setup.sh gmake • Test (if available) (default settings is debug) (build the debug version by default) (switch to the optimized settings) (now build the optimized version) 12th BES Annual Meeting
> cmt create A A-00-00-01 > cd A/A-00-00-01/cmt > vi requirements > vi A.cxx B.cxx C.cxx > gmake > . setup.sh > ../${CMTCONFIG}/A.exe 1) Create a new package and move to it 2) Describe the package 3) Create the package items and build them 4) set the environment and run package A use BesPolicy BesPolicy-01-* application A A.cxx B.cxx C.cxx Examples… • The simplest one • One new application with (some) source file(s) 12th BES Annual Meeting
Checking out a package from CVS • Getting a package out from CVS to modify it • Go to your private development area • Checkout the package cmt co A or cmt co –r A-00-00-01 A • Modify • Test 12th BES Annual Meeting
Checking in to CVS • Checking in to CVS cvs import –m “**” BossCvs/A Bes A-00-00-01 Note: set the right CVSROOT e.g. export CVSROOT=“:pserver:username@koala.ihep.ac.cn:/bes/bes” 12th BES Annual Meeting
Conclusions and Outlook • CMT was used to- organize BES III software and external libraries e.g CLHEP, cernlib etc- configure and build software packages- publish releases • The friendly environment based on CVS, ViewCVS and CMT was successfully setup for software developers. • In near future - move to Santest farm- integration with BOOST 12th BES Annual Meeting
Thank you! 12th BES Annual Meeting