Example #1
0
def main(config_name):
    '''
    :Parameters:
        'config_name': string

    :Return: int
        0 if execution was successful otherwise !=0
    '''
    config = Config(config_name)

    print "Initializing Beam"
    my_beam = Beam(config)
    print ""
    my_beam.printBeamParam()
    print ""

    print "Initializing Luminosity calculations"
    lumi = Luminosity(config, config_name)
    print ""
    lumi.printLumiParam()
    print ""


    lumi.doFill(my_beam)

    #print ""
    #my_beam.printBeamParam()
    #print ""

    return 0
Example #2
0

parser = OptionParser()
parser.add_option("-n", "--name", dest="name",
                  help="Configuration name", default="US2")

(options, args) = parser.parse_args()

name = options.name
config = Config(name)

print "Initializing Beam"
myBeam = Beam(config)
print ""
myBeam.printBeamParam()
print ""

print "Initializing Luminosity calculations"
lumi = Luminosity(config,name)
print ""
lumi.printLumiParam()
print ""


lumi.doFill(myBeam)

#print ""
#myBeam.printBeamParam()
#print ""