Skip to content

Commit

Permalink
Merge pull request #83 from XENONnT/read_chunk_length
Browse files Browse the repository at this point in the history
read chunk lengths from rundoc
  • Loading branch information
JoranAngevaare committed Apr 3, 2020
2 parents 044c6de + 02e626e commit f0f9adc
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions bin/bootstrax
Expand Up @@ -115,7 +115,7 @@ args = parser.parse_args()
# Configuration
##

print(f'---\nTEST VERSION 0.3.3\n---')
print(f'---\nTEST VERSION 0.3.5\n---')

# The event builders write to different directories on the respective machines.
eb_directories = {
Expand Down Expand Up @@ -749,7 +749,7 @@ def get_compressor(rd, default_compressor="blosc"):

def run_strax(run_id, input_dir, target, n_readout_threads, compressor,
run_start_time, samples_per_record, process_mode, is_LED,
debug=False):
daq_chunk_duration, daq_overlap_chunk_duration, debug=False):
# Clear the swap memory used by npshmmex
npshmex.shm_clear()
# double check by forcefully clearing shm
Expand Down Expand Up @@ -777,6 +777,8 @@ def run_strax(run_id, input_dir, target, n_readout_threads, compressor,
daq_compressor=compressor,
run_start_time=run_start_time,
record_length=samples_per_record,
daq_chunk_duration = daq_chunk_duration,
daq_overlap_chunk_duration = daq_overlap_chunk_duration,
n_readout_threads=n_readout_threads,
check_raw_record_overlaps=False,
)
Expand Down Expand Up @@ -837,6 +839,12 @@ def process_run(rd, send_heartbeats=True):

thread_info = rd.get('ini', dict()).get('processing_threads', dict())
n_readout_threads = sum([v for v in thread_info.values()])
try:
daq_chunk_duration = int(rd['ini']['strax_chunk_length'] * 1e9)
daq_overlap_chunk_duration = int(rd['ini']['strax_chunk_overlap'] * 1e9)
except Exception as e:
fail(f"Could not find 'strax_chunk_length' and/or'strax_chunk_overlap' in "
f"rundoc: {str(e)}")

if not n_readout_threads:
fail(f"Run doc for {run_id} has no readout thread count info")
Expand Down Expand Up @@ -883,6 +891,7 @@ def process_run(rd, send_heartbeats=True):
target=run_strax,
args=(run_id, loc, target, n_readout_threads, compressor,
run_start_time, samples_per_record, process_mode, is_LED,
daq_chunk_duration, daq_overlap_chunk_duration,
args.debug))

t0 = now()
Expand Down

0 comments on commit f0f9adc

Please sign in to comment.