Difference between revisions of "NPS Software"

From Cuawiki
Jump to navigation Jump to search
 
(35 intermediate revisions by 4 users not shown)
Line 2: Line 2:
 
* [[Meetings#DAQ/ELECTRONICS/ANALYZER|DAQ/Software Meeting Notes]]
 
* [[Meetings#DAQ/ELECTRONICS/ANALYZER|DAQ/Software Meeting Notes]]
  
== HCANA Instructions ==
+
== NPS Software Meetings ==
From [[Meeting-09222022|Sept 22, 2022 DAQ/Software Meeting]]
+
* [[NPS Tree variables]]
* "Working" decode software (hcana and replay dir) for EEL108 data (cdaql3:/data1/cdaq/NPS/vme2_7.evio.0) is now available:
 
** https://github.com/dhamilton-glasgow/hcana/tree/nps_develop
 
** https://github.com/dhamilton-glasgow/hallc_replay/tree/nps_develop
 
  
* Based on the hcana classes and replay files developed by Steve Wood and Carlos Yero. Still some issues to be tidied up, but it already decodes writes the 26-sample waveform to a root tree.  
+
== Setting up HCANA and NPSlib, nps_replay Instructions ==
 +
=== Git repos  ===
 +
* Setup a github.com account
 +
* Fork a git repo from https://github.com/JeffersonLab/hcana
 +
* Fork a git repo from https://github.com/JeffersonLab/NPSlib
 +
* Fork a git repo from https://github.com/JeffersonLab/nps_replay
 +
===Starting on the cdaqll machine===
 +
* login into cdaql1 through the gateway
 +
* if you want to use the standard replay type "go_analysis_nps"
 +
* if you do not have a directory and want to do independent analysis
 +
* Create a directory /home/cdaq/Dirname
 +
* Create a directory /home/cdaq/Dirname/nps-2023
 +
* cd /home/cdaq/Dirname/nps-2023
 +
* Setup cmake and ROOT
 +
** module use /apps/modulefiles/
 +
** module load cmake
 +
** source  /apps/root/PRO/bin/thisroot.csh
 +
* Setup hcana
 +
** git clone https://github.com/GithubUserName/hcana
 +
** cd hcana
 +
** git remote add --track develop upstream https://github.com/JeffersonLab/hcana
 +
** git submodule init
 +
** git submodule update
 +
** cd ..
 +
** cmake -B hcana-build -S hcana -DCMAKE_INSTALL_PREFIX=hcana-install
 +
** cmake --build hcana-build -j12
 +
** cmake --install hcana-build/
 +
** setenv PATH /home/cdaq/Dirname/nps-2023/hcana-install/bin:$PATH
 +
** If one needs to recompile after making changes in hcana/src
 +
*** cd  hcana-build
 +
*** make install
 +
* Setup NPSlib
 +
** git clone https://github.com/GithubUserName/NPSlib
 +
** cd NPSlib
 +
** git remote add --track main upstream https://github.com/JeffersonLab/NPSlib
 +
** cd ..
 +
** cmake -B NPSlib-build -S NPSlib -DCMAKE_INSTALL_PREFIX=hcana-install
 +
** cmake --build NPSlib-build/
 +
** cmake --install NPSlib-build/
 +
** If one needs to recompile after making changes in NPSlib/src
 +
*** cd  NPSlib-build
 +
*** make install
 +
** setenv LD_LIBRARY_PATH /home/cdaq/Dirname/nps-2023/hcana-install/lib64:$LD_LIBRARY_PATH
 +
* Setup nps_replay
 +
** git clone https://github.com/GithubUserName/nps_replay
 +
** cd nps_replay
 +
** git remote add --track main upstream https://github.com/JeffersonLab/nps_replay
 +
** mkdir /net/cdaq/cdaql1data/cdaq/"name"/ROOTfiles
 +
** ln -sf /net/cdaq/cdaql1data/cdaq/"name"/ROOTfiles ROOTfiles
 +
** mkdir /net/cdaq/cdaql1data/cdaq/"name"/REPORT_OUTPUT
 +
** mkdir /net/cdaq/cdaql1data/cdaq/"name"/REPORT_OUTPUT/NPS
 +
** mkdir /net/cdaq/cdaql1data/cdaq/"name"/REPORT_OUTPUT/NPS/eel108
 +
** ln -sf /net/cdaq/cdaql1data/cdaq/"name"/REPORT_OUTPUT
 +
** ln -sf /cache/mss/hallc/c-nps/raw cache
 +
** ln -sf /net/cdaq/cdaql1data/coda/data/raw raw
 +
** If not setup already and will have to done for every new login
 +
*** setenv PATH /home/cdaq/Dirname/nps-2023/hcana-install/bin:$PATH
 +
*** setenv LD_LIBRARY_PATH /home/cdaq/Dirname/nps-2023/hcana-install/lib64:$LD_LIBRARY_PATH
 +
*** source  /apps/root/PRO/bin/thisroot.csh
 +
** Replay scripts are under the SCRIPTS
  
* Example event display available in replay repo above under macros (also here [http://nuclear.gla.ac.uk/~david/Plot_SHMS_PSCal_FADC.C]).
+
===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"
 +
* Following above directions for the cdaq machines to install hcana,NPSlib and nps_replay
 +
* Setup ROOT, cmake
 +
** module use /group/halla/modulefiles
 +
** module load cmake
 +
** module load root
 +
* When setting up the nps_replay use volatile disk instead of /net/cdaq/cdaql1data/cdaq
 +
** 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
 +
 
 +
== Analyzing data ==
 +
*on cdaql1
 +
** cd //"name"/nps_replay
 +
* On ifarm
 +
** cd /group/nps/"name"/nps-2023/nps_replay
 +
[[Offline Analysis]]
 +
* 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.
 +
 
 +
== Notable Software Changes ==
 +
 
 +
Add a running list of major changes and when they were implemented on cdaq and the farm.
 +
NPSlib
 +
hcana
 +
Podd
 +
nps_replay
 +
 
 +
== Location of Replays ==
 +
Path to individual segment replays.
 +
Path to skim replays.
 +
location of report files.
 +
Archives of report files and how to put them on your work disk.
 +
History of updates for farm jobs with run ranges.
 +
 
 +
== Analysis info==
 +
=== Run spreadsheet EEL108 ===
 +
*[https://docs.google.com/spreadsheets/d/1kU-52RVdai3fDjQpo2Kqwj9SlY-qog7pf1k7TkVtuqU/edit?pli=1#gid=0 Spreadsheet with EEL108 runlist]
 +
 
 +
== Git workflow ==
 +
* [https://hallcweb.jlab.org/doc-private/ShowDocument?docid=1212 Slides] on Git with the suggested workflow'
  
 
== Miscellaneous Support Repos ==
 
== Miscellaneous Support Repos ==
  
 
  Please post supporting scripts, online displays, debugging code, etc below.  (Github repo links please!)
 
  Please post supporting scripts, online displays, debugging code, etc below.  (Github repo links please!)
 +
 +
* [https://github.com/pt670520/Pulse-Analysis.git Pramita's SHMS Preshower macros]
 +
* ADD NEW REPOS HERE

Latest revision as of 09:16, 7 June 2024

NPS Software Meetings

NPS Software Meetings

Setting up HCANA and NPSlib, nps_replay Instructions

Git repos

Starting on the cdaqll machine

  • login into cdaql1 through the gateway
  • if you want to use the standard replay type "go_analysis_nps"
  • if you do not have a directory and want to do independent analysis
  • Create a directory /home/cdaq/Dirname
  • Create a directory /home/cdaq/Dirname/nps-2023
  • cd /home/cdaq/Dirname/nps-2023
  • Setup cmake and ROOT
    • module use /apps/modulefiles/
    • module load cmake
    • source /apps/root/PRO/bin/thisroot.csh
  • Setup hcana
    • git clone https://github.com/GithubUserName/hcana
    • cd hcana
    • git remote add --track develop upstream https://github.com/JeffersonLab/hcana
    • git submodule init
    • git submodule update
    • cd ..
    • cmake -B hcana-build -S hcana -DCMAKE_INSTALL_PREFIX=hcana-install
    • cmake --build hcana-build -j12
    • cmake --install hcana-build/
    • setenv PATH /home/cdaq/Dirname/nps-2023/hcana-install/bin:$PATH
    • If one needs to recompile after making changes in hcana/src
      • cd hcana-build
      • make install
  • Setup NPSlib
    • git clone https://github.com/GithubUserName/NPSlib
    • cd NPSlib
    • git remote add --track main upstream https://github.com/JeffersonLab/NPSlib
    • cd ..
    • cmake -B NPSlib-build -S NPSlib -DCMAKE_INSTALL_PREFIX=hcana-install
    • cmake --build NPSlib-build/
    • cmake --install NPSlib-build/
    • If one needs to recompile after making changes in NPSlib/src
      • cd NPSlib-build
      • make install
    • setenv LD_LIBRARY_PATH /home/cdaq/Dirname/nps-2023/hcana-install/lib64:$LD_LIBRARY_PATH
  • Setup nps_replay
    • git clone https://github.com/GithubUserName/nps_replay
    • cd nps_replay
    • git remote add --track main upstream https://github.com/JeffersonLab/nps_replay
    • mkdir /net/cdaq/cdaql1data/cdaq/"name"/ROOTfiles
    • ln -sf /net/cdaq/cdaql1data/cdaq/"name"/ROOTfiles ROOTfiles
    • mkdir /net/cdaq/cdaql1data/cdaq/"name"/REPORT_OUTPUT
    • mkdir /net/cdaq/cdaql1data/cdaq/"name"/REPORT_OUTPUT/NPS
    • mkdir /net/cdaq/cdaql1data/cdaq/"name"/REPORT_OUTPUT/NPS/eel108
    • ln -sf /net/cdaq/cdaql1data/cdaq/"name"/REPORT_OUTPUT
    • ln -sf /cache/mss/hallc/c-nps/raw cache
    • ln -sf /net/cdaq/cdaql1data/coda/data/raw raw
    • If not setup already and will have to done for every new login
      • setenv PATH /home/cdaq/Dirname/nps-2023/hcana-install/bin:$PATH
      • setenv LD_LIBRARY_PATH /home/cdaq/Dirname/nps-2023/hcana-install/lib64:$LD_LIBRARY_PATH
      • source /apps/root/PRO/bin/thisroot.csh
    • Replay scripts are under the SCRIPTS

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"
  • Following above directions for the cdaq machines to install hcana,NPSlib and nps_replay
  • Setup ROOT, cmake
    • module use /group/halla/modulefiles
    • module load cmake
    • module load root
  • When setting up the nps_replay use volatile disk instead of /net/cdaq/cdaql1data/cdaq
    • 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

Analyzing data

  • on cdaql1
    • cd //"name"/nps_replay
  • On ifarm
    • cd /group/nps/"name"/nps-2023/nps_replay

Offline Analysis

  • 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.

Notable Software Changes

Add a running list of major changes and when they were implemented on cdaq and the farm. NPSlib hcana Podd nps_replay

Location of Replays

Path to individual segment replays. Path to skim replays. location of report files. Archives of report files and how to put them on your work disk. History of updates for farm jobs with run ranges.

Analysis info

Run spreadsheet EEL108

Git workflow

  • Slides on Git with the suggested workflow'

Miscellaneous Support Repos

Please post supporting scripts, online displays, debugging code, etc below.  (Github repo links please!)