ATLAS Offline Software
Loading...
Searching...
No Matches
test_iovset_pickle.py
Go to the documentation of this file.
1#!/usr/bin/env python
2
3# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
4
5from DQUtils import fetch_iovs, process_iovs
6from pickle import loads, dumps
7
9 """
10 Try serializing a fairly complicated iovset object
11 """
12 iovs = fetch_iovs("DEFECTS", runs=359918)
13
14 channels, iovsets = iovs.chans_iovsets
15
16 processed = [(since, until, states)
17 for since, until, states in process_iovs(*iovsets)]
18
19 serialized = dumps(processed)
20 deserialized = loads(serialized)
21
22 assert deserialized == processed
23
24if __name__ == '__main__':