示例#1
0
def importRTTdatasets(jobID):
    from AthenaCommon.Utils.unixtools import find_datafile
    xmlFile = find_datafile("TrigInDetValidation_TestConfiguration.xml")
    import xml.etree.ElementTree as elemTree
    tree = elemTree.parse(xmlFile)
    namespace = "{http://www.hep.ucl.ac.uk/atlas/AtlasTesting/rtt}"
    datasetList = []
    root = tree.getroot()
    for job in root.iter(namespace + 'athena'):
        if job.get('userJobId') == jobID:
            for dataset in job.findall(namespace + 'dataset'):
                eosDataset = "root://eosatlas.cern.ch/" + dataset.text
                datasetList.append(eosDataset)
    return datasetList
示例#2
0
    def initialize (self):
        self.sg = PyAthena.py_svc ('StoreGateSvc')
        self.ofile_name = os.path.basename (infile) + '.dump'
        refbase = os.path.basename (infile) + '.ref'
        self.reffile_name = '../share/' + refbase
        if not os.path.exists (self.reffile_name):
            self.reffile_name = '../' + self.reffile_name

        if not os.path.exists (self.reffile_name) and globals().has_key ('ATLAS_REFERENCE_TAG'):
            from AthenaCommon.Utils.unixtools import find_datafile
            r = find_datafile (ATLAS_REFERENCE_TAG)
            if r:
                self.reffile_name = os.path.join (r, ATLAS_REFERENCE_TAG,
                                                  refbase)

        if not os.path.exists (self.reffile_name):
            self.reffile_name = os.path.join (refdata, ATLAS_REFERENCE_TAG,
                                              refbase)

        self.ofile = open (self.ofile_name, 'w')
        self.icount = 0
        return 1
示例#3
0
        if p:
            path = os.path.join(p, fname)
            if os.path.exists(path):
                return path
    print('ERROR: Cannot find file: ', fname)
    return None


# Find reference and input files.
RunNumber = 363899
input_base = 'data18_tilecomm.00363899.calibration_tile.daq.RAW._lb0000._TileREB-ROS._0005-200ev.data'
if 'ATLAS_REFERENCE_TAG' not in globals():
    ATLAS_REFERENCE_TAG = os.environ.get('ATLAS_REFERENCE_TAG',
                                         'TileByteStream-02-00-00')
from AthenaCommon.Utils.unixtools import find_datafile
r = find_datafile(os.path.join('TileByteStream', ATLAS_REFERENCE_TAG))
refdir = None
if r:
    refdir = os.path.join(r, 'TileMuRcvDumps')
    input_fname = os.path.join(r, input_base)
if not refdir or not os.path.exists(refdir):
    refdir = find_file(
        os.path.join('TileByteStream', ATLAS_REFERENCE_TAG, 'TileMuRcvDumps'))
    input_fname = find_file(
        os.path.join('TileByteStream', ATLAS_REFERENCE_TAG, input_base))

from AthenaCommon.DetFlags import DetFlags
DetFlags.detdescr.Tile_setOn()
DetFlags.detdescr.LAr_setOn()

import glob