Presentation is loading. Please wait.

Presentation is loading. Please wait.

The report on the current situation of the BESIII framework zhangxiaomei maqiumei 10/3/2004.

Similar presentations


Presentation on theme: "The report on the current situation of the BESIII framework zhangxiaomei maqiumei 10/3/2004."— Presentation transcript:

1 The report on the current situation of the BESIII framework zhangxiaomei maqiumei 10/3/2004

2 The version distribution situation (framework binary codes area) The original version completely based on belle(v1) The version improving with other frameworks like babar, gaudi(v2) The version with the new building tools — CMT(v3) The future version based on Gaudi

3 Source Code arrangements in CVS (source code saving area) The three branches under CVSROOT represents three main versions of BesIII frameworks. bes  offline  boss In offline(besf3.0.0verison) directory More details please see the website:http://koala.ihep.ac.cn/cgi-bin/viewcvs.cgi/ BesPolicy -- some common CMT definitions BesRelease – for besf3.0.0 release Database DetectorDescription Event External -- enviroments for external libs TestDatabase framework reco

4 Fouse on the version BESF3.0.0 The brief introduction about BESF3.0.0  the differences from other versions  the release of BESF3.0.0 How to use BESF3.0.0  a brief introduction on building and configuration tools --CMT  the steps of building your own modules

5 The differences from other versions The most stable version now (most of reco and simu developers will use it for a long period time) Provide more help and introductions for users Based on belle, having some advantages from other frameworks Using CMT to do the configuration and building job

6 The release of BESF3.0.0 On Koala machine :.exe files located in: /bes/sw/dist/offline/3.0.0/InstallArea/bin Lib files located in: /bes/sw/dist/offline/3.0.0/InstallArea/lib Source Files located in CVS: CVSROOT/offline/

7 A brief introduction on building and configuration tools --CMT CMT (configuration management tools) The materials for CMT beginners: Teng-tao ’ s report on > > video > CMT environment setup in the koala machine Bash as exmple: 1)setup enviroment for CMT tool (setupCMT.sh) 2)specify your own WorkArea in the requirements(copy from ~maqm/cmthome): macro WorkArea "${HOME}/mytest “ path_prepend CMTPATH "${WorkArea} “ 3) setup enviroment for Besf3.0.0 use the above requirement to generate shell files, then source it.

8 How to use BESF3.0.0 --step1:Create a new package >cd >cmt create Example: >cmt create test v1 the following files and directories will be created automatically: src/ directory for source files and private include files cmt/ directory for CMT requirements You also can create some directories to meet your needs, such as: /, test/, doc/, share/, README/, ChangeLog/

9 How to use BESF3.0.0 --step2:Write requirements file package BesGeoMdc author "ma_qiumei" version v1 branches cmt src BesGeoMdc run share changelog public use FramePolicy v1 BesPolicy use PGSQL v1 External include_dirs "$(BESGEOMDCROOT)" library BesGeoMdc *.cxx ##application BesGeoMdc *.cxx apply_pattern package_linkopts apply_pattern package_stamps apply_pattern ld_library_path

10 How to use BESF3.0.0 --step3: writing your own modules(1) class ModuleGen : public BesModule { public: ModuleGen(const std::string& ModuleName, BesFramework* frame); ~ModuleGen(){}; void init(int*); void begin_run(BesEvent*, int*); void event(BesEvent*, int*); void term(void){}; void end_run(BesEvent*, int*); void other(int*, BesEvent*, int*){}; private: float P_t_cut; std::string filename; }; Write your own modules (for example: ModuleGen) which must inherit from BesModule class and override member functions.

11 How to use BESF3.0.0 --step3: writing your own modules(2) #include "BesKernel/BesFactoryMacro.h" #include "Test/ModuleGen.h “ #include “ Test/ModuleCC.h ” DECLARE_MODULE_FACTORY( ModuleGen ); DECLARE_MODULE_FACTORY( ModuleCC ); DECLARE_FACTORY_ENTRIES( Test ) { DECLARE_MODULE( ModuleGen ); DECLARE_MODULE( ModuleCC ); } LOAD_FACTORY_ENTRIES( Test ); create factories for each modules in create factories for each modules in Test_Factories.cxx. Test_Factories.cxx. more details please see > Huang-xintao >

