Skip to content
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
4 changes: 2 additions & 2 deletions Modules/TOF/src/CheckCompressedData.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Quality CheckCompressedData::check(std::map<std::string, std::shared_ptr<Monitor
{

Quality result = Quality::Null;
ILOG(Info, Support) << "Checking quality of compressed data";
ILOG(Info, Support) << "Checking quality of compressed data" << ENDM;

for (auto& [moName, mo] : *moMap) {
(void)moName;
Expand Down Expand Up @@ -79,7 +79,7 @@ void CheckCompressedData::beautify(std::shared_ptr<MonitorObject> mo, Quality ch
msg->AddText("Diagnostics above zero");
}
} else {
ILOG(Error, Support) << "Did not get correct histo from " << mo->GetName();
ILOG(Error, Support) << "Did not get correct histo from " << mo->GetName() << ENDM;
}
}
} // namespace o2::quality_control_modules::tof
6 changes: 3 additions & 3 deletions Modules/TOF/src/CheckDRMDiagnostics.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Quality CheckDRMDiagnostics::check(std::map<std::string, std::shared_ptr<Monitor
{

Quality result = Quality::Null;
ILOG(Info, Support) << "Checking quality of diagnostic words";
ILOG(Info, Support) << "Checking quality of diagnostic words" << ENDM;

for (auto& [moName, mo] : *moMap) {
(void)moName;
Expand Down Expand Up @@ -69,7 +69,7 @@ void CheckDRMDiagnostics::beautify(std::shared_ptr<MonitorObject> mo, Quality ch
if (mo->getName() == "DRMCounter") {
auto* h = dynamic_cast<TH2F*>(mo->getObject());
if (!h) {
ILOG(Warning, Support) << "Did not get MO for DRMCounter";
ILOG(Warning, Support) << "Did not get MO for DRMCounter" << ENDM;
return;
}
auto msg = mShifterMessages.MakeMessagePad(h, checkResult);
Expand All @@ -85,7 +85,7 @@ void CheckDRMDiagnostics::beautify(std::shared_ptr<MonitorObject> mo, Quality ch
msg->AddText("email TOF on-call.");
}
} else
ILOG(Error, Support) << "Did not get correct histo from " << mo->GetName();
ILOG(Error, Support) << "Did not get correct histo from " << mo->GetName() << ENDM;
}

} // namespace o2::quality_control_modules::tof
4 changes: 2 additions & 2 deletions Modules/TOF/src/CheckDiagnostics.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Quality CheckDiagnostics::check(std::map<std::string, std::shared_ptr<MonitorObj
{

Quality result = Quality::Null;
ILOG(Info, Support) << "Checking quality of diagnostic words";
ILOG(Info, Support) << "Checking quality of diagnostic words" << ENDM;

for (auto& [moName, mo] : *moMap) {
(void)moName;
Expand Down Expand Up @@ -69,7 +69,7 @@ void CheckDiagnostics::beautify(std::shared_ptr<MonitorObject> mo, Quality check
msg->AddText("email TOF on-call.");
}
} else
ILOG(Error, Support) << "Did not get correct histo from " << mo->GetName();
ILOG(Error, Support) << "Did not get correct histo from " << mo->GetName() << ENDM;
}

} // namespace o2::quality_control_modules::tof
2 changes: 1 addition & 1 deletion Modules/TOF/src/CheckHitMap.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ void CheckHitMap::beautify(std::shared_ptr<MonitorObject> mo, Quality checkResul
// } else if (checkResult == Quality::Bad) {
// msg->AddText("Call TOF on-call.");
// } else if (checkResult == Quality::Medium) {
// ILOG(Info, Support) << "Quality::medium, setting to yellow";
// ILOG(Info, Support) << "Quality::medium, setting to yellow" << ENDM;
// msg->AddText("IF TOF IN RUN email TOF on-call.");
// }
} else {
Expand Down
4 changes: 3 additions & 1 deletion Modules/TOF/src/CheckNoise.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ Quality CheckNoise::check(std::map<std::string, std::shared_ptr<MonitorObject>>*
}
result = Quality::Medium;
locateChannel(i);
mShifterMessages.AddMessage(Form("%i %i %i %i %i %i", locatedSupermodule, locatedLink, locatedTrm, locatedChain, locatedTdc, locatedChannel));
std::string channelFormat = Form("%i %i %i %i %i %i", locatedSupermodule, locatedLink, locatedTrm, locatedChain, locatedTdc, locatedChannel);
mo->addMetadata(Form("noisyChannel%i"), channelFormat);
mShifterMessages.AddMessage(channelFormat);
}
}
return result;
Expand Down
2 changes: 1 addition & 1 deletion Modules/TOF/src/CheckRawMultiplicity.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ void CheckRawMultiplicity::beautify(std::shared_ptr<MonitorObject> mo, Quality c
} else if (checkResult == Quality::Bad) {
msg->AddText("Call TOF on-call.");
} else if (checkResult == Quality::Medium) {
ILOG(Info, Support) << "Quality::medium, setting to yellow";
ILOG(Info, Support) << "Quality::medium, setting to yellow" << ENDM;
msg->AddText("IF TOF IN RUN email TOF on-call.");
}
} else if (mo->getName() == "Multiplicity/SectorIA" ||
Expand Down
4 changes: 2 additions & 2 deletions Modules/TOF/src/CheckRawTime.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,10 @@ Quality CheckRawTime::check(std::map<std::string, std::shared_ptr<MonitorObject>
result = Quality::Good;
} else {
if (mRawTimePeakIntegral / mRawTimeIntegral > mMinPeakRatioIntegral) {
ILOG(Warning, Support) << Form("Raw time: peak/total integral = %5.2f, mean = %5.2f ns -> Check filling scheme...", mRawTimePeakIntegral / mRawTimeIntegral, mRawTimeMean);
ILOG(Warning, Support) << Form("Raw time: peak/total integral = %5.2f, mean = %5.2f ns -> Check filling scheme...", mRawTimePeakIntegral / mRawTimeIntegral, mRawTimeMean) << ENDM;
result = Quality::Medium;
} else {
ILOG(Warning, Support) << Form("Raw time peak/total integral = %5.2f, mean = %5.2f ns", mRawTimePeakIntegral / mRawTimeIntegral, mRawTimeMean);
ILOG(Warning, Support) << Form("Raw time peak/total integral = %5.2f, mean = %5.2f ns", mRawTimePeakIntegral / mRawTimeIntegral, mRawTimeMean) << ENDM;
result = Quality::Bad;
}
}
Expand Down
2 changes: 1 addition & 1 deletion Modules/TOF/src/CheckRawToT.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ void CheckRawToT::beautify(std::shared_ptr<MonitorObject> mo, Quality checkResul
} else if (checkResult == Quality::Bad) {
msg->AddText("Call TOF on-call.");
} else if (checkResult == Quality::Medium) {
ILOG(Info, Support) << "Quality::medium, setting to yellow";
ILOG(Info, Support) << "Quality::medium, setting to yellow" << ENDM;
msg->AddText("IF TOF IN RUN email TOF on-call.");
}
} else {
Expand Down
6 changes: 3 additions & 3 deletions Modules/TOF/src/TaskCosmics.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -62,15 +62,15 @@ void TaskCosmics::initialize(o2::framework::InitContext& /*ctx*/)
// Set task parameters from JSON
if (auto param = mCustomParameters.find("SelDeltaTSignalRegion"); param != mCustomParameters.end()) {
mSelDeltaTSignalRegion = atoi(param->second.c_str());
ILOG(Info, Support) << "Set SelDeltaTSignalRegion to " << mSelDeltaTSignalRegion << " ps";
ILOG(Info, Support) << "Set SelDeltaTSignalRegion to " << mSelDeltaTSignalRegion << " ps" << ENDM;
}
if (auto param = mCustomParameters.find("SelDeltaTBackgroundRegion"); param != mCustomParameters.end()) {
mSelDeltaTBackgroundRegion = atoi(param->second.c_str());
ILOG(Info, Support) << "Set SelDeltaTBackgroundRegion to " << mSelDeltaTBackgroundRegion << " ps";
ILOG(Info, Support) << "Set SelDeltaTBackgroundRegion to " << mSelDeltaTBackgroundRegion << " ps" << ENDM;
}
if (auto param = mCustomParameters.find("SelMinLength"); param != mCustomParameters.end()) {
mSelMinLength = atoi(param->second.c_str());
ILOG(Info, Support) << "Set SelMinLength to " << mSelMinLength << " cm";
ILOG(Info, Support) << "Set SelMinLength to " << mSelMinLength << " cm" << ENDM;
}

mHistoCrate1.reset(new TH1F("Crate1", "Crate1;Crate of first hit;Counts", 72, 0, 72));
Expand Down
36 changes: 18 additions & 18 deletions Modules/TOF/src/TaskRaw.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -58,29 +58,30 @@ void RawDataDecoder::rdhHandler(const o2::header::RAWDataHeader* rdh)
return;
}

