|
| 1 | +// Copyright 2019-2020 CERN and copyright holders of ALICE O2. |
| 2 | +// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders. |
| 3 | +// All rights not expressly granted are reserved. |
| 4 | +// |
| 5 | +// This software is distributed under the terms of the GNU General Public |
| 6 | +// License v3 (GPL Version 3), copied verbatim in the file "COPYING". |
| 7 | +// |
| 8 | +// In applying this license CERN does not waive the privileges and immunities |
| 9 | +// granted to it by virtue of its status as an Intergovernmental Organization |
| 10 | +// or submit itself to any jurisdiction. |
| 11 | + |
| 12 | +/// |
| 13 | +/// @file GPUErrorQA.h |
| 14 | +/// @author Anton Riedel, anton.riedel@cern.ch |
| 15 | +/// |
| 16 | + |
| 17 | +#ifndef AliceO2_TPC_QC_GPUERRORQA_H |
| 18 | +#define AliceO2_TPC_QC_GPUERRORQA_H |
| 19 | + |
| 20 | +#include <memory> |
| 21 | +#include <gsl/span> |
| 22 | + |
| 23 | +// root includes |
| 24 | +#include "TH1.h" |
| 25 | + |
| 26 | +// o2 includes |
| 27 | +// #include "DataFormatsTPC/Defs.h" |
| 28 | + |
| 29 | +namespace o2 |
| 30 | +{ |
| 31 | +namespace tpc |
| 32 | +{ |
| 33 | +namespace qc |
| 34 | +{ |
| 35 | + |
| 36 | +/// @brief TPC QC task for errors from GPU reconstruction |
| 37 | +/// |
| 38 | +/// This class is used to retrieve and visualize GPU errors |
| 39 | +/// according to corresponding error code and location. |
| 40 | +/// |
| 41 | +/// origin: TPC |
| 42 | +/// @author Anton Riedel, anton.riedel@cern.ch |
| 43 | +class GPUErrorQA |
| 44 | +{ |
| 45 | + public: |
| 46 | + /// \brief Constructor. |
| 47 | + GPUErrorQA() = default; |
| 48 | + |
| 49 | + /// process gpu error reported by the reconstruction workflow |
| 50 | + void processErrors(gsl::span<const std::array<uint32_t, 4>> errors); |
| 51 | + |
| 52 | + /// Initialize all histograms |
| 53 | + void initializeHistograms(); |
| 54 | + |
| 55 | + /// Reset all histograms |
| 56 | + void resetHistograms(); |
| 57 | + |
| 58 | + /// Dump results to a file |
| 59 | + void dumpToFile(std::string filename); |
| 60 | + |
| 61 | + private: |
| 62 | + std::unique_ptr<TH1F> mHist; |
| 63 | + ClassDefNV(GPUErrorQA, 1) |
| 64 | +}; |
| 65 | +} // namespace qc |
| 66 | +} // namespace tpc |
| 67 | +} // namespace o2 |
| 68 | + |
| 69 | +#endif // AliceO2_TPC_QC_GPUERRORQA_H |
0 commit comments