diff --git a/DataFormats/Detectors/TOF/include/DataFormatsTOF/Diagnostic.h b/DataFormats/Detectors/TOF/include/DataFormatsTOF/Diagnostic.h index 8adcdb63e9d21..028da04b3ef70 100644 --- a/DataFormats/Detectors/TOF/include/DataFormatsTOF/Diagnostic.h +++ b/DataFormats/Detectors/TOF/include/DataFormatsTOF/Diagnostic.h @@ -44,6 +44,13 @@ class Diagnostic uint32_t fillEmptyTOF(uint32_t frequency = 1) { return fill(1, frequency); } static ULong64_t getEmptyCrateKey(int crate); static ULong64_t getNoisyChannelKey(int channel); + static ULong64_t getDRMKey(int crate) { return 1000000 + crate * 1000; } + static ULong64_t getDRMerrorKey(int crate, int error) { return getDRMKey(crate) + error; } + uint32_t getFrequencyDRM(int crate) const { return getFrequency(getDRMKey(crate)); } + uint32_t getFrequencyDRMerror(int crate, int error) const { return getFrequency(getDRMerrorKey(crate, error)); } + uint32_t fillDRM(int crate, uint32_t frequency) { return fill(getDRMKey(crate), frequency); } + uint32_t fillDRMerror(int crate, int error, uint32_t frequency) { return fill(getDRMerrorKey(crate, error), frequency); } + static ULong64_t getTRMKey(int crate, int trm); void print(bool longFormat = false) const; void clear() { mVector.clear(); } diff --git a/Detectors/TOF/base/include/TOFBase/CalibTOFapi.h b/Detectors/TOF/base/include/TOFBase/CalibTOFapi.h index c3d39d3e978e1..d53737a50abc2 100644 --- a/Detectors/TOF/base/include/TOFBase/CalibTOFapi.h +++ b/Detectors/TOF/base/include/TOFBase/CalibTOFapi.h @@ -24,6 +24,8 @@ #include "DataFormatsTOF/Diagnostic.h" #include "DataFormatsTOF/TOFFEElightInfo.h" +class TH2F; + namespace o2 { namespace tof @@ -38,10 +40,12 @@ class CalibTOFapi using CcdbApi = o2::ccdb::CcdbApi; public: + static o2::tof::Diagnostic doDRMerrCalibFromQCHisto(const TH2F* histo, const char* file_output_name); + void resetDia(); CalibTOFapi() = default; CalibTOFapi(const std::string url); - CalibTOFapi(long timestamp, o2::dataformats::CalibLHCphaseTOF* phase, o2::dataformats::CalibTimeSlewingParamTOF* slew, Diagnostic* dia = nullptr) : mTimeStamp(timestamp), mLHCphase(phase), mSlewParam(slew), mDiaFreq(dia) {} + CalibTOFapi(long timestamp, o2::dataformats::CalibLHCphaseTOF* phase, o2::dataformats::CalibTimeSlewingParamTOF* slew, Diagnostic* dia = nullptr, Diagnostic* diaDRM = nullptr) : mTimeStamp(timestamp), mLHCphase(phase), mSlewParam(slew), mDiaFreq(dia), mDiaDRMFreq(diaDRM) {} ~CalibTOFapi() { if (mLHCphase) { @@ -53,6 +57,9 @@ class CalibTOFapi if (mDiaFreq) { // delete mDiaFreq; } + if (mDiaDRMFreq) { + // delete mDiaDRMFreq; + } } void setTimeStamp(long t) @@ -69,6 +76,8 @@ class CalibTOFapi void readTimeSlewingParamFromFile(const char* filename); void readDiagnosticFrequencies(); void loadDiagnosticFrequencies(); + void readDiagnosticDRMFrequencies(); + void loadDiagnosticDRMFrequencies(); void readActiveMap(); void loadActiveMap(TOFFEElightInfo* fee); void writeLHCphase(LhcPhase* phase, std::map metadataLHCphase, uint64_t minTimeSTamp, uint64_t maxTimeStamp); @@ -89,6 +98,8 @@ class CalibTOFapi void setLhcPhase(LhcPhase* obj) { mLHCphase = obj; } Diagnostic* getDiagnostic() { return mDiaFreq; } void setDiagnostic(Diagnostic* obj) { mDiaFreq = obj; } + Diagnostic* getDiagnosticDRM() { return mDiaDRMFreq; } + void setDiagnosticDRM(Diagnostic* obj) { mDiaDRMFreq = obj; } int getNoisyThreshold() const { return mNoisyThreshold; } void setNoisyThreshold(int val) { mNoisyThreshold = val; } @@ -103,11 +114,15 @@ class CalibTOFapi bool isChannelError(int channel) const; bool checkTRMPolicy(int mask) const; + void setDRMCriticalErrorMask(uint32_t val) { mDRMCriticalErrorMask = val; } + uint32_t getDRMCriticalErrorMask() const { return mDRMCriticalErrorMask; } + private: - long mTimeStamp; ///< timeStamp for queries - LhcPhase* mLHCphase = nullptr; ///< object for LHC phase - SlewParam* mSlewParam = nullptr; ///< object for timeslewing (containing info also for offset and problematic) - Diagnostic* mDiaFreq = nullptr; ///< object for Diagnostic Frequency + long mTimeStamp; ///< timeStamp for queries + LhcPhase* mLHCphase = nullptr; ///< object for LHC phase + SlewParam* mSlewParam = nullptr; ///< object for timeslewing (containing info also for offset and problematic) + Diagnostic* mDiaFreq = nullptr; ///< object for Diagnostic Frequency + Diagnostic* mDiaDRMFreq = nullptr; ///< object for Diagnostic Frequency // info from diagnostic int mNoisyThreshold = 1; ///< threshold to be noisy @@ -116,13 +131,15 @@ class CalibTOFapi std::vector> mNoisy; ///< probTRMerror std::vector> mTRMerrorProb; ///< probTRMerror std::vector mTRMmask; ///< mask error for TRM + float mErrorInDRM[72] = {}; ///< probability of DRM error + uint32_t mDRMCriticalErrorMask = 0; ///< bit mask for critical DRM errors (e.g. Orbit Mismatch -> 1 << 7, see DataFormats/Detectors/TOF/include/DataFormatsTOF/CompressedDataFormat.h) bool mIsErrorCh[Geo::NCHANNELS] = {}; ///< channels in error (TRM) std::vector mFillErrChannel; ///< last error channels filled bool mIsOffCh[Geo::NCHANNELS] = {}; ///< channels in error (TRM) bool mIsNoisy[Geo::NCHANNELS] = {}; ///< noisy channels - ClassDefNV(CalibTOFapi, 1); + ClassDefNV(CalibTOFapi, 2); }; } // namespace tof } // namespace o2 diff --git a/Detectors/TOF/base/src/CalibTOFapi.cxx b/Detectors/TOF/base/src/CalibTOFapi.cxx index 281498990a9dd..ea093554371ed 100644 --- a/Detectors/TOF/base/src/CalibTOFapi.cxx +++ b/Detectors/TOF/base/src/CalibTOFapi.cxx @@ -11,11 +11,40 @@ #include "TOFBase/CalibTOFapi.h" #include // for LOG +#include using namespace o2::tof; ClassImp(o2::tof::CalibTOFapi); +o2::tof::Diagnostic CalibTOFapi::doDRMerrCalibFromQCHisto(const TH2F* histo, const char* file_output_name) +{ + // this is a method which translate the QC output in qc/TOF/MO/TaskRaw/DRMCounter (TH2F) into a Diagnotic object for DRM (patter(crate, error), frequency) + // note that, differently from TRM errors, DRM ones are not stored in CTF by design (since very rare, as expected). Such an info is available only at the level of raw sync QC + o2::tof::Diagnostic drmDia; + + for (int j = 1; j <= 72; j++) { + drmDia.fillDRM(j - 1, histo->GetBinContent(1, j)); + for (int i = 2; i <= histo->GetXaxis()->GetNbins(); i++) { + if (histo->GetBinContent(1, j)) { + if (histo->GetBinContent(i, j) > 0) { + drmDia.fillDRMerror(j - 1, i - 1, histo->GetBinContent(i, j)); + } + } + } + } + + TFile* fo = new TFile(file_output_name, "RECREATE"); + fo->WriteObjectAny(&drmDia, drmDia.Class_Name(), "ccdb_object"); + fo->Close(); + LOG(info) << "DRM error ccdb object created in " << file_output_name << " with this content"; + drmDia.print(true); + + return drmDia; +} + +//______________________________________________________________________ + void CalibTOFapi::resetDia() { memset(mEmptyCrateProb, 0., Geo::kNCrate * 4); @@ -116,11 +145,23 @@ void CalibTOFapi::readDiagnosticFrequencies() { auto& mgr = CcdbManager::instance(); long timems = long(mTimeStamp) * 1000; - LOG(info) << "TOF get Diagnostics with timestamp (ms) = " << timems; + LOG(info) << "TOF get TRM Diagnostics with timestamp (ms) = " << timems; mDiaFreq = mgr.getForTimeStamp("TOF/Calib/Diagnostic", timems); loadDiagnosticFrequencies(); } + +//______________________________________________________________________ + +void CalibTOFapi::readDiagnosticDRMFrequencies() +{ + auto& mgr = CcdbManager::instance(); + long timems = long(mTimeStamp) * 1000; + LOG(info) << "TOF get DRM Diagnostics with timestamp (ms) = " << timems; + mDiaFreq = mgr.getForTimeStamp("TOF/Calib/TRMerrors", timems); + + loadDiagnosticDRMFrequencies(); +} //______________________________________________________________________ void CalibTOFapi::loadDiagnosticFrequencies() @@ -210,6 +251,36 @@ void CalibTOFapi::loadDiagnosticFrequencies() //______________________________________________________________________ +void CalibTOFapi::loadDiagnosticDRMFrequencies() +{ + mDiaDRMFreq->print(); + + for (int ic = 0; ic < 72; ic++) { // loop over crates + float DRMcounters = mDiaDRMFreq->getFrequencyDRM(ic); + + if (DRMcounters < 1) { + mErrorInDRM[ic] = 0.; + continue; + } + + float probGood = 1; + + for (int ie = 0; ie < 28; ie++) { // loop over error types + uint32_t bitError = 1 << ie; + if (bitError & mDRMCriticalErrorMask) { // if error has to be masked + float frequency = mDiaDRMFreq->getFrequencyDRMerror(ic, ie) * 1. / mErrorInDRM[ic]; // error frequency + if (frequency > 1) { + frequency = 1.; + } + probGood *= (1 - frequency); // frequency of no error assuming all types are independent + } + } + mErrorInDRM[ic] = 1 - probGood; // probability of at least one error to be masked + } +} + +//______________________________________________________________________ + void CalibTOFapi::writeLHCphase(LhcPhase* phase, std::map metadataLHCphase, uint64_t minTimeStamp, uint64_t maxTimeStamp) { diff --git a/Detectors/TOF/prototyping/CMakeLists.txt b/Detectors/TOF/prototyping/CMakeLists.txt index 1ce2268f1358a..7dfc9f8cb7361 100644 --- a/Detectors/TOF/prototyping/CMakeLists.txt +++ b/Detectors/TOF/prototyping/CMakeLists.txt @@ -32,6 +32,16 @@ o2_add_test_root_macro(findLabels.C O2::TOFBase LABELS tof) +o2_add_test_root_macro(makeDRMobj_tof.C + PUBLIC_LINK_LIBRARIES O2::DataFormatsTOF + O2::TOFBase + LABELS tof) + +o2_add_test_root_macro(checkDRMobj_tof.C + PUBLIC_LINK_LIBRARIES O2::DataFormatsTOF + O2::TOFBase + LABELS tof) + o2_add_test_root_macro(findTOFclusterFromLabel.C PUBLIC_LINK_LIBRARIES O2::DataFormatsTOF O2::SimulationDataFormat @@ -59,3 +69,8 @@ o2_add_test_root_macro(macroEvTime.C PUBLIC_LINK_LIBRARIES O2::TOFBase O2::TOFReconstruction LABELS tof) + +install( + FILES makeDRMobj_tof.C + checkDRMobj_tof.C + DESTINATION share/macro/) diff --git a/Detectors/TOF/prototyping/checkDRMobj_tof.C b/Detectors/TOF/prototyping/checkDRMobj_tof.C new file mode 100644 index 0000000000000..9652a4fb9823e --- /dev/null +++ b/Detectors/TOF/prototyping/checkDRMobj_tof.C @@ -0,0 +1,41 @@ +// Copyright 2019-2020 CERN and copyright holders of ALICE O2. +// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders. +// All rights not expressly granted are reserved. +// +// This software is distributed under the terms of the GNU General Public +// License v3 (GPL Version 3), copied verbatim in the file "COPYING". +// +// In applying this license CERN does not waive the privileges and immunities +// granted to it by virtue of its status as an Intergovernmental Organization +// or submit itself to any jurisdiction. + +#if !defined(__CLING__) || defined(__ROOTCLING__) +#include "TFile.h" +#include "TH2F.h" +#include "TOFBase/CalibTOFapi.h" +#endif + +void checkDRMobj_tof(const char* fname = "ccdb.root") +{ + TFile* f = new TFile(fname); + + TH2F* hErrors = new TH2F("hDRMerrors", ";error code; frequency", 30, 0, 30, 72, 0, 72); + + o2::tof::Diagnostic* drmDia = (o2::tof::Diagnostic*)f->Get("ccdb_object"); + + for (int j = 1; j <= 72; j++) { + uint32_t patternRDH = o2::tof::Diagnostic::getDRMKey(j - 1); + for (int i = 1; i <= hErrors->GetXaxis()->GetNbins(); i++) { + uint32_t pattern = o2::tof::Diagnostic::getDRMerrorKey(j - 1, i - 1); + if (drmDia->getFrequency(patternRDH)) { + hErrors->SetBinContent(i, j, drmDia->getFrequency(pattern) * 1. / drmDia->getFrequency(patternRDH)); + } + } + } + + TCanvas* c = new TCanvas(); + c->cd(1); + hErrors->Draw("colz"); + + drmDia->print(true); +} diff --git a/Detectors/TOF/prototyping/makeDRMobj_tof.C b/Detectors/TOF/prototyping/makeDRMobj_tof.C new file mode 100644 index 0000000000000..8fabaf3c49c77 --- /dev/null +++ b/Detectors/TOF/prototyping/makeDRMobj_tof.C @@ -0,0 +1,39 @@ +// Copyright 2019-2020 CERN and copyright holders of ALICE O2. +// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders. +// All rights not expressly granted are reserved. +// +// This software is distributed under the terms of the GNU General Public +// License v3 (GPL Version 3), copied verbatim in the file "COPYING". +// +// In applying this license CERN does not waive the privileges and immunities +// granted to it by virtue of its status as an Intergovernmental Organization +// or submit itself to any jurisdiction. + +#if !defined(__CLING__) || defined(__ROOTCLING__) +#include "TFile.h" +#include "TH2F.h" +#include "TOFBase/CalibTOFapi.h" +#endif + +void makeDRMobj_tof(const char* inputfile = "TObject_1764607157510.root", bool dummy = false) +{ + if (dummy) { + o2::tof::Diagnostic drmDia; + for (int j = 1; j <= 72; j++) { + drmDia.fill(o2::tof::Diagnostic::getDRMKey(j - 1)); + } + + TFile* fo = new TFile("ccdb.root", "RECREATE"); + fo->WriteObjectAny(&drmDia, drmDia.Class_Name(), "ccdb_object"); + fo->Close(); + + return; + } + + TFile* f = new TFile(inputfile); + TH2F* h = (TH2F*)f->Get("ccdb_object"); + + o2::tof::Diagnostic drmDia; + + drmDia = o2::tof::CalibTOFapi::doDRMerrCalibFromQCHisto(h, "ccdb.root"); +} diff --git a/Steer/DigitizerWorkflow/src/SimpleDigitizerWorkflow.cxx b/Steer/DigitizerWorkflow/src/SimpleDigitizerWorkflow.cxx index c45c746064101..e45f604337ebb 100644 --- a/Steer/DigitizerWorkflow/src/SimpleDigitizerWorkflow.cxx +++ b/Steer/DigitizerWorkflow/src/SimpleDigitizerWorkflow.cxx @@ -202,6 +202,7 @@ void customize(std::vector& workflowOptions) // option to use/not use CCDB for TOF workflowOptions.push_back(ConfigParamSpec{"use-ccdb-tof", o2::framework::VariantType::Bool, false, {"enable access to ccdb tof calibration objects"}}); workflowOptions.push_back(ConfigParamSpec{"ccdb-tof-sa", o2::framework::VariantType::Bool, false, {"enable access to ccdb tof calibration objects via CCDBManager (obsolete remap to use-ccdb-tof)"}}); + workflowOptions.push_back(ConfigParamSpec{"tof-drm-bitmask", o2::framework::VariantType::Int, 128, {"bit mask of DRM critical errors"}}); // 128 = orbit mismatch // option to use/not use CCDB for FT0 workflowOptions.push_back(ConfigParamSpec{"use-ccdb-ft0", o2::framework::VariantType::Bool, false, {"enable access to ccdb ft0 calibration objects"}}); @@ -677,10 +678,11 @@ WorkflowSpec defineDataProcessing(ConfigContext const& configcontext) auto ccdb_url_tof = o2::base::NameConf::getCCDBServer(); auto timestamp = o2::raw::HBFUtils::Instance().startTime / 1000; detList.emplace_back(o2::detectors::DetID::TOF); + auto maskDRM = (uint32_t)configcontext.options().get("tof-drm-bitmask"); // connect the TOF digitization // printf("TOF Setting: use-ccdb = %d ---- ccdb url=%s ---- timestamp=%ld\n", useCCDB, ccdb_url_tof.c_str(), timestamp); - digitizerSpecs.emplace_back(o2::tof::getTOFDigitizerSpec(fanoutsize++, useCCDB, mctruth, ccdb_url_tof.c_str(), timestamp)); + digitizerSpecs.emplace_back(o2::tof::getTOFDigitizerSpec(fanoutsize++, useCCDB, mctruth, ccdb_url_tof.c_str(), timestamp, maskDRM)); // add TOF digit writer writerSpecs.emplace_back(o2::tof::getTOFDigitWriterSpec(mctruth)); } diff --git a/Steer/DigitizerWorkflow/src/TOFDigitizerSpec.cxx b/Steer/DigitizerWorkflow/src/TOFDigitizerSpec.cxx index e512659686c86..2a7800985fc1f 100644 --- a/Steer/DigitizerWorkflow/src/TOFDigitizerSpec.cxx +++ b/Steer/DigitizerWorkflow/src/TOFDigitizerSpec.cxx @@ -48,7 +48,7 @@ namespace tof class TOFDPLDigitizerTask : public o2::base::BaseDPLDigitizer { public: - TOFDPLDigitizerTask(bool useCCDB, std::string ccdb_url, int timestamp) : mUseCCDB{useCCDB}, mCCDBurl(ccdb_url), mTimestamp(timestamp), o2::base::BaseDPLDigitizer(o2::base::InitServices::FIELD | o2::base::InitServices::GEOM), mPass(o2::conf::DigiParams::Instance().passName){}; + TOFDPLDigitizerTask(bool useCCDB, std::string ccdb_url, int timestamp, uint32_t mask) : mUseCCDB{useCCDB}, mCCDBurl(ccdb_url), mTimestamp(timestamp), o2::base::BaseDPLDigitizer(o2::base::InitServices::FIELD | o2::base::InitServices::GEOM), mPass(o2::conf::DigiParams::Instance().passName), mMaskDRM(mask){}; void initDigitizerTask(framework::InitContext& ic) override { @@ -77,6 +77,10 @@ class TOFDPLDigitizerTask : public o2::base::BaseDPLDigitizer mUpdateCCDB = true; return; } + if (matcher == ConcreteDataMatcher("TOF", "DiagnosticDRM", 0)) { + mUpdateCCDB = true; + return; + } if (matcher == ConcreteDataMatcher("TOF", "LHCphaseCal", 0)) { mUpdateCCDB = true; return; @@ -127,6 +131,7 @@ class TOFDPLDigitizerTask : public o2::base::BaseDPLDigitizer const auto lhcPhaseIn = pc.inputs().get("tofccdbLHCphase"); const auto channelCalibIn = pc.inputs().get("tofccdbChannelCalib"); const auto diagnosticIn = pc.inputs().get("tofccdbDia"); + const auto diagnosticDRM = pc.inputs().get("tofccdbDrm"); const auto statusIn = pc.inputs().get("tofccdbStatus"); const auto tofParams = pc.inputs().get("tofccdbParams"); @@ -165,11 +170,15 @@ class TOFDPLDigitizerTask : public o2::base::BaseDPLDigitizer o2::dataformats::CalibLHCphaseTOF* lhcPhase = new o2::dataformats::CalibLHCphaseTOF(std::move(*lhcPhaseIn)); o2::dataformats::CalibTimeSlewingParamTOF* channelCalib = new o2::dataformats::CalibTimeSlewingParamTOF(std::move(*channelCalibIn)); o2::tof::Diagnostic* diagnostic = new o2::tof::Diagnostic(std::move(*diagnosticIn)); + o2::tof::Diagnostic* diagnosticDRMerr = new o2::tof::Diagnostic(std::move(*diagnosticDRM)); o2::tof::TOFFEElightInfo* status = new o2::tof::TOFFEElightInfo(std::move(*statusIn)); - mCalibApi = new o2::tof::CalibTOFapi(long(0), lhcPhase, channelCalib, diagnostic); + mCalibApi = new o2::tof::CalibTOFapi(long(0), lhcPhase, channelCalib, diagnostic, diagnosticDRMerr); + mCalibApi->setDRMCriticalErrorMask(mMaskDRM); mCalibApi->loadDiagnosticFrequencies(); + mCalibApi->loadDiagnosticDRMFrequencies(); mCalibApi->loadActiveMap(status); + mUpdateCCDB = false; } else { // update if necessary if (mUpdateCCDB) { @@ -178,10 +187,14 @@ class TOFDPLDigitizerTask : public o2::base::BaseDPLDigitizer o2::dataformats::CalibLHCphaseTOF* lhcPhase = new o2::dataformats::CalibLHCphaseTOF(*lhcPhaseIn); o2::dataformats::CalibTimeSlewingParamTOF* channelCalib = new o2::dataformats::CalibTimeSlewingParamTOF(*channelCalibIn); o2::tof::Diagnostic* diagnostic = new o2::tof::Diagnostic(std::move(*diagnosticIn)); + o2::tof::Diagnostic* diagnosticDRMerr = new o2::tof::Diagnostic(std::move(*diagnosticDRM)); o2::tof::TOFFEElightInfo* status = new o2::tof::TOFFEElightInfo(std::move(*statusIn)); mCalibApi = new o2::tof::CalibTOFapi(long(0), lhcPhase, channelCalib, diagnostic); + mCalibApi->setDRMCriticalErrorMask(mMaskDRM); mCalibApi->loadDiagnosticFrequencies(); + mCalibApi->loadDiagnosticDRMFrequencies(); mCalibApi->loadActiveMap(status); + mUpdateCCDB = false; } else { // do nothing @@ -201,10 +214,12 @@ class TOFDPLDigitizerTask : public o2::base::BaseDPLDigitizer channelCalibDummy->setFractionUnderPeak(sector, channelInSector, 1); } mCalibApi = new o2::tof::CalibTOFapi(long(mTimestamp), lhcPhaseDummy, channelCalibDummy); + mCalibApi->setDRMCriticalErrorMask(mMaskDRM); if (mUseCCDB) { mCalibApi->setURL(mCCDBurl); mCalibApi->readDiagnosticFrequencies(); + mCalibApi->readDiagnosticDRMFrequencies(); mCalibApi->readLHCphase(); mCalibApi->readActiveMap(); mCalibApi->readTimeSlewingParam(); @@ -300,9 +315,10 @@ class TOFDPLDigitizerTask : public o2::base::BaseDPLDigitizer bool mUpdateCCDB = false; o2::tof::CalibTOFapi* mCalibApi = nullptr; std::string mPass; + uint32_t mMaskDRM = 0; }; -DataProcessorSpec getTOFDigitizerSpec(int channel, bool useCCDB, bool mctruth, std::string ccdb_url, int timestamp) +DataProcessorSpec getTOFDigitizerSpec(int channel, bool useCCDB, bool mctruth, std::string ccdb_url, int timestamp, uint32_t maskDRM) { // create the full data processor spec using // a name identifier @@ -319,6 +335,7 @@ DataProcessorSpec getTOFDigitizerSpec(int channel, bool useCCDB, bool mctruth, s if (useCCDB) { inputs.emplace_back("tofccdbStatus", "TOF", "StatusTOF", 0, Lifetime::Condition, ccdbParamSpec("TOF/Calib/FEELIGHT")); inputs.emplace_back("tofccdbDia", "TOF", "DiagnosticCal", 0, Lifetime::Condition, ccdbParamSpec("TOF/Calib/Diagnostic")); + inputs.emplace_back("tofccdbDrm", "TOF", "DiagnosticDRM", 0, Lifetime::Condition, ccdbParamSpec("TOF/Calib/DRMerrors")); inputs.emplace_back("tofccdbLHCphase", "TOF", "LHCphaseCal", 0, Lifetime::Condition, ccdbParamSpec("TOF/Calib/LHCphase")); inputs.emplace_back("tofccdbChannelCalib", "TOF", "ChannelCalibCal", 0, Lifetime::Condition, ccdbParamSpec("TOF/Calib/ChannelCalib")); inputs.emplace_back("tofccdbParams", "TOF", "parameters", 0, Lifetime::Condition, ccdbParamSpec("TOF/Calib/Params")); @@ -337,7 +354,7 @@ DataProcessorSpec getTOFDigitizerSpec(int channel, bool useCCDB, bool mctruth, s "TOFDigitizer", inputs, outputs, - AlgorithmSpec{adaptFromTask(useCCDB, ccdb_url, timestamp)}, + AlgorithmSpec{adaptFromTask(useCCDB, ccdb_url, timestamp, maskDRM)}, Options{{"pileup", VariantType::Int, 1, {"whether to run in continuous time mode"}}} // I can't use VariantType::Bool as it seems to have a problem }; diff --git a/Steer/DigitizerWorkflow/src/TOFDigitizerSpec.h b/Steer/DigitizerWorkflow/src/TOFDigitizerSpec.h index f5841313c1cb0..f6e358dfe80bd 100644 --- a/Steer/DigitizerWorkflow/src/TOFDigitizerSpec.h +++ b/Steer/DigitizerWorkflow/src/TOFDigitizerSpec.h @@ -19,7 +19,7 @@ namespace o2 namespace tof { -o2::framework::DataProcessorSpec getTOFDigitizerSpec(int channel, bool useCCDB, bool mctruth, std::string ccdb_url, int timestamp); +o2::framework::DataProcessorSpec getTOFDigitizerSpec(int channel, bool useCCDB, bool mctruth, std::string ccdb_url, int timestamp, uint32_t maskDRM = 1 << 7); } // end namespace tof } // end namespace o2