constexpr auto rdhCrateWord = 0xFF;
if (RDHUtils::getPageCounter(rdh) == 0) { // if RDH open
mCounterRDHOpen.Count(rdh->feeId & 0xFF);
mCounterRDHOpen.Count(rdh->feeId & rdhCrateWord);
}

mCounterRDH[rdh->feeId & 0xFF].Count(0);
mCounterRDH[rdh->feeId & rdhCrateWord].Count(0);

// Case for the RDH word "fatal"
if ((rdh->detectorField & 0x00001000) != 0) {
mCounterRDH[rdh->feeId & 0xFF].Count(1);
// LOG(warn) << "RDH flag \"fatal\" error occurred in crate " << static_cast<int>(rdh->feeId & 0xFF);
mCounterRDH[rdh->feeId & rdhCrateWord].Count(1);
// LOG(warn) << "RDH flag \"fatal\" error occurred in crate " << static_cast<int>(rdh->feeId & rdhCrateWord);
}

if (rdh->stop) { // if RDH close
// Triggers served and received (3 are expected)
const int triggerserved = ((rdh->detectorField >> 24) & 0xFF);
const int triggerreceived = ((rdh->detectorField >> 16) & 0xFF);
const int triggerserved = ((rdh->detectorField >> 24) & rdhCrateWord);
const int triggerreceived = ((rdh->detectorField >> 16) & rdhCrateWord);
if (triggerserved < triggerreceived) {
// RDH word "trigger error": served < received
mCounterRDH[rdh->feeId & 0xFF].Count(2);
mCounterRDH[rdh->feeId & rdhCrateWord].Count(2);
}
// Numerator and denominator for the trigger efficiency
mCounterRDHTriggers[0].Add(rdh->feeId & 0xFF, triggerserved);
mCounterRDHTriggers[1].Add(rdh->feeId & 0xFF, triggerreceived);
mCounterRDHTriggers[0].Add(rdh->feeId & rdhCrateWord, triggerserved);
mCounterRDHTriggers[1].Add(rdh->feeId & rdhCrateWord, triggerreceived);
}
}