12 How to use BESF3.0.0 --step4: building your codes with CMT >cmt config >source setup.sh >gmake clean >gmake

13 How to use BESF3.0.0 --step5: checking your binary codes(1) Run your.exe file After gmake succesfully,you can run *.exe without the help of besf. For exmaple: >test.exe Run your module in besf 1) get shell script( Suppose in cmt directory) cp ~maqm/testwork/framework/Test/share/Test_release.sh../share 2) source Test_release.sh under the directory run, run besf.exe, testing modules using job cards. >cd../run >source../share/Test_release.sh >besf.exe < *.txt

14 How to use BESF3.0.0 --step6: writing your job cards(2) framework loglevel 2 framework add_dll Test Histogram framework configure service register BesRawEventInput BesEventOutput BesPawHistogramSvc service inputsvc BesRawEventInput service outputsvc BesEventOutput histogram my.hbook HBOOK framework initialize module register BesTest path add_module main BesTest table save bestdf_all output open mysave.dat proc rawdata.raw 0 output close Quit More details please see > A simple example for job cards:

15 How to use BESF3.0.0 --step7: Import a new package into CVS First,you should check your CVSROOT > cvs login Maqm@koala.ihep.ac.cnMaqm@koala.ihep.ac.cn export CVSROOT= “ :pserver:maqm@koala.ihep.ac.cn:/bes/bes ” Second,you should remove all files you don ’ t want to import,e.g. setup.sh. Then set CVSIGNORE to avoid them. export CVSIGNORE='setup.* cleanup.* *.make Makefile Linux-* ‘ Lastly,import package to cvs cd / cvs import – m “ First import ” offline/ Bes e.g. you want to import package test, you can do: >cd test/v1 >cvs import – m “ First import ” offline/test Bes v1

16 How to use BESF3.0.0 --step8: Check out a package from CVS(1) Go to your working area and do : cmt co -o offline -r e.g. > cmt co -r v2r1 framework/BesKernel >cmt co framework/BesKernel

17 How to use BESF3.0.0 --step8: Check out packages using containers(2) Container also a package, who manages other packages, such as BesRelease. A example, you want to check out all the packages in Besf3.0.0 with BesRelease Go to your working area and do: >cmt co BesRelease >cmt co – requirements BesRelease/*/cmt/requirements

18 How to use BESF3.0.0 --step9: Commit changes to a package First, make sure your changes work well before committing. Go to the package's version directory: >cd / / >cvs -n update Before commiting, Update the ChangeLog file: write a short summary of the changes you made which files you made them too, and why. To commit your changes, go to the package directory and type >cvs commit -m 'message' More details please see Teacher Li-weidong >

19 How to use BESF3.0.0 --step10: about the version of a package The format of the version number is e.g. v2r1p2 If you made a simple bug fix which doesn't change any interface (i.e. header file), increase the patch id. Clients of your package should not need to recompile. If you made improvements which are backward compatible, e.g adding new features to the interface but not changing the exisiting interface, increase the minor id. Client will have to recompile but should not need to be changed unless they choose to use the new functionality. If you really change the interface, increase the major-id. Clients will have to be modified before they can be compiled against this new version.

20 An Example in BESF3.0.0 You can learn from it: how to write a module, build a share library, write a job card, and runing module in Besf3.0.0. The location framework/Test/ How to use it >cmt co framework/Test >cd framework/Test/v2r1/run >source../share/Test_links.sh >besf.exe <*.txt

21 Any questions?


Download ppt "The report on the current situation of the BESIII framework zhangxiaomei maqiumei 10/3/2004."

Similar presentations


Ads by Google