Skip to content

Commit 4127fa8

Browse files
authored
updates in TPC PID, json file for piping of RecoWorkflow (#308)
1 parent de64a4f commit 4127fa8

4 files changed

Lines changed: 76 additions & 5 deletions

File tree

Modules/TPC/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,5 +64,6 @@ install(TARGETS QcTPC ${EXE_NAMES}
6464

6565
# ---- Install config files ----
6666

67-
install(FILES run/tpcQCPID.json
67+
install(FILES run/tpcQCPID_sampled.json
68+
run/tpcQCPID_direct.json
6869
DESTINATION etc)
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
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+
"number": "42",
13+
"type": "2"
14+
},
15+
"monitoring": {
16+
"url": "infologger:///debug?qc"
17+
},
18+
"consul": {
19+
"url": "http://consul-test.cern.ch:8500"
20+
},
21+
"conditionDB": {
22+
"url": "ccdb-test.cern.ch:8080"
23+
}
24+
},
25+
"tasks": {
26+
"PID": {
27+
"active": "true",
28+
"className": "o2::quality_control_modules::tpc::PID",
29+
"moduleName": "QcTPC",
30+
"detectorName": "TPC",
31+
"cycleDurationSeconds": "10",
32+
"maxNumberCycles": "-1",
33+
"dataSource_comment": "The other type of dataSource is \"direct\", see basic-no-sampling.json.",
34+
"dataSource": {
35+
"type": "direct",
36+
"query" : "inputTracks:TPC/TRACKS/0"
37+
},
38+
"taskParameters": {
39+
"nothing": "rien"
40+
},
41+
"location": "remote"
42+
}
43+
},
44+
"checks": {
45+
"QcCheck": {
46+
"active": "true",
47+
"className": "o2::quality_control_modules::skeleton::SkeletonCheck",
48+
"moduleName": "QcSkeleton",
49+
"policy": "OnAny",
50+
"dataSource": [{
51+
"type": "Task",
52+
"name": "PID",
53+
"MOs": ["example"]
54+
}]
55+
}
56+
}
57+
},
58+
"dataSamplingPolicies": [
59+
60+
]
61+
}
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
}
2424
},
2525
"tasks": {
26-
"TPCQCPID": {
26+
"PID": {
2727
"active": "true",
2828
"className": "o2::quality_control_modules::tpc::PID",
2929
"moduleName": "QcTPC",
@@ -49,7 +49,7 @@
4949
"policy": "OnAny",
5050
"dataSource": [{
5151
"type": "Task",
52-
"name": "TPCQCPID",
52+
"name": "PID",
5353
"MOs": ["example"]
5454
}]
5555
}
@@ -60,7 +60,7 @@
6060
"id": "tpc-tracks",
6161
"active": "true",
6262
"machines": [],
63-
"query" : "tpc-sampled-tracks:TPC/TRACKS/0",
63+
"query" : "inputTracks:TPC/TRACKS/0",
6464
"samplingConditions": [
6565
{
6666
"condition": "random",

Modules/TPC/src/PID.cxx

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,12 @@
1616
// root includes
1717
#include <TCanvas.h>
1818
#include <TH1.h>
19+
#include <TH2.h>
1920

2021
// O2 includes
2122
#include "Framework/ProcessingContext.h"
2223
#include "DataFormatsTPC/TrackTPC.h"
24+
#include "TPCQC/Helpers.h"
2325

2426
// QC includes
2527
#include "QualityControl/QcInfoLogger.h"
@@ -39,11 +41,18 @@ void PID::initialize(o2::framework::InitContext& /*ctx*/)
3941
QcInfoLogger::GetInstance() << "initialize TPC PID QC task" << AliceO2::InfoLogger::InfoLogger::endm;
4042

4143
mQCPID.initializeHistograms();
44+
//o2::tpc::qc::helpers::setStyleHistogram1D(mQCPID.getHistograms1D());
45+
o2::tpc::qc::helpers::setStyleHistogram2D(mQCPID.getHistograms2D());
4246

4347
for (auto& hist : mQCPID.getHistograms1D()) {
4448
getObjectsManager()->startPublishing(&hist);
4549
getObjectsManager()->addMetadata(hist.GetName(), "custom", "34");
4650
}
51+
52+
for (auto& hist : mQCPID.getHistograms2D()) {
53+
getObjectsManager()->startPublishing(&hist);
54+
getObjectsManager()->addMetadata(hist.GetName(), "custom", "43");
55+
}
4756
}
4857

4958
void PID::startOfActivity(Activity& /*activity*/)
@@ -60,7 +69,7 @@ void PID::startOfCycle()
6069
void PID::monitorData(o2::framework::ProcessingContext& ctx)
6170
{
6271
using TrackType = std::vector<o2::tpc::TrackTPC>;
63-
auto tracks = ctx.inputs().get<TrackType>("tpc-sampled-tracks");
72+
auto tracks = ctx.inputs().get<TrackType>("inputTracks");
6473
QcInfoLogger::GetInstance() << "monitorData: " << tracks.size() << AliceO2::InfoLogger::InfoLogger::endm;
6574

6675
for (auto const& track : tracks) {

0 commit comments

Comments
 (0)