예제 #1
0
def test_get_runs():
    # Gets runs between run number 309000 and 310000
    filter_run = {
        'run_number': {
            'and': [{
                '>': 309000
            }, {
                '<': 310000
            }]
        },
    }
    runs = get_runs(filter=filter_run)
    assert len(runs) > 0
    # Gets runs that contain lumisections that classified DT as GOOD AND lumsiections that classified hcal as STANDBY
    filter_run = {
        'run_number': {
            'and': [{
                '>': 309000
            }, {
                '<': 310000
            }]
        },
        'dt': 'GOOD'
        # 'hcal': 'STANDBY'
    }

    runs = get_runs(filter=filter_run)
    assert len(runs) > 0
예제 #2
0
def test_get_runs():
    # Gets runs between run number 309000 and 310000
    filter_run = {"run_number": {"and": [{">": 309000}, {"<": 310000}]}}
    runs = get_runs(filter=filter_run)
    assert len(runs) > 0
    # Gets runs that contain lumisections that classified DT as GOOD AND lumsiections that classified hcal as STANDBY
    filter_run = {
        "run_number": {
            "and": [{
                ">": 309000
            }, {
                "<": 310000
            }]
        },
        "dt-dt": "GOOD"
        # 'hcal': 'STANDBY'
    }

    runs = get_runs(filter=filter_run)
    assert len(runs) > 0
    runs = []

    filter_run = {
        "run_number": {
            "and": [{
                ">": 309000
            }, {
                "<": 310000
            }]
        },
        "tracker-strip": "GOOD",
    }
    runs = get_runs(filter=filter_run)
    print(json.dumps(runs))
    assert len(runs) > 0
예제 #3
0
def test_get_runs_not_compressed():
    runs = get_runs(filter={
        'run_number': {
            'and': [{
                '>': 309000
            }, {
                '<': 310000
            }]
        },
        'dt': 'GOOD'
    },
                    compress_attributes=False)
    assert len(runs) > 0
예제 #4
0
def test_get_runs_not_compressed():
    runs = get_runs(
        filter={
            "run_number": {
                "and": [{
                    ">": 309000
                }, {
                    "<": 310000
                }]
            },
            "dt-dt": "GOOD"
        },
        compress_attributes=False,
    )
    assert len(runs) > 0
예제 #5
0
def test_get_runs_with_ignore_filter():
    filter_run = {
        "run_number": {
            "and": [{
                ">": 309000
            }, {
                "<": 310000
            }]
        },
        "oms_attributes.hlt_key": {
            "like": "%commissioning2018%"
        },
        "triplet_summary.dt-dt.GOOD": {
            ">": 0
        },
    }
    runs = get_runs(filter=filter_run, ignore_filter_transformation=True)
    assert len(runs) > 0
예제 #6
0
def get_runs_with_combined_filter():
    runs = get_runs(
        filter={
            "run_number": {
                "and": [{
                    ">": 309000
                }, {
                    "<": 310000
                }]
                # },
                # 'hlt_key': {
                #     'like': '%commissioning2018%'
                # },
                # 'significant': {
                #     '=': True
            }
        })
    assert len(runs) > 0
예제 #7
0
def get_runs_with_combined_filter():
    runs = get_runs(
        filter={
            'run_number': {
                'and': [{
                    '>': 309000
                }, {
                    '<': 310000
                }]
                # },
                # 'hlt_key': {
                #     'like': '%commissioning2018%'
                # },
                # 'significant': {
                #     '=': True
            }
        })
    print(len(runs))
예제 #8
0
def test_get_runs_with_ignore_filter():
    filter_run = {
        'run_number': {
            'and': [{
                '>': 309000
            }, {
                '<': 310000
            }]
        },
        'oms_attributes.hlt_key': {
            'like': '%commissioning2018%'
        },
        'triplet_summary.dt_triplet.GOOD': {
            '>': 0
        }
    }
    runs = get_runs(filter=filter_run, ignore_filter_transformation=True)
    assert len(runs) > 0
예제 #9
0
def test_get_or_run():
    runs = get_runs(filter={'run_number': {'or': [328762]}})
예제 #10
0
def test_get_collisions18():
    runs = get_runs(filter={"class": "Collisions18"})
    assert len(runs) > 0