Skip to content

Commit

Permalink
Unified EPN QC Checks to work with Moving Window
Browse files Browse the repository at this point in the history
  • Loading branch information
IsakovAD committed Aug 14, 2024
1 parent 4c8dac4 commit ed42ca3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Modules/ITS/src/ITSDecodingErrorCheck.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ Quality ITSDecodingErrorCheck::check(std::map<std::string, std::shared_ptr<Monit
result.set(Quality::Bad);
}

if (mo->getName() == "General/LinkErrorPlots") {
if (((string)mo->getName()).find("General/LinkErrorPlots") != std::string::npos) {
result = Quality::Good;
auto* h = dynamic_cast<TH1D*>(mo->getObject());
if (h == nullptr) {
Expand Down Expand Up @@ -137,7 +137,7 @@ void ITSDecodingErrorCheck::beautify(std::shared_ptr<MonitorObject> mo, Quality

TString status;
int textColor;
if ((mo->getName() == "General/LinkErrorPlots") || (mo->getName() == "General/ChipErrorPlots")) {
if ((((string)mo->getName()).find("General/LinkErrorPlots") != std::string::npos) || (mo->getName() == "General/ChipErrorPlots")) {
auto* h = dynamic_cast<TH1D*>(mo->getObject());
if (h == nullptr) {
ILOG(Error, Support) << "could not cast LinkErrorPlots to TH1D*" << ENDM;
Expand Down
8 changes: 4 additions & 4 deletions Modules/ITS/src/ITSTrackCheck.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Quality ITSTrackCheck::check(std::map<std::string, std::shared_ptr<MonitorObject
std::map<std::string, std::shared_ptr<MonitorObject>>::iterator iter;
for (iter = moMap->begin(); iter != moMap->end(); ++iter) {

if (iter->second->getName() == "NClusters") {
if (((string)iter->second->getName()).find("NClusters") != std::string::npos) {
auto* h = dynamic_cast<TH1D*>(iter->second->getObject());
if (h == nullptr) {
ILOG(Error, Support) << "could not cast NClusters to TH1D*" << ENDM;
Expand Down Expand Up @@ -84,7 +84,7 @@ Quality ITSTrackCheck::check(std::map<std::string, std::shared_ptr<MonitorObject
}
}

if (iter->second->getName() == "AngularDistribution") {
if (((string)iter->second->getName()).find("AngularDistribution") != std::string::npos) {
auto* hAngular = dynamic_cast<TH2D*>(iter->second->getObject());
if (hAngular == nullptr) {
ILOG(Error, Support) << "could not cast AngularDistribution to TH2D*" << ENDM;
Expand Down Expand Up @@ -220,7 +220,7 @@ void ITSTrackCheck::beautify(std::shared_ptr<MonitorObject> mo, Quality checkRes
TString status;
int textColor;

if (mo->getName() == "NClusters") {
if (((string)mo->getName()).find("NClusters") != std::string::npos) {
auto* h = dynamic_cast<TH1D*>(mo->getObject());
if (h == nullptr) {
ILOG(Error, Support) << "could not cast NClusters to TH1D*" << ENDM;
Expand Down Expand Up @@ -300,7 +300,7 @@ void ITSTrackCheck::beautify(std::shared_ptr<MonitorObject> mo, Quality checkRes
h->GetListOfFunctions()->Add(tShifterInfo->Clone());
}

if (mo->getName() == "AngularDistribution") {
if (((string)mo->getName()).find("AngularDistribution") != std::string::npos) {
auto* h = dynamic_cast<TH2D*>(mo->getObject());
if (h == nullptr) {
ILOG(Error, Support) << "could not cast AngularDistribution to TH2D*" << ENDM;
Expand Down

0 comments on commit ed42ca3

Please sign in to comment.