Exemple #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
Exemple #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
Exemple #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
Exemple #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
Exemple #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
Exemple #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
Exemple #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))
Exemple #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
Exemple #9
0
def test_get_or_run():
    runs = get_runs(filter={'run_number': {'or': [328762]}})
Exemple #10
0
def test_get_collisions18():
    runs = get_runs(filter={"class": "Collisions18"})
    assert len(runs) > 0