Skip to content

Commit 76ac3ec

Browse files
IsakovADJianLIUhep
andauthored
Fixed issues with the geometry file for Cluster and Track tasks (#764)
* OpenMP realisation for ITS Cluster Task * ITS Cluster Task: moved nThreads as parameter to .json * CLang format fixes * removed not used variables * Fixed issues with path to Geometry file for Track and Cluster Tasks Co-authored-by: IsakovAD <jian.liu@cern.ch>
1 parent 560f37b commit 76ac3ec

4 files changed

Lines changed: 73 additions & 78 deletions

File tree

Modules/ITS/include/ITS/ITSTrackTask.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ class ITSTrackTask : public TaskInterface
6363
TH1D* hClusterUsage;
6464
TH2D* hAngularDistribution;
6565
std::string mRunNumber;
66+
std::string mRunNumberPath;
6667

6768
Int_t mNTracks = 0;
6869
Int_t mNRofs = 0;
@@ -72,7 +73,6 @@ class ITSTrackTask : public TaskInterface
7273
Int_t mNClusters = 0;
7374

7475
o2::itsmft::TopologyDictionary mDict;
75-
o2::its::GeometryTGeo* mGeom;
7676
};
7777
} // namespace o2::quality_control_modules::its
7878

Modules/ITS/itsTrack.json

Lines changed: 63 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -1,81 +1,78 @@
11
{
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"
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"
1010
},
11-
"Activity": {
12-
"number": "42",
13-
"type": "2"
11+
"Activity" : {
12+
"number" : "42",
13+
"type" : "2"
1414
},
15-
"monitoring": {
16-
"url": "infologger:///debug?qc"
15+
"monitoring" : {
16+
"url" : "infologger:///debug?qc"
1717
},
18-
"consul": {
19-
"url": "http://consul-test.cern.ch:8500"
18+
"consul" : {
19+
"url" : "http://consul-test.cern.ch:8500"
2020
},
21-
"conditionDB": {
22-
"url": "ccdb-test.cern.ch:8080"
21+
"conditionDB" : {
22+
"url" : "ccdb-test.cern.ch:8080"
2323
}
2424
},
25-
"tasks": {
26-
"ITSTrackTask": {
27-
"active": "true",
28-
"className": "o2::quality_control_modules::its::ITSTrackTask",
29-
"moduleName": "QcITS",
30-
"detectorName": "ITS",
31-
"cycleDurationSeconds": "30",
32-
"maxNumberCycles": "-1",
33-
"dataSource_comment": "The other type of dataSource is \"direct\", see basic-no-sampling.json.",
34-
"dataSource": {
35-
"type": "dataSamplingPolicy",
36-
"name": "compclus"
25+
"tasks" : {
26+
"ITSTrackTask" : {
27+
"active" : "true",
28+
"className" : "o2::quality_control_modules::its::ITSTrackTask",
29+
"moduleName" : "QcITS",
30+
"detectorName" : "ITS",
31+
"cycleDurationSeconds" : "30",
32+
"maxNumberCycles" : "-1",
33+
"dataSource_comment" : "The other type of dataSource is \"direct\", see basic-no-sampling.json.",
34+
"dataSource" : {
35+
"type" : "dataSamplingPolicy",
36+
"name" : "compclus"
3737
},
38-
"location": "remote"
38+
"location" : "remote",
39+
"taskParameters" : {
40+
"runNumberPath" : "/home/its/QC/workdir/infiles/RunNumber.dat"
41+
}
42+
3943
}
4044
},
41-
"checks": {
42-
"ITSTrackCheck": {
43-
"active": "true",
44-
"className": "o2::quality_control_modules::its::ITSTrackCheck",
45-
"moduleName": "QcITS",
46-
"policy": "OnAny",
47-
"detectorName": "ITS",
48-
"dataSource": [{
49-
"type": "Task",
50-
"name": "ITSTrackTask",
51-
"MOs": ["NClusters"]
52-
}]
53-
}
45+
"checks" : {
46+
"ITSTrackCheck" : {
47+
"active" : "true",
48+
"className" : "o2::quality_control_modules::its::ITSTrackCheck",
49+
"moduleName" : "QcITS",
50+
"policy" : "OnAny",
51+
"detectorName" : "ITS",
52+
"dataSource" : [ {
53+
"type" : "Task",
54+
"name" : "ITSTrackTask",
55+
"MOs" : ["NClusters"]
56+
} ]
57+
}
5458
}
5559
},
5660

61+
"dataSamplingPolicies" : [
62+
{
63+
"id" : "compclus",
64+
"active" : "true",
65+
"machines" : [],
66+
"query" : "tracks:ITS/TRACKS/0;rofs:ITS/ITSTrackROF/0;compclus:ITS/COMPCLUSTERS/0",
67+
"samplingConditions" : [
68+
{
69+
"condition" : "random",
70+
"fraction" : "1",
71+
"seed" : "1441"
72+
}
73+
],
5774

58-
"dataSamplingPolicies": [
59-
{
60-
"id": "compclus",
61-
"active": "true",
62-
"machines": [],
63-
"query": "tracks:ITS/TRACKS/0;rofs:ITS/ITSTrackROF/0;compclus:ITS/COMPCLUSTERS/0",
64-
"samplingConditions": [
65-
{
66-
"condition": "random",
67-
"fraction": "1",
68-
"seed": "1441"
69-
}
70-
],
71-
72-
"blocking": "false"
73-
}
74-
]
75-
75+
"blocking" : "false"
76+
}
77+
]
7678
}
77-
78-
79-
80-
81-

Modules/ITS/src/ITSClusterTask.cxx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,7 @@ using namespace o2::its;
3838
namespace o2::quality_control_modules::its
3939
{
4040

41-
ITSClusterTask::ITSClusterTask() : TaskInterface()
42-
{
43-
o2::base::GeometryManager::loadGeometry(mGeomPath.c_str());
44-
mGeom = o2::its::GeometryTGeo::Instance();
45-
}
41+
ITSClusterTask::ITSClusterTask() : TaskInterface() {}
4642

4743
ITSClusterTask::~ITSClusterTask()
4844
{
@@ -86,6 +82,10 @@ void ITSClusterTask::initialize(o2::framework::InitContext& /*ctx*/)
8682
QcInfoLogger::GetInstance() << "initialize ITSClusterTask" << AliceO2::InfoLogger::InfoLogger::endm;
8783

8884
getJsonParameters();
85+
86+
o2::base::GeometryManager::loadGeometry(mGeomPath.c_str());
87+
mGeom = o2::its::GeometryTGeo::Instance();
88+
8989
createAllHistos();
9090

9191
publishHistos();

Modules/ITS/src/ITSTrackTask.cxx

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,6 @@ namespace o2::quality_control_modules::its
3030
ITSTrackTask::ITSTrackTask() : TaskInterface()
3131
{
3232
createAllHistos();
33-
34-
o2::base::GeometryManager::loadGeometry();
35-
mGeom = o2::its::GeometryTGeo::Instance();
3633
}
3734

3835
ITSTrackTask::~ITSTrackTask()
@@ -44,14 +41,15 @@ ITSTrackTask::~ITSTrackTask()
4441
delete hOccupancyROF;
4542
delete hClusterUsage;
4643
delete hAngularDistribution;
47-
48-
delete mGeom;
4944
}
5045

5146
void ITSTrackTask::initialize(o2::framework::InitContext& /*ctx*/)
5247
{
5348

5449
QcInfoLogger::GetInstance() << "initialize ITSTrackTask" << AliceO2::InfoLogger::InfoLogger::endm;
50+
51+
mRunNumberPath = mCustomParameters["runNumberPath"];
52+
5553
publishHistos();
5654
std::string dictfile = o2::base::NameConf::getAlpideClusterDictionaryFileName(o2::detectors::DetID::ITS, "", ".bin");
5755
std::ifstream file(dictfile.c_str());
@@ -116,7 +114,7 @@ void ITSTrackTask::monitorData(o2::framework::ProcessingContext& ctx)
116114
void ITSTrackTask::endOfCycle()
117115
{
118116

119-
std::ifstream runNumberFile("/home/its/QC/workdir/infiles/RunNumber.dat"); //catching ITS run number in commissioning
117+
std::ifstream runNumberFile(mRunNumberPath.c_str());
120118
if (runNumberFile) {
121119

122120
std::string runNumber;

0 commit comments

Comments
 (0)