From 126412703455a43a522e9a92239fc7f6f1f2a91b Mon Sep 17 00:00:00 2001 From: shahoian Date: Tue, 19 Apr 2022 18:37:10 +0200 Subject: [PATCH] Store original tfCounter in the CTFHeader --- .../Common/include/DetectorsCommonDataFormats/CTFHeader.h | 3 ++- DataFormats/Detectors/Common/src/CTFHeader.cxx | 2 +- Detectors/CTF/workflow/src/CTFReaderSpec.cxx | 2 +- Detectors/CTF/workflow/src/CTFWriterSpec.cxx | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/DataFormats/Detectors/Common/include/DetectorsCommonDataFormats/CTFHeader.h b/DataFormats/Detectors/Common/include/DetectorsCommonDataFormats/CTFHeader.h index 589fed016f2b1..37897c6be3a97 100644 --- a/DataFormats/Detectors/Common/include/DetectorsCommonDataFormats/CTFHeader.h +++ b/DataFormats/Detectors/Common/include/DetectorsCommonDataFormats/CTFHeader.h @@ -29,12 +29,13 @@ struct CTFHeader { uint64_t run; // run number uint64_t creationTime = 0; // creation time from the DataProcessingHeader uint32_t firstTForbit = 0; // first orbit of time frame as unique identifier within the run + uint32_t tfCounter = 0; // original TFcounter of the TF o2::detectors::DetID::mask_t detectors; // mask of represented detectors std::string describe() const; void print() const; - ClassDefNV(CTFHeader, 3) + ClassDefNV(CTFHeader, 4) }; std::ostream& operator<<(std::ostream& stream, const CTFHeader& c); diff --git a/DataFormats/Detectors/Common/src/CTFHeader.cxx b/DataFormats/Detectors/Common/src/CTFHeader.cxx index 7afb3e78eca48..8087a43ea7f91 100644 --- a/DataFormats/Detectors/Common/src/CTFHeader.cxx +++ b/DataFormats/Detectors/Common/src/CTFHeader.cxx @@ -18,7 +18,7 @@ using DetID = o2::detectors::DetID; /// describe itsel as a string std::string CTFHeader::describe() const { - return fmt::format("Run:{:07d} TF@orbit:{:08d} CteationTime:{} Detectors: {}", run, firstTForbit, creationTime, DetID::getNames(detectors)); + return fmt::format("Run:{:07d} TF{} Orbit:{:08d} CteationTime:{} Detectors: {}", run, tfCounter, firstTForbit, creationTime, DetID::getNames(detectors)); } std::ostream& o2::ctf::operator<<(std::ostream& stream, const CTFHeader& h) diff --git a/Detectors/CTF/workflow/src/CTFReaderSpec.cxx b/Detectors/CTF/workflow/src/CTFReaderSpec.cxx index 42e1154ede4ae..fe5063cb453a4 100644 --- a/Detectors/CTF/workflow/src/CTFReaderSpec.cxx +++ b/Detectors/CTF/workflow/src/CTFReaderSpec.cxx @@ -235,7 +235,7 @@ void CTFReaderSpec::processTF(ProcessingContext& pc) auto& timingInfo = pc.services().get(); timingInfo.firstTFOrbit = ctfHeader.firstTForbit; timingInfo.creation = ctfHeader.creationTime; - timingInfo.tfCounter = mCTFCounter; + timingInfo.tfCounter = ctfHeader.tfCounter; timingInfo.runNumber = ctfHeader.run; // send CTF Header diff --git a/Detectors/CTF/workflow/src/CTFWriterSpec.cxx b/Detectors/CTF/workflow/src/CTFWriterSpec.cxx index 32c064a627941..e9b35db5d1ad8 100644 --- a/Detectors/CTF/workflow/src/CTFWriterSpec.cxx +++ b/Detectors/CTF/workflow/src/CTFWriterSpec.cxx @@ -399,7 +399,7 @@ void CTFWriterSpec::run(ProcessingContext& pc) } // create header - CTFHeader header{mRun, dph->creation, dh->firstTForbit}; + CTFHeader header{mRun, dph->creation, dh->firstTForbit, dh->tfCounter}; size_t szCTF = 0; szCTF += processDet(pc, DetID::ITS, header, mCTFTreeOut.get()); szCTF += processDet(pc, DetID::MFT, header, mCTFTreeOut.get());