The Examples

这三个软件包是三个典型的Algrithm Tool和Service的软件包,可以用作用户编写三种软件包的参考


How to run the example: helloAlg


  1. 建立LodeStar某一个release的环境,目前可用的是:
    • source /afs/ihep.ac.cn/soft/LHAASO/LodeStar-SLC6/Pre-Release/L19-Pre1_v1r1/setup.sh
  2. 在你的任意一个文件夹中,创建一个project, 名为myproject,并转到到myproject中去
    • cmt create_project myproject
    • cd myproject
  3. 创建一个Examples文件夹,并进入该文件夹(由于helloXXX软件包在官方软件中都存储在Examples文件夹中,相互关联也都指向Examples路径,如果因为某种原因不使用该路径,就需要在软件包下载后,修改相应软件包的关联文件requirements中的路径指向)
    • mkdir Examples
    • cd Examples
  4. Download helloAlg:
  5. 编译helloAlg
    • cd helloAlg/cmt
    • cmt br cmt config
    • source setup.sh
    • cmt br cmt make
  6. 编译成功后,到share文件夹内执行可执行程序run.py, 从log中可以看出helloAlg如何调用了helloSvc/helloTool
    • cd ../share
    • python run.py

Create your own package

A regular way to make your own package is to use: cmt create myPacakge V0, but the created directory contains much little information, which need to be filled MANNUALLY.

An easiest way suggested here is to download an example of helloAlg/helloSvc/helloTool, and change all the kayword, such as helloAlg, to "myPackage"

  1. svn co http://svn.lhaaso.ihep.ac.cn/People/zhucg/tags/Examples/helloAlg/v1.0/ helloAlg
  2. svn co http://svn.lhaaso.ihep.ac.cn/People/zhucg/tags/myProject/v3.0/bashTools/ bashTools #download our macros to help you change the keyword
  3. source ./bashTools/changeWordAllFile.sh helloAlg myPackage

-- 祝 成光 - 2020-04-30


Edit | Attach | Watch | Print version | History: r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r2 - 2020-07-06 - ZhuChengguang
  • Edit
  • Attach
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2022 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback