Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Store original tfCounter in the CTFHeader #8618

Merged
merged 1 commit into from
Apr 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion DataFormats/Detectors/Common/src/CTFHeader.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion Detectors/CTF/workflow/src/CTFReaderSpec.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ void CTFReaderSpec::processTF(ProcessingContext& pc)
auto& timingInfo = pc.services().get<TimingInfo>();
timingInfo.firstTFOrbit = ctfHeader.firstTForbit;
timingInfo.creation = ctfHeader.creationTime;
timingInfo.tfCounter = mCTFCounter;
timingInfo.tfCounter = ctfHeader.tfCounter;
timingInfo.runNumber = ctfHeader.run;

// send CTF Header
Expand Down
2 changes: 1 addition & 1 deletion Detectors/CTF/workflow/src/CTFWriterSpec.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -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<o2::itsmft::CTF>(pc, DetID::ITS, header, mCTFTreeOut.get());
szCTF += processDet<o2::itsmft::CTF>(pc, DetID::MFT, header, mCTFTreeOut.get());
Expand Down