Expand Down Expand Up @@ -351,11 +352,10 @@ void RawDataDecoder::estimateNoise(std::shared_ptr<TH1F> hIndexEOIsNoise)
void TaskRaw::initialize(o2::framework::InitContext& /*ctx*/)
{
// Set task parameters from JSON
if (auto param = mCustomParameters.find("DecoderCONET"); param != mCustomParameters.end()) {
if (param->second == "True") {
ILOG(Info, Support) << "Rig for DecoderCONET";
mDecoderRaw.setDecoderCONET(kTRUE);
}
bool useConetMode = false;
if (parseBooleanParameter("DecoderCONET", useConetMode)) {
ILOG(Info, Support) << "Set DecoderCONET to " << useConetMode << ENDM;
mDecoderRaw.setDecoderCONET(useConetMode);
}
if (auto param = mCustomParameters.find("TimeWindowMin"); param != mCustomParameters.end()) {
mDecoderRaw.setTimeWindowMin(param->second);
Expand All @@ -366,10 +366,10 @@ void TaskRaw::initialize(o2::framework::InitContext& /*ctx*/)
if (auto param = mCustomParameters.find("NoiseThreshold"); param != mCustomParameters.end()) {
mDecoderRaw.setNoiseThreshold(param->second);
}
if (auto param = mCustomParameters.find("DebugCrateMultiplicity"); param != mCustomParameters.end()) {
if (param->second == "True") {
mDecoderRaw.setDebugCrateMultiplicity(true);
}
bool usePerCrateHistograms = false;
if (parseBooleanParameter("DebugCrateMultiplicity", usePerCrateHistograms)) {
ILOG(Info, Support) << "Set DebugCrateMultiplicity to " << usePerCrateHistograms << ENDM;
mDecoderRaw.setDebugCrateMultiplicity(usePerCrateHistograms);
}

// RDH
Expand Down
14 changes: 14 additions & 0 deletions Modules/TOF/tofraw.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,20 @@
}
},
"checks": {
"CheckNoise": {
"active": "true",
"className": "o2::quality_control_modules::tof::CheckNoise",
"moduleName": "QcTOF",
"policy": "OnAny",
"detectorName": "TOF",
"dataSource": [{
"type": "Task",
"name": "TaskRaw",
"MOs": [
"hIndexEOHitRate"
]
}]
},
"CheckDiagnostics": {
"active": "true",
"className": "o2::quality_control_modules::tof::CheckDiagnostics",
Expand Down