Beispiel #1
0
def get_other_files_generic(prefix):
    file_list = ['generic_seeds',
                 'newfit-modedef',
                 'generic_statonly_brratiodef',
                 'generic_statonly_crosssectionsdef'] 

    for _file in file_list:
        source_file = os.path.join(attr.srcbrfpath, _file)
        if '281ipbv0' in prefix:
            if _file == 'generic_seeds':
                source_file += '_281ipbv0'
        elif '281ipbv12' in prefix:
            if _file == 'generic_seeds':
                source_file += '_281ipbv12'
            if 'crosssectionsdef' in _file: 
                source_file += '_281ipb'
        elif '818ipbv12' in prefix:
            if _file == 'generic_seeds':
                source_file += '_818ipbv12'
        else:
            raise NameError(prefix)
        
        dest_file   = tools.set_file(
            extbase   = attr.brfpath, prefix  = prefix, 
            comname   =  _file)

        tools.check_and_copy(source_file, dest_file, verbose=1) 
Beispiel #2
0
def radret_background(opts, figname, prefix):
    srcfigname = 'generic_radret_background'
    srcpdffile = set_file(extbase=attr.rfigpath,
                          comname=srcfigname,
                          ext='pdf',
                          prefix=prefix)
    pdffile = set_file(extbase=attr.cbxfigpath, comname=figname, ext='pdf')
    check_and_copy(srcpdffile, pdffile, verbose=1)
Beispiel #3
0
def check_and_copy_file(opts, label, filename):
    file_src = os.path.join(attr.genpath, filename)
    file_dst = os.path.join(attr.datpath, 'signal', label, 'src', filename)

    verbose = opts.verbose
    if opts.test:
        verbose = 1
    tools.check_and_copy(file_src, file_dst, verbose=verbose)
Beispiel #4
0
def check_and_copy_file(opts, label, filename):
    file_src = os.path.join(attr.genpath, filename)
    file_dst = os.path.join(attr.datpath, 'signal', label, 'src', filename)

    verbose = opts.verbose
    if opts.test:
        verbose = 1
    tools.check_and_copy(file_src, file_dst, verbose=verbose)
Beispiel #5
0
def copy_remote_files(srcfignames, prefix):
    for srcfigname in srcfignames:
        srcpdffile = set_file(extbase=attr.rfigpath,
                              comname=srcfigname,
                              ext='pdf',
                              prefix=prefix)
        pdffile = set_file(extbase=attr.cbxfigpath,
                           comname=srcfigname,
                           ext='pdf')
        check_and_copy(srcpdffile, pdffile, verbose=1)
Beispiel #6
0
def get_external_bkg_files_generic(prefix):
    label = prefix.replace('dir_', '').replace('/generic', '')
    bkg_file_list = ['generic_external_bkg_bfs_for_werner']

    for bkg_file in bkg_file_list:
        source_file = os.path.join(attr.srcbrfpath, bkg_file)
        if '281ipbv0' in label:
            source_file += '_281ipbv0'
        elif '281ipbv12' in label:
            source_file += '_281ipbv12'
            if '281ipbv12.2' in label:
                source_file += '.2'
        elif '818ipbv12' in label:
            source_file += '_818ipbv12'
            if '818ipbv12.2' in label:
                source_file += '.2'
        else:
            raise NameError(label)

        dest_file   = tools.set_file(
            extbase   = attr.brfpath, prefix  = prefix, 
            comname   =  bkg_file)

        tools.check_and_copy(source_file, dest_file, verbose=1)