GettingStarted Software

From Xem2
Revision as of 10:49, 30 August 2021 by Cmorean (talk | contribs)
Jump to navigationJump to search

Hall C Software for XEM2

We are using all standard equipment and thus the standard hall C analyzer (hcana).

Coding Paradigm

Resposibility

Prior to 2021, Abishek Karki replayed all the data for the XEM and F2 analyses. For all future passes of 2022 data, Casey Morean is in charge of maintaining the codebase.

Hierarchy

  • Git is used as version control for all shared code
  • Casey (https://github.com/mrcmor100) has forked from all relevant JeffersonLab (https://github.com/JeffersonLab) repositories
    • All XEM group members other than Casey only need to worry about changes to Casey's repositories.
    • Casey is in charge of pulling changes from the JeffersonLab repositories.
  • All XEM group members will 'Fork' Casey's repository, which will appear on their GitHub account, that is your 'origin'.
    • Changes can be made on a 'local' branch and then pushed to your 'origin'.
    • Once you have pushed your changes to your 'origin', you can make a pull request to Casey add your changes into 'upstream'.
  • Communications about new features / calibrations / etc will be sent via the Software Slack channel. Feel free to also watch Casey's repositories for email notifications.

Remember: The point of this scheme is for us to Collaborate! We can independently work on different calibrations / scripts / etc and bring all of our changes together to spread out the workload.

Setting SSH for Git at JLab

Setup ssh on JLab Computer:

  1. Generate ssh key if you do not have one.
    1. ssh-keygen -t dsa ( when prompted for pass phrase just hit return )
    2. ssh-add ~/.ssh/id_dsa
  2. Put ssh public key on Github
    1. Open the "Settings" in the pull down menu on the extreme right.
    2. Go to "SSH keys"
    3. Click on "new ssh key" button. At terminal type "more ~/.ssh/id_dsa.pub". Copy the code and paste into github.

Hierarchy Visualization

Git Collab.jpg

Sourcing our Software

Versioning

Analysis relies on CERN ROOT and HCANA as well as the mc-single-arm and other repositories. In order to maintain the newest version and work using the same software, a software directory has been made on our group disk:

  • /group/c-xem2/software/
  • We are currently operating with Version 1.0.0 of the XEM software package:
    • HCANA v0.90.00 (Develop 9d6b290)
    • CERN ROOT v6.22.06
    • Python v3.4.6

Sourcing Instructions

Users have access to the common users environment, and our /group/ location.

  • For join the xem2 group on JLab computers talk to Dave.

In order to source the files, simply source the setup.sh or setup.csh (depending on your shell).

  • Located at /group/c-xem2/software/

You should add the sourcing of the setup script to your .cshrc or .bashrc file (depending on your shell).

Check Everything is Working

  • Type python --version, and it should return the correct version
    • Make sure you can load ROOT in python (import ROOT as R)
  • Open root-config --version and check the version number
  • Make sure the hadd utility works
  • Go to YOUR hallc_replay_XEM and add a symlink to hcana. For more information on the replay and hcana, go to the REPLAY page.

Git Commands and Setup

  • Create GitHub account
  • Add SSH keys to JLab computers
  • Examples workflow and practice with trial repo.