ATLAS Offline Software
Control
AthenaExamples
AthExHiveAthenaPool
python
ReadHiveWithMetaData.py
Go to the documentation of this file.
1
# Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
2
3
from
PyUtils
import
MetaReader
4
5
6
def
is_metadata_content_expected
(file_name):
7
tested_metadata = MetaReader.read_metadata([file_name], mode=
"full"
)[file_name]
8
9
expected_metadata = {
10
"metadata_items"
: {
11
"xAOD::FileMetaDataAuxInfo_v1_FileMetaDataAux."
:
"xAOD::FileMetaDataAuxInfo_v1"
,
12
"xAOD::FileMetaData_v1_FileMetaData"
:
"FileMetaData"
,
13
"xAOD::EventFormat_v1_EventFormatStreamTestStream"
:
"xAOD::EventFormat_v1"
,
14
"xAOD::FileMetaDataAuxInfo_v1_FileMetaDataAuxDyn.mcProcID"
:
"Float_t"
,
15
},
16
"FileMetaData"
: {
17
"mcProcID"
: 0.0,
18
"productionRelease"
:
""
,
19
"dataType"
:
"StreamTestStream"
,
20
"runNumbers"
: [284600],
21
"lumiBlocks"
: [0],
22
},
23
"xAOD::EventFormat_v1_EventFormatStreamTestStream"
: {
24
b
"C1"
:
"HiveDataObj"
,
25
b
"V1"
:
"HiveDataObj"
,
26
b
"V2"
:
"HiveDataObj"
,
27
b
"V3"
:
"HiveDataObj"
,
28
b
"a1"
:
"HiveDataObj"
,
29
b
"a2"
:
"HiveDataObj"
,
30
b
"b1"
:
"HiveDataObj"
,
31
b
"c2"
:
"HiveDataObj"
,
32
b
"d1"
:
"HiveDataObj"
,
33
b
"e1"
:
"HiveDataObj"
,
34
b
"g1"
:
"HiveDataObj"
,
35
},
36
"nentries"
: 20,
37
}
38
39
return
tested_metadata == expected_metadata
40
41
42
if
__name__ ==
"__main__"
:
43
import
sys
44
45
sys.exit(
is_metadata_content_expected
(
"TestStream.pool.root"
))
ReadHiveWithMetaData.is_metadata_content_expected
def is_metadata_content_expected(file_name)
Definition:
ReadHiveWithMetaData.py:6
Generated on Mon Sep 1 2025 21:17:47 for ATLAS Offline Software by
1.8.18