|
| 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.cxx |
| 14 | +/// \author Anton Riede, anton.riedel@cern.ch |
| 15 | +/// |
| 16 | + |
| 17 | +// root includes |
| 18 | +#include <TH1.h> |
| 19 | + |
| 20 | +// O2 includes |
| 21 | +#include "Framework/ProcessingContext.h" |
| 22 | +#include <Framework/InputRecord.h> |
| 23 | + |
| 24 | +// QC includes |
| 25 | +#include "QualityControl/QcInfoLogger.h" |
| 26 | +#include "TPC/GPUErrorQA.h" |
| 27 | + |
| 28 | +namespace o2::quality_control_modules::tpc |
| 29 | +{ |
| 30 | + |
| 31 | +void GPUErrorQA::initialize(o2::framework::InitContext& /*ctx*/) |
| 32 | +{ |
| 33 | + ILOG(Debug, Devel) << "initialize TPC GPUErrorQA QC task" << ENDM; |
| 34 | + mGPUErrorQA.initializeHistograms(); |
| 35 | +} |
| 36 | + |
| 37 | +void GPUErrorQA::startOfActivity(const Activity& /*activity*/) |
| 38 | +{ |
| 39 | + ILOG(Debug, Support) << "startOfActivity" << ENDM; |
| 40 | + mGPUErrorQA.resetHistograms(); |
| 41 | +} |
| 42 | + |
| 43 | +void GPUErrorQA::startOfCycle() |
| 44 | +{ |
| 45 | + ILOG(Debug, Support) << "startOfCycle" << ENDM; |
| 46 | +} |
| 47 | + |
| 48 | +void GPUErrorQA::monitorData(o2::framework::ProcessingContext& ctx) |
| 49 | +{ |
| 50 | + ILOG(Debug, Devel) << "monitorData" << ENDM; |
| 51 | + auto errors = ctx.inputs().get<std::vector<std::array<uint32_t, 4>>>("error-qa"); |
| 52 | + mGPUErrorQA.processErrors(errors); |
| 53 | +} |
| 54 | + |
| 55 | +void GPUErrorQA::endOfCycle() |
| 56 | +{ |
| 57 | + ILOG(Debug, Devel) << "endOfCycle" << ENDM; |
| 58 | +} |
| 59 | + |
| 60 | +void GPUErrorQA::endOfActivity(const Activity& /*activity*/) |
| 61 | +{ |
| 62 | + ILOG(Debug, Devel) << "endOfActivity" << ENDM; |
| 63 | +} |
| 64 | + |
| 65 | +void GPUErrorQA::reset() |
| 66 | +{ |
| 67 | + // clean all the monitor objects here |
| 68 | + ILOG(Debug, Devel) << "Resetting the histograms" << ENDM; |
| 69 | + mGPUErrorQA.resetHistograms(); |
| 70 | +} |
| 71 | + |
| 72 | +} // namespace o2::quality_control_modules::tpc |
0 commit comments