Skip to content
Closed

Fixes #2654

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
11 changes: 6 additions & 5 deletions Modules/CTP/include/CTP/RawDataQcTask.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include "CTPReconstruction/RawDataDecoder.h"
#include "Common/TH1Ratio.h"
#include <memory>
#include <unordered_set>

class TH1D;

Expand Down Expand Up @@ -61,11 +62,10 @@ class CTPRawDataReaderTask final : public TaskInterface
std::unique_ptr<TH1D> mHistoBCMinBias1 = nullptr; // histogram of BC positions to check LHC filling scheme
std::unique_ptr<TH1D> mHistoBCMinBias2 = nullptr; // histogram of BC positions to check LHC filling scheme
std::unique_ptr<TH1D> mHistoDecodeError = nullptr; // histogram of erros from decoder
static constexpr int mUsedInputsMax = 18;
std::array<TH1D*, mUsedInputsMax> mHisInputs = {}; ///< Array of input histograms, all BCs
std::array<TH1D*, mUsedInputsMax> mHisInputsYesLHC = {}; ///< Array of input histograms, LHC BCs
std::array<TH1D*, mUsedInputsMax> mHisInputsNotLHC = {}; ///< Array of input histograms, not LHC BCs
std::array<std::size_t, mUsedInputsMax> shiftBC = {}; ///< Array of shifts for the BCs for each input
std::array<TH1D*, o2::ctp::CTP_NINPUTS> mHisInputs = {}; ///< Array of input histograms, all BCs
std::array<TH1D*, o2::ctp::CTP_NINPUTS> mHisInputsYesLHC = {}; ///< Array of input histograms, LHC BCs
std::array<TH1D*, o2::ctp::CTP_NINPUTS> mHisInputsNotLHC = {}; ///< Array of input histograms, not LHC BCs
std::array<std::size_t, o2::ctp::CTP_NINPUTS> shiftBC = {}; ///< Array of shifts for the BCs for each input
int mRunNumber;
int indexMB1 = -1;
int indexMB2 = -1;
Expand All @@ -86,6 +86,7 @@ class CTPRawDataReaderTask final : public TaskInterface
bool mPerformConsistencyCheck = false;
std::bitset<o2::constants::lhc::LHCMaxBunches> mLHCBCs; /// LHC filling scheme
bool lhcDataFileFound = true;
std::unordered_set<int> mListOfUsedInputs = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 13, 15, 16, 17, 18, 25, 26 };
};

} // namespace o2::quality_control_modules::ctp
Expand Down
12 changes: 7 additions & 5 deletions Modules/CTP/src/RawDataQcTask.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,11 @@ void CTPRawDataReaderTask::initialize(o2::framework::InitContext& /*ctx*/)
mHisInputsNotLHC[i]->SetLineColor(kRed + 1);
mHisInputsNotLHC[i]->SetFillColor(kRed + 1);

getObjectsManager()->startPublishing(mHisInputs[i]);
getObjectsManager()->startPublishing(mHisInputsYesLHC[i]);
// getObjectsManager()->startPublishing(mHisInputsNotLHC[i]);
if (mListOfUsedInputs.count(i + 1)) {
getObjectsManager()->startPublishing(mHisInputs[i]);
getObjectsManager()->startPublishing(mHisInputsYesLHC[i]);
// getObjectsManager()->startPublishing(mHisInputsNotLHC[i]);
}
}

mDecoder.setDoLumi(1);
Expand Down Expand Up @@ -289,7 +291,7 @@ void CTPRawDataReaderTask::monitorData(o2::framework::ProcessingContext& ctx)
static constexpr double sOrbitLengthInMS = o2::constants::lhc::LHCOrbitMUS / 1000;
auto nOrbitsPerTF = 32.;
// get the input
std::vector<o2::framework::InputSpec> filter{ o2::framework::InputSpec{ "filter", o2::framework::ConcreteDataTypeMatcher{ "DS", "RAWDATA" }, o2::framework::Lifetime::Timeframe } };
std::vector<o2::framework::InputSpec> filter{ o2::framework::InputSpec{ "filter", o2::framework::ConcreteDataTypeMatcher{ "DS", "CTPRAWDATA" }, o2::framework::Lifetime::Timeframe } };
std::vector<o2::ctp::LumiInfo> lumiPointsHBF1;
std::vector<o2::ctp::CTPDigit> outputDigits;

Expand Down Expand Up @@ -342,7 +344,7 @@ void CTPRawDataReaderTask::monitorData(o2::framework::ProcessingContext& ctx)
for (auto const digit : outputDigits) {
uint16_t bcid = digit.intRecord.bc;
if (digit.CTPInputMask.count()) {
for (int i = 0; i < mUsedInputsMax; i++) {
for (int i = 0; i < o2::ctp::CTP_NINPUTS; i++) {
if (digit.CTPInputMask[i]) {
mHistoInputs->getNum()->Fill(i);
mHistoInputRatios->getNum()->Fill(i);
Expand Down
Loading