garanainit.py
Go to the documentation of this file.
1 ##########################################################################
2 # File: garanainit.py #
3 # Author: Chris Hilgenberg (chilgenb@fnal.gov) #
4 # Description: Script for loading GArAna libraries in python macros #
5 # Usage: Include script at top of your macro with 'import garanainit.py' #
6 # and call from top of your script with 'garanainit.init()'. #
7 # For example, see garana/macros/demo.py #
8 ##########################################################################
9 
10 import ROOT
11 
12 def init():
13 
14  ROOT.gInterpreter.ProcessLine('R__ADD_LIBRARY_PATH(/usr/local/lib)') #change this to your library install area
15 
16  #shared garana libraries
17  ROOT.gInterpreter.ProcessLine('R__LOAD_LIBRARY(libGaranaAccessors.so)')
18  ROOT.gInterpreter.ProcessLine('R__LOAD_LIBRARY(libGaranaProducts.so)')
19  ROOT.gInterpreter.ProcessLine('R__LOAD_LIBRARY(libGaranaDict.so)')
20  ROOT.gInterpreter.ProcessLine('R__LOAD_LIBRARY(libGaranaUtility.so)')
21 
22  ROOT.gInterpreter.ProcessLine('R__ADD_INCLUDE_PATH(/home/chilgenb/garana)') #change this to your garana install area
23 
24  # add your headers here
25  ROOT.gInterpreter.Declare('#include "garana/Accessors/TreeManager.h"')
26  ROOT.gInterpreter.Declare('#include "garana/Utility/Backtracker.h"')
27 
28  ROOT.gInterpreter.ProcessLine('using namespace garana;')
29 
30 #execute as a script
31 if __name__ == '__main__':
32  init()
def init()
Definition: garanainit.py:12