mirror of
https://github.com/paulscherrerinstitute/sf_daq_buffer.git
synced 2026-04-21 14:44:36 +02:00
additional parameter for sf_writer - total number of modules to retrieve from buffer, to be able to test with smaller detectors
This commit is contained in:
committed by
Data Backend account
parent
d6973dfc58
commit
7be41c8ed4
@@ -23,6 +23,20 @@ else
|
||||
OUTFILE=/gpfs/photonics/swissfel/buffer/test.${START_PULSE_ID}-${STOP_PULSE_ID}.h5
|
||||
fi
|
||||
|
||||
case ${DETECTOR} in
|
||||
'JF01T03V01')
|
||||
NM=3
|
||||
;;
|
||||
'JF07T32V01')
|
||||
NM=32
|
||||
;;
|
||||
'JF13T01V01')
|
||||
NM=1
|
||||
;;
|
||||
*)
|
||||
NM=1
|
||||
esac
|
||||
|
||||
#8 replay workers per core
|
||||
#coreAssociated_replay=(20 20 20 20 20 20 20 20 21 21 21 21 21 21 21 21 22 22 22 22 22 22 22 22 23 23 23 23 23 23 23 23)
|
||||
#4 replay workers per core
|
||||
@@ -66,7 +80,7 @@ echo "Started actual retrieve : "`date`
|
||||
# taskset -c ${coreAssociated_replay[10#${M}]} /usr/bin/sf_replay ${PROCESS_PID} ${DETECTOR} M${M} ${M} ${START_PULSE_ID} ${STOP_PULSE_ID} >> /tmp/detector_retrieve_replay.log &
|
||||
#done
|
||||
|
||||
taskset -c ${coreAssociated} /usr/bin/sf_writer ${OUTFILE} /gpfs/photonics/swissfel/buffer/${DETECTOR} ${START_PULSE_ID} ${STOP_PULSE_ID} >> /tmp/detector_retrieve.log &
|
||||
taskset -c ${coreAssociated} /usr/bin/sf_writer ${OUTFILE} /gpfs/photonics/swissfel/buffer/${DETECTOR} ${NM} ${START_PULSE_ID} ${STOP_PULSE_ID} >> /tmp/detector_retrieve.log &
|
||||
|
||||
wait
|
||||
|
||||
|
||||
@@ -60,13 +60,15 @@ void read_buffer(
|
||||
|
||||
int main (int argc, char *argv[])
|
||||
{
|
||||
if (argc != 5) {
|
||||
if (argc != 6) {
|
||||
cout << endl;
|
||||
cout << "Usage: sf_writer [output_file] [device]";
|
||||
cout << " [n_modules]";
|
||||
cout << " [start_pulse_id] [stop_pulse_id]";
|
||||
cout << endl;
|
||||
cout << "\toutput_file: Complete path to the output file." << endl;
|
||||
cout << "\tdevice: Name of detector." << endl;
|
||||
cout << "\tn_modules: number of modules" << endl;
|
||||
cout << "\tstart_pulse_id: Start pulse_id of retrieval." << endl;
|
||||
cout << "\tstop_pulse_id: Stop pulse_id of retrieval." << endl;
|
||||
cout << endl;
|
||||
@@ -76,9 +78,10 @@ int main (int argc, char *argv[])
|
||||
|
||||
string output_file = string(argv[1]);
|
||||
const string device = string(argv[2]);
|
||||
uint64_t start_pulse_id = (uint64_t) atoll(argv[3]);
|
||||
uint64_t stop_pulse_id = (uint64_t) atoll(argv[4]);
|
||||
size_t n_modules = 32;
|
||||
size_t n_modules = atoi(argv[3]);
|
||||
//size_t n_modules = 32;
|
||||
uint64_t start_pulse_id = (uint64_t) atoll(argv[4]);
|
||||
uint64_t stop_pulse_id = (uint64_t) atoll(argv[5]);
|
||||
|
||||
uint64_t start_block = start_pulse_id / BUFFER_BLOCK_SIZE;
|
||||
uint64_t stop_block = stop_pulse_id / BUFFER_BLOCK_SIZE;
|
||||
|
||||
Reference in New Issue
Block a user