Difference between revisions of "NPS Software"
Jump to navigation
Jump to search
Line 9: | Line 9: | ||
** mkdir "name" ( make a subdirectory with your "name") | ** mkdir "name" ( make a subdirectory with your "name") | ||
** cd "name" | ** cd "name" | ||
− | ** | + | ** git clone https://github.com/"githubUserName"/hcana |
** cd hcana | ** cd hcana | ||
** git submodule init | ** git submodule init | ||
Line 21: | Line 21: | ||
** mkdir "name" ( make a subdirectory with your "name") | ** mkdir "name" ( make a subdirectory with your "name") | ||
** cd "name" | ** cd "name" | ||
− | ** | + | ** git clone https://github.com/"githubUserName"/hcana |
** cd hcana | ** cd hcana | ||
** git submodule init | ** git submodule init | ||
Line 42: | Line 42: | ||
** git clone https://github.com/"githubUserName"/nps_replay | ** git clone https://github.com/"githubUserName"/nps_replay | ||
** cd nps_replay | ** cd nps_replay | ||
+ | ** git remote add --track main upstream https://github.com/JeffersonLab/nps_replay | ||
** mkdir /data1/cdaq/eel108/output/ROOTfiles/"name" | ** mkdir /data1/cdaq/eel108/output/ROOTfiles/"name" | ||
** ln -sf /data1/cdaq/eel108/output/ROOTfiles/"name" ROOTfiles | ** ln -sf /data1/cdaq/eel108/output/ROOTfiles/"name" ROOTfiles | ||
Line 65: | Line 66: | ||
** git clone https://github.com/"githubUserName"/nps_replay | ** git clone https://github.com/"githubUserName"/nps_replay | ||
** cd nps_replay | ** cd nps_replay | ||
+ | ** git remote add --track main upstream https://github.com/JeffersonLab/nps_replay | ||
** mkdir /volatile/hallc/nps/"name" | ** mkdir /volatile/hallc/nps/"name" | ||
** mkdir /volatile/hallc/nps/"name"/ROOTfiles | ** mkdir /volatile/hallc/nps/"name"/ROOTfiles | ||
Line 95: | Line 97: | ||
* Encouraged to use this git workflow for both the hcana and nps_replay repos | * Encouraged to use this git workflow for both the hcana and nps_replay repos | ||
* Fork from the JeffersonLab to your personal github account | * Fork from the JeffersonLab to your personal github account | ||
− | * | + | * For hcana: |
− | * This creates a remote alias called "origin" | + | ** git clone https://github.com/"githubUserName"/hcana |
− | * "git | + | ** This creates a remote alias called "origin" that is link to https://github.com/"githubUserName" |
+ | ** git remote add --track develop upstream https://github.com/JeffersonLab/hcana" | ||
+ | ** It is an historical accident that for "hcana" repo we have been using the branch "develop" as the main branch for the repo. | ||
+ | ** When working in hcana, make a new branch | ||
+ | ** git checkout -b "newbranch" | ||
+ | ** If you make a change that you would like others to test or eventually become part of the Jefferson Lab repo | ||
+ | *** Commit your changes in the "newbranch" | ||
+ | *** Push your changes to your personal github account | ||
+ | *** Make a pull request to JeffersonLab repo | ||
+ | **Once your commit is accepted | ||
+ | ** git checkout develop | ||
+ | ** git pull upstream develop | ||
+ | ** Check that hcana works as you expect | ||
+ | ** If hcana works as expect then you can delete "newbranch" locally and on the remote repo | ||
+ | *** git branch -d newbranch | ||
+ | *** git push origin --delete newbranch | ||
+ | **Now you can create another new branch to make additional changes | ||
== Miscellaneous Support Repos == | == Miscellaneous Support Repos == |
Revision as of 09:46, 17 March 2023
NPS Software Meetings
Setting up HCANA Instructions
- Fork a git repo from https://github.com/JeffersonLab/hcana
Starting on the cdaql3 machines
- login into cdaql3 through the gateway
- cd /data1/cdaq/eel108
- mkdir "name" ( make a subdirectory with your "name")
- cd "name"
- git clone https://github.com/"githubUserName"/hcana
- cd hcana
- git submodule init
- git submodule update
- git remote add --track develop upstream https://github.com/JeffersonLab/hcana
- source /apps/root/PRO/setroot_CUE.csh
- scons
Starting on the ifarm machines
- login into ifarm
- cd /group/nps
- mkdir "name" ( make a subdirectory with your "name")
- cd "name"
- git clone https://github.com/"githubUserName"/hcana
- cd hcana
- git submodule init
- git submodule update
- git remote add --track develop upstream https://github.com/JeffersonLab/hcana
- source /apps/root/PRO/setroot_CUE.csh
- scons
- Now you have a working hcana binary.
Setting up NPS replay directory instructions
- Fork a git repo from https://github.com/JeffersonLab/nps_replay
Starting on the cdaql3 machines:
- login into cdaql3 through the gateway
- if you have not set up you own subdirectory:
- cd /data1/cdaq/eel108
- mkdir "name" ( make a subdirectory with your "name")
- cd "name"
- if you have subdirectory
- cd /data1/cdaq/eel108/"name"
- git clone https://github.com/"githubUserName"/nps_replay
- cd nps_replay
- git remote add --track main upstream https://github.com/JeffersonLab/nps_replay
- mkdir /data1/cdaq/eel108/output/ROOTfiles/"name"
- ln -sf /data1/cdaq/eel108/output/ROOTfiles/"name" ROOTfiles
- mkdir /data1/cdaq/eel108/output/REPORT_OUTPUT/"name"
- mkdir /data1/cdaq/eel108/output/REPORT_OUTPUT/"name"/NPS
- mkdir /data1/cdaq/eel108/output/REPORT_OUTPUT/"name"/NPS/eel108
- ln -sf /data1/cdaq/eel108/output/REPORT_OUTPUT/"name" REPORT_OUTPUT
- ln -sf /data1/cdaq/NPS/ cache ( do not have access to cache disk)
- ln -sf /data1/cdaq/NPS/ raw
- if you are using you own hcana
- ln -sf ../hcana/hcana
- if you want to use the standard hcana
- ln -sf /data1/cdaq/eel108/mkjones/hcana
Starting on the ifarm machines
- if you are not in the c-nps group then email jones@jlab.org
- to see what groups you are in type:"groups" when on the CUE machines.
- if you have not set up you own subdirectory:
- cd /group/nps
- mkdir "name" ( make a subdirectory with your "name")
- cd "name"
- if you have subdirectory
- cd /group/nps/"name"
- git clone https://github.com/"githubUserName"/nps_replay
- cd nps_replay
- git remote add --track main upstream https://github.com/JeffersonLab/nps_replay
- mkdir /volatile/hallc/nps/"name"
- mkdir /volatile/hallc/nps/"name"/ROOTfiles
- ln -sf /volatile/hallc/nps/"name"/ROOTfiles ROOTfiles
- mkdir /volatile/hallc/nps/"name"/REPORT_OUTPUT
- mkdir /volatile/hallc/nps/"name"/REPORT_OUTPUT/NPS
- mkdir /volatile/hallc/nps/"name"/REPORT_OUTPUT/NPS/eel108
- ln -sf /volatile/hallc/nps/"name"/REPORT_OUTPUT REPORT_OUTPUT
- ln -sf /cache/mss/hallc/c-nps/raw raw
- if using your own hcana binary
- ln -sf ../hcana/hcana
- if you are not in the c-nps group then email jones@jlab.org
Analyzing data
- on cdaql3
- cd /data1/cdaq/eel108/"name"/nps_replay
- On ifarm
- cd /group/nps/"name"/nps_replay
- ./hcana
- At the analyzer prompt
- .x SCRIPTS/NPS/eel108_replay.C(nrun,nevents)
- If events = -1 , then replay all events.
- It is slow because we are reading sample data for all FADc channels for each event
- Root file is output to the ROOTfiles directory.
Analysis info
Run spreadsheet EEL108
Git workflow
- Encouraged to use this git workflow for both the hcana and nps_replay repos
- Fork from the JeffersonLab to your personal github account
- For hcana:
- git clone https://github.com/"githubUserName"/hcana
- This creates a remote alias called "origin" that is link to https://github.com/"githubUserName"
- git remote add --track develop upstream https://github.com/JeffersonLab/hcana"
- It is an historical accident that for "hcana" repo we have been using the branch "develop" as the main branch for the repo.
- When working in hcana, make a new branch
- git checkout -b "newbranch"
- If you make a change that you would like others to test or eventually become part of the Jefferson Lab repo
- Commit your changes in the "newbranch"
- Push your changes to your personal github account
- Make a pull request to JeffersonLab repo
- Once your commit is accepted
- git checkout develop
- git pull upstream develop
- Check that hcana works as you expect
- If hcana works as expect then you can delete "newbranch" locally and on the remote repo
- git branch -d newbranch
- git push origin --delete newbranch
- Now you can create another new branch to make additional changes
Miscellaneous Support Repos
Please post supporting scripts, online displays, debugging code, etc below. (Github repo links please!)
- Pramita's SHMS Preshower macros
- ADD NEW REPOS HERE