ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Control
AthenaConfiguration
share
generateReferenceFile.py
Go to the documentation of this file.
1
#!/usr/bin/env python
2
3
#
4
# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
5
#
6
7
import
re
8
import
glob
9
import
json
10
11
functionDict = {}
12
files = glob.glob(
'**/*onfig.py'
, recursive=
True
)
13
files = files + glob.glob(
'**/*onfigNew.py'
, recursive=
True
)
14
for
file
in
files:
15
for
line
in
open(file,
'r'
, encoding=
"utf-8"
):
16
match = re.search(
r"CompFactory\.(\w+\.?\w+) ?\("
, line)
17
if
match:
18
fun = match.group(1)
19
if
fun
in
functionDict:
20
functionDict[fun].
add
(file)
21
else
:
22
functionDict[fun] = {file}
23
24
duplicates = {}
25
for
item
in
functionDict.items():
26
if
len(item[1]) > 1:
27
duplicates[item[0]]=list(item[1])
28
29
with
open(
"referenceDuplicates.txt"
,
"w"
)
as
f:
30
f.write(json.dumps(duplicates))
add
bool add(const std::string &hname, TKey *tobj)
Definition
fastadd.cxx:55
Generated on
for ATLAS Offline Software by
1.17.0