Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

read chunk lengths from rundoc #83

Merged
merged 2 commits into from
Apr 3, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions bin/bootstrax
Original file line number Diff line number Diff line change
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