How to make your own package on linux

Steps to install (do only once)

  • first on your linux machine, mkdir MyCode // to put your code in this dir, you can use any other name you want

    // configure the package
    cd RootCore

    //and seup the envionments
    cd -
    . RootCore/scripts/

setup rootcore

     .   /sw/lcg/external/root/5.27.04/slc4_ia32_gcc34/bin/  \\ setup root.
     .   $HOME/MyCode/RootCore/scripts/   // set up rootcore environment

build your standalone packge

    // you can use RootCore to help you to build a empty package
     .  RootCore/scripts/  ComputeTGCpoints    // build a pcakge,  name is ComputeTGCpoints,  you can choose package name what you like.  After it, you will see a directory ComputeTGCpoints

   //  you can build the package in a sub-directory too
   mkdir subDir
    .  RootCore/scripts/  subDir/ComputeTGCpoints    

     // you can see the sub directory of the package are built for you
     ComputeTGCpoints/Root   // here you put  .cxx files,   
     ComputeTGCpoints/ComputeTGCpoints    // here you put .h files

  • You need change the file ComputeTGCpoints/Root/LinkDef.h after you define class
  • see examples of .cxx and .c in /raid5/zhucg/MyCode/ComputeTGCpoints

You can copy a existing package to here

  • cp -r /raid5/zhucg/MyCode/RawDataReader ./subDir

build a main function to use your package or other people's package

     //// RootCore will  look  for all packages in MyCode and its sub directories, no matter it is created by RooCore or copied from elswhere and compile them 

     // also clean them
     RootCore/scripts/   //  clean all compiled packages, if needed.

     edit a file main.cxx  // example is in /raid5/zhucg/MyCode/
     edit a file Makefile  // example is in /raid5/zhucg/MyCode/
     gmake  // compile the main.cxx
    ./main.exe    // run your compiled routine.

thing to be noted:

  • standalone package do one work
  • you can have many standalone package
  • main function is just the main function, it will use standdard alone packages to work
  • people can share standardalone packages.
Topic attachments
I Attachment History Action Size Date Who Comment
Unknown file formatgz RootCore.tar.gz r1 manage 50.9 K 2012-11-16 - 07:54 ChengguangZhu  
Edit | Attach | Watch | Print version | History: r6 < r5 < r4 < r3 < r2 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r6 - 2014-04-10 - ChengguangZhu
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    Main All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback