-
Notifications
You must be signed in to change notification settings - Fork 450
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TPC QC: Add skeleton for GPUErrorQA task #13964
base: dev
Are you sure you want to change the base?
Conversation
REQUEST FOR PRODUCTION RELEASES:
This will add The following labels are available |
I think a 2D histogram might make sense, at least as an overview, since you would see al error types. Then we might want additional 3D histograms on top, for single error codes, with multiple parameters? And to be honest, I am not so familiar with other QC tasks, so I don't know what is the normal strategy. |
Thanks for the comments, David. |
namespace o2 | ||
{ | ||
namespace tpc | ||
{ | ||
namespace qc | ||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
namespace o2 | |
{ | |
namespace tpc | |
{ | |
namespace qc | |
{ | |
namespace o2::tpc::qc | |
{ |
} // namespace qc | ||
} // namespace tpc | ||
} // namespace o2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
} // namespace qc | |
} // namespace tpc | |
} // namespace o2 | |
} // namespace o2::tpc::qc |
// root includes | ||
#include "TH1.h" | ||
|
||
// o2 includes | ||
// #include "DataFormatsTPC/Defs.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use forward declaration for TH1
// root includes | |
#include "TH1.h" | |
// o2 includes | |
// #include "DataFormatsTPC/Defs.h" | |
class TH1; |
void resetHistograms(); | ||
|
||
/// return histograms | ||
std::unordered_map<std::string, std::unique_ptr<TH1>>& getMapHist() { return mMapHist; }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the histograms don't need to be filled outside, this can be const
std::unordered_map<std::string, std::unique_ptr<TH1>>& getMapHist() { return mMapHist; }; | |
std::unordered_map<std::string, std::unique_ptr<TH1>>& getMapHist() const { return mMapHist; }; |
#ifndef AliceO2_TPC_QC_GPUERRORQA_H | ||
#define AliceO2_TPC_QC_GPUERRORQA_H | ||
|
||
#include <memory> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#include <memory> | |
#include <string> | |
#include <memory> |
|
||
// root includes | ||
#include "TFile.h" | ||
#include <TH1.h> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#include <TH1.h> | |
#include "TH1.h" |
#include <memory> | ||
#include <unordered_map> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's already defined in the header
#include <memory> | |
#include <unordered_map> |
}; | ||
|
||
// 1D histogram counting all reported errors | ||
mMapHist["ErrorCounter"] = std::make_unique<TH1F>("ErrorCounter", "ErrorCounter", errorNames.size(), 0, errorNames.size()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this a histogram of floats? If it is a simple counter, it could also be TH1I
, unless one would like to normalize at some point.
for (const auto& [name, hist] : mMapHist) { | ||
TObjArray arr; | ||
arr.SetName(name.data()); | ||
arr.Add(hist.get()); | ||
arr.Write(arr.GetName(), TObject::kSingleKey); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To me it does not make sense to put each histogram in a separate array.
for (const auto& [name, hist] : mMapHist) { | |
TObjArray arr; | |
arr.SetName(name.data()); | |
arr.Add(hist.get()); | |
arr.Write(arr.GetName(), TObject::kSingleKey); | |
} | |
TObjArray arr; | |
arr.SetName("GPUError_Hists"); | |
for (const auto& [name, hist] : mMapHist) { | |
arr.Add(hist.get()); | |
} | |
arr.Write(arr.GetName(), TObject::kSingleKey); |
Add skeleton for GPUErrorQA task in O2.
In this draft, only the number of errors for a given error code is counted and put into a 1D histogram.
In principle the error is reporting 4 values, the error code +3 parameters (like SectorRow, Sector, Value, Max ...). However, the meaning of the parameters depends on the error code itself (defined in GPUErrorCodes.h). There was a suggestion in the past to display the errors in a 2D histogram.
In principle, we could implement 3 2D histograms, putting the error code on the x-axis and the different parameter values on the y-axis.
Tagging @wiechula and @davidrohr for their opinion.