45 mDumpCMVs = ic.options().get<
bool>(
"dump-cmvs-flp");
46 mEnableTrigger = ic.options().get<
bool>(
"trigger");
47 mTriggerThresholdCMV = ic.options().get<
float>(
"trigger-threshold-cmv");
48 mTriggerThresholdMeanMax = ic.options().get<
float>(
"trigger-threshold-cmvMeanMax");
49 mTriggerThresholdMeanMin = ic.options().get<
float>(
"trigger-threshold-cmvMeanMin");
50 mTriggerTimebinMin = ic.options().get<
int>(
"trigger-threshold-timebinMin");
51 mTriggerTimebinMax = ic.options().get<
int>(
"trigger-threshold-timebinMax");
61 if (mCountTFsForBuffer == 1) {
63 auto const*
hdr = o2::framework::DataRefUtils::getHeader<o2::header::DataHeader*>(
ref);
64 const uint32_t cru =
hdr->subSpecification >> 7;
65 if (mFirstOrbitBC.find(cru) == mFirstOrbitBC.end()) {
66 auto orbitVec = pc.inputs().get<std::vector<uint64_t>>(
ref);
67 if (!orbitVec.empty()) {
68 mFirstOrbitBC[cru] = orbitVec[0];
74 bool triggered =
false;
76 auto const* tpcCRUHeader = o2::framework::DataRefUtils::getHeader<o2::header::DataHeader*>(
ref);
77 const uint32_t cru = tpcCRUHeader->subSpecification >> 7;
79 mCMVs[cru].insert(mCMVs[cru].
end(), vecCMVs.begin(), vecCMVs.end());
81 const bool cruTriggered = mEnableTrigger && evaluateTrigger(vecCMVs);
82 if (!mTriggerPerFLP) {
85 triggered |= cruTriggered;
93 if (mCountTFsForBuffer >= mNTFsBuffer) {
94 mCountTFsForBuffer = 0;
95 for (
const auto cru : mCRUs) {
97 sendOutput(pc.outputs(), cru);
99 mFirstOrbitBC.clear();
105 auto const* tpcCRUHeader = o2::framework::DataRefUtils::getHeader<o2::header::DataHeader*>(
ref);
106 const int cru = tpcCRUHeader->subSpecification >> 7;
107 auto vec = pc.inputs().get<std::vector<uint16_t>>(
ref);
108 fOut.WriteObject(&
vec, fmt::format(
"CRU_{}", cru).data());