Skip to content
Snippets Groups Projects
Commit 7daa9442 authored by Giovanna Lazzari Miotto's avatar Giovanna Lazzari Miotto :mushroom:
Browse files

More cleanup

parent 114dd76d
No related branches found
No related tags found
No related merge requests found
...@@ -28,21 +28,14 @@ OutputByOrbitStream::OutputByOrbitStream(ctrl &control, const ConfigView &conf_v ...@@ -28,21 +28,14 @@ OutputByOrbitStream::OutputByOrbitStream(ctrl &control, const ConfigView &conf_v
void OutputByOrbitStream::OutputFixedOrbits(Slice &out) { void OutputByOrbitStream::OutputFixedOrbits(Slice &out) {
uint32_t orbitN = out.get_firstOrbitN(); uint32_t orbitN = out.get_firstOrbitN();
auto index = uint32_t(orbitN / conf_.num_orbits_per_file_); auto index = uint32_t(orbitN / conf_.num_orbits_per_file_);
// LOG(FATAL) << "This is orbit index=" << index << ", N=" << orbitN << " out of "
// << conf_.num_orbits_per_file_;
if ((out.get_counts() != 0) || conf_.support_cmssw_headers_) { if ((out.get_counts() != 0) || conf_.support_cmssw_headers_) {
if (control_.running.load(std::memory_order_acquire) || if (control_.running.load(std::memory_order_acquire) ||
control_.output_force_write) { // i.e., should be writing data control_.output_force_write) { // i.e., should be writing data
if (!out.isInitialized()) { if (!out.isInitialized()) {
return; return;
} }
// LOG(FATAL) << "Getting file handle and writing " << out.size() << " bytes";
auto file = output_file_handler_.getFile(control_.run_number, index); auto file = output_file_handler_.getFile(control_.run_number, index);
size_t n = file->Write(out.begin(), out.size()); size_t n = file->Write(out.begin(), out.size());
// n = fwrite(out.begin(), 1, out.size(),
// output_file_handler_.getFile(control_.run_number, index).getFilePtr());
output_file_handler_.upFileSize(n); output_file_handler_.upFileSize(n);
output_file_handler_.upNOrbits(conf_.num_orbits_per_packet_); output_file_handler_.upNOrbits(conf_.num_orbits_per_packet_);
} else if (output_file_handler_.HasOpenFile()) { } else if (output_file_handler_.HasOpenFile()) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment