File tree Expand file tree Collapse file tree 2 files changed +8
-9
lines changed
Expand file tree Collapse file tree 2 files changed +8
-9
lines changed Original file line number Diff line number Diff line change 2121#include < sys/mman.h>
2222#endif
2323
24- namespace o2
25- {
26- namespace DataDistribution
24+ namespace o2 ::DataDistribution
2725{
2826
2927using namespace o2 ::header;
@@ -85,10 +83,13 @@ std::size_t SubTimeFrameFileReader::getHeaderStackSize() // throws ios_base::fai
8583 auto lNumHeaders = 0 ;
8684 while (readNextHeader && (++lNumHeaders <= cMaxHeaders)) {
8785 // read BaseHeader only!
86+ const auto lBaseHdrPos = position ();
8887 if (!read_advance (&lBaseHdr, sizeof (BaseHeader))) {
8988 return 0 ;
9089 }
9190
91+ // go back, and read the whole O2 header (Base+Derived)
92+ set_position (lBaseHdrPos);
9293 if (!ignore_nbytes (lBaseHdr.size ())) {
9394 return 0 ;
9495 }
@@ -307,7 +308,7 @@ std::unique_ptr<SubTimeFrame> SubTimeFrameFileReader::read(SubTimeFrameFileBuild
307308 lStf->updateFirstOrbit (R.getOrbit ());
308309 }
309310 } catch (...) {
310- EDDLOG (" Error getting RDHReader instace . Not setting firstOrbit for file data" );
311+ EDDLOG (" Error getting RDHReader instance . Not setting firstOrbit for file data" );
311312 }
312313
313314 mStfData .emplace_back (std::move (lHdrStackMsg), std::move (lDataMsg));
@@ -326,5 +327,5 @@ std::unique_ptr<SubTimeFrame> SubTimeFrameFileReader::read(SubTimeFrameFileBuild
326327
327328 return lStf;
328329}
329- }
330+
330331} /* o2::DataDistribution */
Original file line number Diff line number Diff line change 2323#include < fstream>
2424#include < vector>
2525
26- namespace o2
27- {
28- namespace DataDistribution
26+ namespace o2 ::DataDistribution
2927{
3028
3129class SubTimeFrameFileBuilder ;
@@ -142,7 +140,7 @@ class SubTimeFrameFileReader : public ISubTimeFrameVisitor
142140 static std::uint64_t sStfId ; // TODO: add id to files metadata
143141
144142};
145- }
143+
146144} /* o2::DataDistribution */
147145
148146#endif /* ALICEO2_SUBTIMEFRAME_FILE_READER_H_ */
You can’t perform that action at this time.
0 commit comments