Example #1
0
 def __init__(self,cfg_filename):
     """
     Init
     
     @param cfg_filename     Filename of the config file ("PyUser.ini")
     """
     self.p_settings = info.getConfigSettings(cfg_filename)
     self.p_cfg_name = 'configuration'
     
     self.ops        = config.logicOperators()
     self.key2attr   = info.key2attr()
     self.obj2ttree  = info.obj2ttree()
     self.truthObj   = info.truthObject()
     self.nonGeVvars = info.nonGeVvariables()  # variables that aren't in GeV (for scaling plots)
     self.GeV        = 1000.
Example #2
0
#----------------------------------------------------------------------------------------#

if __name__ == '__main__':
    ## -- Run the program! -- ##
    from ROOT import gROOT
    gROOT.LoadMacro("PyMiniAna/Loader.C+")              # 2-D ROOT vectors
    gROOT.LoadMacro("PyMiniAna/TLorentzVectorDict.h+")  # TLorentzVectors

    parser_name = 'share/PyMiniAna.cfg'
    if len(sys.argv)>1:
        print
        print " You have defined a new configuration file: "
        print "     >> {0}".format(sys.argv[1])
        print " Using this configuration file for the analysis. "
        print
        print " If you do not wish to use this configuration file, "
        print " use the default choice 'share/PyMiniAna.cfg'."
        print " To use the default, please run without command line arguments "
        print
        parser_name = sys.argv[1]

    parser = info.getConfigSettings(parser_name)

    initialize(parser)
    execute(parser)

###          ###
### The End. ###
###          ###