Example #1
0
            elif x.endswith("chunk_000000.dat"):
                file0name = x
                break
        if (not file0name.endswith("ls0001_index000000.raw")
                and not file0name.endswith("chunk_000000.dat")):
            print "Check the data files... First file (at least) is missing!"
        startDateTime = file0name.split('_')[3] + "_" + file0name.split('_')[4]
        time.sleep(1)

    # Get stand configuration table from the DB
    if (int(args.run_number) > 237
            and int(args.run_number) < 266) or (int(args.run_number) > 272):
        dumpDBtables.getConfigurationTable(args.run_number, startDateTime)

    # Generate configuration file
    config_creator.configMaker(args.run_number, "yesMasks")
    time.sleep(1)

    # Generate geometry files
    geometry_files_creator.geomMaker(args.run_number, "noAlignment")
    time.sleep(1)

    # Creating folder outside the CMMSW release to put the output files and plots
    #---# Remove old version if want to recreate
    if (os.path.exists(outDirPath)):
        rmDirCommand = "rm -rf " + outDirPath
        rmDir = subprocess.Popen(rmDirCommand.split(),
                                 stdout=subprocess.PIPE,
                                 universal_newlines=True)
        rmDir.communicate()
    #---# Create the new empty folder
            elif x.endswith("chunk_000000.dat"):
                file0name = x
                break
        if (not file0name.endswith("ls0001_index000000.raw")
                and not file0name.endswith("chunk_000000.dat")):
            print "Check the data files... First file (at least) is missing!"
        startDateTime = file0name.split('_')[3] + "_" + file0name.split('_')[4]
        time.sleep(1)

    # Get stand configuration table from the DB
    if (int(args.run_number) > 237
            and int(args.run_number) < 266) or (int(args.run_number) > 272):
        dumpDBtables.getConfigurationTable(args.run_number, startDateTime)

    # Generate configuration file
    config_creator.configMaker(args.run_number, args.hotdeadStripsMasking)
    time.sleep(1)

    # Generate geometry files
    geometry_files_creator.geomMaker(args.run_number, args.alignmentDone)
    time.sleep(1)

    # Compiling after the generation of the geometry files
    scramCommand = "scram build -j 4"
    scramming = subprocess.Popen(scramCommand.split(),
                                 stdout=subprocess.PIPE,
                                 universal_newlines=True,
                                 cwd=srcPath)
    while scramming.poll() is None:
        line = scramming.stdout.readline()
        print(line)
Example #3
0
    run_number = sys.argv[1]

    # Different paths definition
    srcPath = os.path.join(os.environ["CMSSW_BASE"], "src")
    pyhtonModulesPath = os.path.join(srcPath, "Analysis/GEMQC8/python/")
    runPath = os.path.join(srcPath, "Analysis/GEMQC8/test/")
    dataPath = os.path.join(srcPath, "Analysis/GEMQC8/data/")
    resDirPath = os.path.join(os.environ["CMSSW_BASE"], "../")

    sys.path.insert(0, pyhtonModulesPath)

    import config_creator
    import geometry_files_creator

    # Generate configuration file
    config_creator.configMaker(run_number)
    time.sleep(1)

    # Generate geometry files
    geometry_files_creator.geomMaker(run_number, "--noAlignment")
    time.sleep(1)

    # Compiling after the generation of the geometry files
    scramCommand = "scram build -j 4"
    scramming = subprocess.Popen(scramCommand.split(),
                                 stdout=subprocess.PIPE,
                                 universal_newlines=True,
                                 cwd=srcPath)
    while scramming.poll() is None:
        line = scramming.stdout.readline()
        print(line)
            file0name = x
            break
        elif x.endswith("chunk_000000.dat"):
            file0name = x
            break
        else:
            print "Check the data files... First file (at least) is missing!"
    startDateTime = file0name.split('_')[3] + "_" + file0name.split('_')[4]
    time.sleep(1)

    # Get stand configuration table from the DB
    if int(args.run_number) > 237:
        dumpDBtables.getConfigurationTable(args.run_number, startDateTime)

    # Generate configuration file
    config_creator.configMaker(args.run_number)
    time.sleep(1)

    # Generate geometry files
    geometry_files_creator.geomMaker(args.run_number, "noAlignment")
    time.sleep(1)

    # Compiling after the generation of the geometry files
    scramCommand = "scram build -j 4"
    scramming = subprocess.Popen(scramCommand.split(),
                                 stdout=subprocess.PIPE,
                                 universal_newlines=True,
                                 cwd=srcPath)
    while scramming.poll() is None:
        line = scramming.stdout.readline()
        print(line)