Skip to content

Jjm321814/CAFMacroSkeleton

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

CAFMacroSkeleton

Simple CAF Skeleton for use in SBND CAF files

Minimal instructions to input a CAF file to a standard root macro

  1. Get a functional install of ROOT on your machine (installing a precompiled binary is fine)
  2. Clone https://github.com/SBNSoftware/sbnanaobj to some folder
  3. Clone https://github.com/Jjm321814/CAFMacroSkeleton to a different folder
  4. Navigate to sbnanaobj/sbnanaobj/StandardRecord
  5. run mkdir MyCMake
  6. Move the CMakeLists.txt file (from CAFMacroSkelton) to this new MyCMake directory
  7. In directory MyCMake make a new directory called Build
  8. Edit the hardcoded paths in CMakeLists.txt. Note an easy way to get the copy-paste options is to go to the StandardRecord directory and run find $PWD -name "*.h" or find $PWD -name "*.cxx"
  9. Navigate to MyCMake/Build
  10. run cmake ..
  11. run make This will compile a shared library file named libsbnanaobj_StandardRecord.so, which we will import later in our ROOT macros
  12. Back in CAFMacroSkeleton edit the path in rootlogon.C to point to your new Build directories
  13. Grab a root CAF file from a gpvm, and place it in the CAFMacroSkeleton folder. I have some stored at /exp/sbnd/app/users/jmclaugh/sbndcode_v10_14_02/CAFOut (one data and one mc file). I won't keep those forever but it can work for now.
  14. Launch a root terminal
  15. Run .L /home/jacob/WorkSoftware/SBND/AddBlipToCAF/sbnanaobj/sbnanaobj/StandardRecord/MyCMake/Build/libsbnanaobj_StandardRecord.so with the updated to your machine
  16. Run .x LoadInCAFVariables.cxx(<YourCAF>) The LoadInCAFVariables has a close to minimum set of includes and shows how to easily write functions to access specific parts of the run record. The best place to see whats in the standard record would be the file in sbnanaobj or a tbrowser open on the CAF file.

To write a root macro of your own, place it in a folder with a similar rootlogon.C file, and run it according to the last two steps in the above numbered instructions. That should generally work. These instructions also work with ACLiC, but there may be some complications with importing that elsewhere.

About

Simple CAF Skeleton for use in SBND CAF files

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors