Skip to content

Commit 7e7a1f4

Browse files
ariedel-cernwiechula
authored andcommitted
Feat: add GPUErrorQA task
1 parent 021a5cb commit 7e7a1f4

File tree

5 files changed

+172
-1
lines changed

5 files changed

+172
-1
lines changed

Modules/TPC/CMakeLists.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ target_sources(O2QcTPC PRIVATE src/PID.cxx
4040
src/SeparationPowerReductor.cxx
4141
src/TimeGainCalibReductor.cxx
4242
src/DCSPTempReductor.cxx
43-
src/AtmosPressureReductor.cxx)
43+
src/AtmosPressureReductor.cxx
44+
src/GPUErrorQA.cxx)
4445

4546
target_include_directories(
4647
O2QcTPC
@@ -101,6 +102,7 @@ add_root_dictionary(O2QcTPC
101102
include/TPC/TimeGainCalibReductor.h
102103
include/TPC/DCSPTempReductor.h
103104
include/TPC/AtmosPressureReductor.h
105+
include/TPC/GPUErrorQA.h
104106
LINKDEF include/TPC/LinkDef.h)
105107

106108
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include/TPC
@@ -186,4 +188,5 @@ install(FILES run/tpcQCPID_sampled.json
186188
run/tpcQCTimeGainCalibTrending.json
187189
run/tpcDCSPTempTrending.json
188190
run/tpcQCAtmosPressureTrending.json
191+
run/tpcQCGPUErrorQA_direct.json
189192
DESTINATION etc)
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
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 QC_MODULE_TPC_GPUERRORQA_H
18+
#define QC_MODULE_TPC_GPUERRORQA_H
19+
20+
// O2 includes
21+
#include "TPCQC/GPUErrorQA.h"
22+
23+
// QC includes
24+
#include "QualityControl/TaskInterface.h"
25+
26+
using namespace o2::quality_control::core;
27+
28+
namespace o2::quality_control_modules::tpc
29+
{
30+
31+
/// \brief Quality Control DPL Task for QC Module TPC GPU errors
32+
/// \author Anton Riedel
33+
34+
class GPUErrorQA final : public TaskInterface
35+
{
36+
public:
37+
/// \brief Constructor
38+
GPUErrorQA() = default;
39+
/// Destructor
40+
~GPUErrorQA() override = default;
41+
42+
// Definition of the methods for the template method pattern
43+
void initialize(o2::framework::InitContext& ctx) override;
44+
void startOfActivity(const Activity& activity) override;
45+
void startOfCycle() override;
46+
void monitorData(o2::framework::ProcessingContext& ctx) override;
47+
void endOfCycle() override;
48+
void endOfActivity(const Activity& activity) override;
49+
void reset() override;
50+
51+
private:
52+
o2::tpc::qc::GPUErrorQA mGPUErrorQA; ///< TPC QC class from o2
53+
};
54+
55+
} // namespace o2::quality_control_modules::tpc
56+
57+
#endif // QC_MODULE_TPC_GPUERRORQA_H

Modules/TPC/include/TPC/LinkDef.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
#pragma link C++ class o2::quality_control_modules::tpc::TimeGainCalibReductor + ;
4646
#pragma link C++ class o2::quality_control_modules::tpc::DCSPTempReductor + ;
4747
#pragma link C++ class o2::quality_control_modules::tpc::AtmosPressureReductor + ;
48+
#pragma link C++ class o2::quality_control_modules::tpc::GPUErrorQA + ;
4849

4950
#pragma link C++ function o2::quality_control_modules::tpc::addAndPublish + ;
5051
#pragma link C++ function o2::quality_control_modules::tpc::toVector + ;
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"qc": {
3+
"config": {
4+
"database": {
5+
"implementation": "CCDB",
6+
"host": "ccdb-test.cern.ch:8080",
7+
"username": "not_applicable",
8+
"password": "not_applicable",
9+
"name": "not_applicable"
10+
},
11+
"Activity": {},
12+
"monitoring": {
13+
"url": "infologger:///debug?qc"
14+
},
15+
"consul": {
16+
"url": ""
17+
},
18+
"conditionDB": {
19+
"url": "ccdb-test.cern.ch:8080"
20+
}
21+
},
22+
"tasks": {
23+
"GPUErrorQA": {
24+
"active": "true",
25+
"className": "o2::quality_control_modules::tpc::GPUErrorQA",
26+
"moduleName": "QcTPC",
27+
"detectorName": "TPC",
28+
"cycleDurationSeconds": "10",
29+
"dataSource": {
30+
"type": "direct",
31+
"query": "error-qa:GPU/ERRORQA/0"
32+
},
33+
"location": "remote"
34+
}
35+
}
36+
},
37+
"dataSamplingPolicies": []
38+
}

Modules/TPC/src/GPUErrorQA.cxx

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
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

Comments
 (0)