Skip to content

Commit

Permalink
Cleanup and update scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
DraTeots committed Jun 29, 2024
1 parent 775d940 commit 01c40bf
Show file tree
Hide file tree
Showing 8 changed files with 34 additions and 546 deletions.
36 changes: 18 additions & 18 deletions scripts/find_ccdb_usages/find_ccdb_usages.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,24 @@
import re

def search_calib_function(line):
#preg = "->Get.*\\\((?P<quantity>^[0-9]*)(?P<name>[0-9a-zA-Z_]+)*(=(?P<type>.*))*"
#if self.no_columns_quantity:
# preg = "(?P<name>[0-9a-zA-Z_]+)*(=(?P<type>.*))*"
try:
preg = '^.*>Get(Calib)*\\((?P<namepath>[\w/"]+),\s*(?P<variable>[0-9a-zA-Z_]+)(,.*)*\\)' #\\\((?P<namepath>^.+),(?P<variable>[0-9a-zA-Z_]+)\\\)'

m = re.match(preg, line)

if not m:
return None
#print line
result={}

if m.group("namepath") and m.group("variable"):
#preg = "->Get.*\\\((?P<quantity>^[0-9]*)(?P<name>[0-9a-zA-Z_]+)*(=(?P<type>.*))*"
#if self.no_columns_quantity:
# preg = "(?P<name>[0-9a-zA-Z_]+)*(=(?P<type>.*))*"
try:
preg = '^.*>Get(Calib)*\\((?P<namepath>[\w/"]+),\s*(?P<variable>[0-9a-zA-Z_]+)(,.*)*\\)' #\\\((?P<namepath>^.+),(?P<variable>[0-9a-zA-Z_]+)\\\)'

m = re.match(preg, line)

if not m:
return None
#print line
result={}

if m.group("namepath") and m.group("variable"):
return (m.group("namepath"), m.group("variable"))

except Exception as ex:
print ex
except Exception as ex:
print(ex)

return None

Expand All @@ -48,7 +48,7 @@ def check_name(name):
])

report = ""
print "SEARCHING {} files in {} directories".format(len(files_to_process), len(dirs_to_search))
print("SEARCHING {} files in {} directories".format(len(files_to_process), len(dirs_to_search)))
for file in files_to_process:
try:
line_num = 0
Expand Down Expand Up @@ -86,4 +86,4 @@ def check_name(name):
except:
pass

print report
print(report)
303 changes: 0 additions & 303 deletions scripts/halld_convert_from_svn/convert_script.py

This file was deleted.

Loading

0 comments on commit 01c40bf

Please sign in to comment.