Special notes for Wed March 13¶
There are changes committed to art-workbook overnight.
- Added exercise ExN
- Added a script ups/setup_dep that will permit you to see the environment variables in the source window.
How to update from the repository¶
Log out from all sessions on ds50 ( not always necessary but its way to complicated to describe when you don't have ).
In your source window:
- login to ds50
- source /ds50/app/ds50/setup_workbook_tutorial.sh
- cd art-workbook
- git stash
- git pull
- git stash pop
- source ups/setup_deps -d
- printenv ART_INC
This last step should produce
/ds50/app/products/art/v1_03_08/includeThe above steps did this:
- git stash: told git to find any changes you made, store them somewhere and restore your copy of the repository to the state it was in right after checkout.
- git pull: told git to update your code so that it matches the repository
- git stash pop: move your changes back in
If you only added files, and did not change anything, this will work fine. If you editted some existing files it's unlikely that your changes will collide with anything changed in the respostory.After you have done the above, go to your build window:
- source /home/darkside/ds50app/setup_workbook_tutorial.sh
- cd build-workbook
- source ../art-workbook/ups/setup_for_development -d
- buildtool -c
With one exception, these are the standard instructions. The exception is that the last step asks for a clean build - ie delete everything and start again. It's possible that an incremental build will work but the time penalty for a clean build is small and it would take too long to describe when an incremental build is OK after a pull.
In your build window, after completing the previous steps:
- art -c ExN/exn.fcl
- ls output
You will see that this job made 4 output files:
output/allEvents_data.root output/failTight_data.root output/passLoose_data.root output/passTight_data.root
We can look together at exn.fcl and talk about it.
You can readback any of these files, using, for example,
- art -c ExN/read.fcl output/passTight_data.root -T output/passTight_hist.root
- art -c ExN/read.fcl output/failTight_data.root -T output/failTight_hist.root
There are two other .fcl files that do the same thing as exn.fcl but which exercise some other features of .fcl to ensure that
- repeated blocks can be defined in one place and repeated as many time as needed
- You can define a repeated block with a parameter whose value is nil. You can then repeat this block as needed. Then you can override the nil values with real ones. This is conceptually similar to the concept of a pure virtual function.