mirror of
https://github.com/paulscherrerinstitute/sf_daq_buffer.git
synced 2026-04-22 08:24:35 +02:00
Move initialization in loop
This commit is contained in:
@@ -72,9 +72,7 @@ int main (int argc, char *argv[])
|
||||
|
||||
uint16_t data_empty [] = { 0, 0, 0, 0};
|
||||
|
||||
rapidjson::Document header(rapidjson::kObjectType);
|
||||
auto& header_alloc = header.GetAllocator();
|
||||
string text_header;
|
||||
|
||||
|
||||
// TODO: Remove stats trash.
|
||||
int stats_counter = 0;
|
||||
@@ -84,6 +82,10 @@ int main (int argc, char *argv[])
|
||||
|
||||
while (true) {
|
||||
|
||||
rapidjson::Document header(rapidjson::kObjectType);
|
||||
auto& header_alloc = header.GetAllocator();
|
||||
string text_header;
|
||||
|
||||
auto start_time = chrono::steady_clock::now();
|
||||
|
||||
auto slot_id = queue.read();
|
||||
@@ -176,7 +178,6 @@ int main (int argc, char *argv[])
|
||||
shape[1] = 2;
|
||||
}
|
||||
|
||||
|
||||
{
|
||||
rapidjson::StringBuffer buffer;
|
||||
rapidjson::Writer<rapidjson::StringBuffer> writer(buffer);
|
||||
|
||||
Reference in New Issue
Block a user