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
5 changes: 4 additions & 1 deletion Modules/TPC/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ target_sources(O2QcTPC PRIVATE src/PID.cxx
src/SeparationPowerReductor.cxx
src/TimeGainCalibReductor.cxx
src/DCSPTempReductor.cxx
src/AtmosPressureReductor.cxx)
src/AtmosPressureReductor.cxx
src/GPUErrorQA.cxx)

target_include_directories(
O2QcTPC
Expand Down Expand Up @@ -101,6 +102,7 @@ add_root_dictionary(O2QcTPC
include/TPC/TimeGainCalibReductor.h
include/TPC/DCSPTempReductor.h
include/TPC/AtmosPressureReductor.h
include/TPC/GPUErrorQA.h
LINKDEF include/TPC/LinkDef.h)

install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include/TPC
Expand Down Expand Up @@ -186,4 +188,5 @@ install(FILES run/tpcQCPID_sampled.json
run/tpcQCTimeGainCalibTrending.json
run/tpcDCSPTempTrending.json
run/tpcQCAtmosPressureTrending.json
run/tpcQCGPUErrorQA_direct.json
DESTINATION etc)
57 changes: 57 additions & 0 deletions Modules/TPC/include/TPC/GPUErrorQA.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
// All rights not expressly granted are reserved.
//
// This software is distributed under the terms of the GNU General Public
// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
//
// In applying this license CERN does not waive the privileges and immunities
// granted to it by virtue of its status as an Intergovernmental Organization
// or submit itself to any jurisdiction.

///
/// \file GPUErrorQA.h
/// \author Anton Riedel, anton.riedel@cern.ch
///

#ifndef QC_MODULE_TPC_GPUERRORQA_H
#define QC_MODULE_TPC_GPUERRORQA_H

// O2 includes
#include "TPCQC/GPUErrorQA.h"

// QC includes
#include "QualityControl/TaskInterface.h"

using namespace o2::quality_control::core;

namespace o2::quality_control_modules::tpc
{

/// \brief Quality Control DPL Task for QC Module TPC GPU errors
/// \author Anton Riedel

class GPUErrorQA final : public TaskInterface
{
public:
/// \brief Constructor
GPUErrorQA() = default;
/// Destructor
~GPUErrorQA() override = default;

// Definition of the methods for the template method pattern
void initialize(o2::framework::InitContext& ctx) override;
void startOfActivity(const Activity& activity) override;
void startOfCycle() override;
void monitorData(o2::framework::ProcessingContext& ctx) override;
void endOfCycle() override;
void endOfActivity(const Activity& activity) override;
void reset() override;

private:
o2::tpc::qc::GPUErrorQA mGPUErrorQA; ///< TPC QC class from o2
};

} // namespace o2::quality_control_modules::tpc

#endif // QC_MODULE_TPC_GPUERRORQA_H
1 change: 1 addition & 0 deletions Modules/TPC/include/TPC/LinkDef.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
#pragma link C++ class o2::quality_control_modules::tpc::TimeGainCalibReductor + ;
#pragma link C++ class o2::quality_control_modules::tpc::DCSPTempReductor + ;
#pragma link C++ class o2::quality_control_modules::tpc::AtmosPressureReductor + ;
#pragma link C++ class o2::quality_control_modules::tpc::GPUErrorQA + ;

#pragma link C++ function o2::quality_control_modules::tpc::addAndPublish + ;
#pragma link C++ function o2::quality_control_modules::tpc::toVector + ;
Expand Down
38 changes: 38 additions & 0 deletions Modules/TPC/run/tpcQCGPUErrorQA_direct.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"qc": {
"config": {
"database": {
"implementation": "CCDB",
"host": "ccdb-test.cern.ch:8080",
"username": "not_applicable",
"password": "not_applicable",
"name": "not_applicable"
},
"Activity": {},
"monitoring": {
"url": "infologger:///debug?qc"
},
"consul": {
"url": ""
},
"conditionDB": {
"url": "ccdb-test.cern.ch:8080"
}
},
"tasks": {
"GPUErrorQA": {
"active": "true",
"className": "o2::quality_control_modules::tpc::GPUErrorQA",
"moduleName": "QcTPC",
"detectorName": "TPC",
"cycleDurationSeconds": "10",
"dataSource": {
"type": "direct",
"query": "error-qa:GPU/ERRORQA/0"
},
"location": "remote"
}
}
},
"dataSamplingPolicies": []
}
72 changes: 72 additions & 0 deletions Modules/TPC/src/GPUErrorQA.cxx
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
// All rights not expressly granted are reserved.
//
// This software is distributed under the terms of the GNU General Public
// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
//
// In applying this license CERN does not waive the privileges and immunities
// granted to it by virtue of its status as an Intergovernmental Organization
// or submit itself to any jurisdiction.

///
/// \file GPUErrorQA.cxx
/// \author Anton Riede, anton.riedel@cern.ch
///

// root includes
#include <TH1.h>

// O2 includes
#include "Framework/ProcessingContext.h"
#include <Framework/InputRecord.h>

// QC includes
#include "QualityControl/QcInfoLogger.h"
#include "TPC/GPUErrorQA.h"

namespace o2::quality_control_modules::tpc
{

void GPUErrorQA::initialize(o2::framework::InitContext& /*ctx*/)
{
ILOG(Debug, Devel) << "initialize TPC GPUErrorQA QC task" << ENDM;
mGPUErrorQA.initializeHistograms();
}

void GPUErrorQA::startOfActivity(const Activity& /*activity*/)
{
ILOG(Debug, Support) << "startOfActivity" << ENDM;
mGPUErrorQA.resetHistograms();
}

void GPUErrorQA::startOfCycle()
{
ILOG(Debug, Support) << "startOfCycle" << ENDM;
}

void GPUErrorQA::monitorData(o2::framework::ProcessingContext& ctx)
{
ILOG(Debug, Devel) << "monitorData" << ENDM;
auto errors = ctx.inputs().get<std::vector<std::array<uint32_t, 4>>>("error-qa");
mGPUErrorQA.processErrors(errors);
}

void GPUErrorQA::endOfCycle()
{
ILOG(Debug, Devel) << "endOfCycle" << ENDM;
}

void GPUErrorQA::endOfActivity(const Activity& /*activity*/)
{
ILOG(Debug, Devel) << "endOfActivity" << ENDM;
}

void GPUErrorQA::reset()
{
// clean all the monitor objects here
ILOG(Debug, Devel) << "Resetting the histograms" << ENDM;
mGPUErrorQA.resetHistograms();
}

} // namespace o2::quality_control_modules::tpc