Skip to content

Commit

Permalink
Copy db info in dorothea and sophronia
Browse files Browse the repository at this point in the history
  • Loading branch information
gonzaponte committed Feb 18, 2025
1 parent b729768 commit 658d8bb
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
6 changes: 6 additions & 0 deletions invisible_cities/cities/components.py
Original file line number Diff line number Diff line change
Expand Up @@ -1503,3 +1503,9 @@ def mask_sensors(rwf_pmt, rwf_sipm):
, rwf_sipm[active_sipms])

return mask_sensors


def copy_db_info(file_in, file_out):
with tb.open_file(file_in) as file:
if "DB" in file.root:
file.copy_node(file.root.DB, file_out.root, recursive=True)
2 changes: 2 additions & 0 deletions invisible_cities/cities/dorothea.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
from . components import city
from . components import collect
from . components import copy_mc_info
from . components import copy_db_info
from . components import print_every
from . components import pmap_from_files
from . components import peak_classifier
Expand Down Expand Up @@ -143,4 +144,5 @@ def dorothea( files_in : OneOrManyFiles
copy_mc_info(files_in, h5out, result.evtnum_list,
detector_db, run_number)

copy_db_info(files_in[0], h5out)
return result
2 changes: 2 additions & 0 deletions invisible_cities/cities/sophronia.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@

from . components import city
from . components import copy_mc_info
from . components import copy_db_info
from . components import print_every
from . components import peak_classifier
from . components import compute_xy_position
Expand Down Expand Up @@ -187,4 +188,5 @@ def sophronia( files_in : OneOrManyFiles
copy_mc_info(files_in, h5out, result.evtnum_list,
detector_db, run_number)

copy_db_info(files_in[0], h5out)
return result

0 comments on commit 658d8bb

Please sign in to comment.