Difference between revisions of "GettingStarted Software"

From Xem2
Jump to navigationJump to search
Line 1: Line 1:
 
==Hall C Software for XEM2==
 
==Hall C Software for XEM2==
 
We are using all standard equipment and thus the standard hall C analyzer (hcana).   
 
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 <font size="+0.25"><font color="Black">'''Collaborate'''</font></font>!  We can independently work on different calibrations / scripts / etc and bring all of our changes together to spread out the workload.
 
 
===Hierarchy Visualization===
 
[[Image:Git_Collab.jpg]]
 
 
===Setting SSH for GitHub at JLab===
 
#Generate ssh key if you do not have one.
 
##ssh-keygen (when prompted for file in which to save the key and pass phrase, just hit return )
 
#Put ssh public key on Github
 
## Open "Settings" from the pull down menu in the top right.
 
## Go to "SSH and GPG keys"
 
## Click on "new ssh key" button. At terminal type "more ~/.ssh/id_rsa.pub". Copy the code and paste into github.
 
#*Note: The ssh key may not work right away. If this happens, just log off from the iFarm machine and wait a few minutes for the key to start working. You may be unable to login to the iFarm for a few minutes, this is OK. Once you are able to login to the iFarm again the ssh key should be working, so you should be able to start cloning remote repositories.
 
  
 
==Sourcing our Software==
 
==Sourcing our Software==

Revision as of 16:59, 28 February 2023

Hall C Software for XEM2

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

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
  • Make sure hcana can be run from any directory. For more information on the replay and hcana, go to the REPLAY page.
    • Don't run source script in a directory that has a setup.csh script (home should be ok)

Git Commands and Setup

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