Skip to content

Commit a113b4b

Browse files
noferinishahor02
authored andcommitted
add tfidinfo in tof calibinfo
1 parent 7c32f33 commit a113b4b

File tree

3 files changed

+16
-1
lines changed

3 files changed

+16
-1
lines changed

DataFormats/Detectors/TOF/include/DataFormatsTOF/Diagnostic.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
#include <map>
1919
#include <TObject.h>
2020
#include <gsl/gsl>
21+
#include "CommonDataFormat/TFIDInfo.h"
2122

2223
namespace o2
2324
{
@@ -89,11 +90,14 @@ class Diagnostic
8990
int getTimeStamp() const { return mTimestamp; }
9091
void setTimeStamp(int val) { mTimestamp = val; }
9192

93+
void setTFIDInfo(const o2::dataformats::TFIDInfo& val) { mTFinfo = val; }
94+
9295
private:
9396
std::map<ULong64_t, uint32_t> mVector; // diagnostic frequency vector (key/pattern , frequency)
9497
int mTimestamp = 0; // timestamp in seconds
98+
o2::dataformats::TFIDInfo mTFinfo; // TF id info
9599

96-
ClassDefNV(Diagnostic, 2);
100+
ClassDefNV(Diagnostic, 3);
97101
};
98102

99103
} // namespace tof

Detectors/TOF/workflow/src/CompressedDecodingTask.cxx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
#include "Framework/InputRecordWalker.h"
3030
#include "Framework/DataRefUtils.h"
3131
#include "CommonUtils/VerbosityConfig.h"
32+
#include "DetectorsBase/TFIDInfoHelper.h"
3233

3334
using namespace o2::framework;
3435

@@ -118,6 +119,11 @@ void CompressedDecodingTask::postData(ProcessingContext& pc)
118119

119120
auto diagnosticFrequency = mDecoder.getDiagnosticFrequency();
120121
diagnosticFrequency.setTimeStamp(mCreationTime / 1000);
122+
// add TFIDInfo
123+
o2::dataformats::TFIDInfo tfinfo;
124+
o2::base::TFIDInfoHelper::fillTFIDInfo(pc, tfinfo);
125+
diagnosticFrequency.setTFIDInfo(tfinfo);
126+
121127
//diagnosticFrequency.print();
122128
pc.outputs().snapshot(Output{o2::header::gDataOriginTOF, "DIAFREQ", 0, Lifetime::Timeframe}, diagnosticFrequency);
123129

Detectors/TOF/workflow/src/EntropyDecoderSpec.cxx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
#include "Framework/ConfigParamRegistry.h"
1818
#include "Framework/CCDBParamSpec.h"
1919
#include "TOFWorkflowUtils/EntropyDecoderSpec.h"
20+
#include "DetectorsBase/TFIDInfoHelper.h"
2021

2122
using namespace o2::framework;
2223

@@ -75,6 +76,10 @@ void EntropyDecoderSpec::run(ProcessingContext& pc)
7576
auto diagnostic = mFiller.getDiagnosticFrequency();
7677
auto creationTime = pc.services().get<o2::framework::TimingInfo>().creation;
7778
diagnostic.setTimeStamp(creationTime / 1000);
79+
// add TFIDInfo
80+
o2::dataformats::TFIDInfo tfinfo;
81+
o2::base::TFIDInfoHelper::fillTFIDInfo(pc, tfinfo);
82+
diagnostic.setTFIDInfo(tfinfo);
7883
pc.outputs().snapshot(Output{o2::header::gDataOriginTOF, "DIAFREQ", 0, Lifetime::Timeframe}, diagnostic);
7984
pc.outputs().snapshot({"ctfrep", 0}, iosize);
8085
mTimer.Stop();

0 commit comments

Comments
 (0)