diff --git a/src/orbit_processor.cc b/src/orbit_processor.cc index d5fefb9eeaf8f81bebf548911cb9c7d25846735c..361598630652bd13c26b1a4055ee5a564103012e 100644 --- a/src/orbit_processor.cc +++ b/src/orbit_processor.cc @@ -105,13 +105,13 @@ OrbitProcessor::FillOrbitMetadata OrbitProcessor::FillOrbit(orbit_trailer *trail // TODO: we might want to return an empty slice in order to avoid unexepected files/events // TODO: to appear and that would let CMSSW crash std::pair<uint32_t, bool> orbit_header = std::pair<uint32_t, bool>{ProcessOrbitHeader(rd_ptr)}; + uint32_t orbit = uint32_t{orbit_header.first}; + if (orbit <= 0) return{0, 0, 0}; //.second is the warning test enable bit rd_ptr += 32; // +32 to account for orbit header if (cmsswHeaders) { wr_ptr += sizeof(FRDEventHeader_V6) + 4; } // reserving space for cmssw orbit header - - uint32_t orbit = uint32_t{orbit_header.first}; auto counts = uint32_t{0}; uint32_t filled_bxs = 0; // We loop over the BX map from the orbit trailer and then match the filled