Skip to content

Commit bb9cf8b

Browse files
IsakovADknopers8
authored andcommitted
Fixed crash of ITS PP tasks in case of problem with CCDB
1 parent 27ff576 commit bb9cf8b

5 files changed

Lines changed: 53 additions & 4 deletions

File tree

Modules/ITS/src/TrendingTaskITSCluster.cxx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,18 @@ void TrendingTaskITSCluster::trendValues(const Trigger& t, repository::DatabaseI
130130

131131
void TrendingTaskITSCluster::storePlots(repository::DatabaseInterface& qcdb)
132132
{
133+
//
134+
// Create and save trends for each stave
135+
//
136+
137+
if (runlist.size() == 0) {
138+
ILOG(Info, Support) << "There are no plots to store, skipping" << ENDM;
139+
return;
140+
}
141+
133142
ILOG(Info, Support) << "Generating and storing " << mConfig.plots.size() << " plots."
134143
<< ENDM;
144+
135145
//
136146
// Create average plots for all layers
137147
//

Modules/ITS/src/TrendingTaskITSFEE.cxx

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,17 @@ void TrendingTaskITSFEE::trendValues(const Trigger& t, repository::DatabaseInter
129129

130130
void TrendingTaskITSFEE::storePlots(repository::DatabaseInterface& qcdb)
131131
{
132-
// ILOG(Info, Support) << "Generating and storing " << mConfig.plots.size() << " plots." << ENDM;
132+
//
133+
// Create and save trends for each stave
134+
//
135+
136+
if (runlist.size() == 0) {
137+
ILOG(Info, Support) << "There are no plots to store, skipping" << ENDM;
138+
return;
139+
}
140+
141+
ILOG(Info, Support) << "Generating and storing " << mConfig.plots.size() << " plots."
142+
<< ENDM;
133143

134144
int countplots = 0;
135145
int countITSpart = 0;

Modules/ITS/src/TrendingTaskITSFhr.cxx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,18 @@ void TrendingTaskITSFhr::trendValues(const Trigger& t, repository::DatabaseInter
131131

132132
void TrendingTaskITSFhr::storePlots(repository::DatabaseInterface& qcdb)
133133
{
134+
//
135+
// Create and save trends for each stave
136+
//
137+
138+
if (runlist.size() == 0) {
139+
ILOG(Info, Support) << "There are no plots to store, skipping" << ENDM;
140+
return;
141+
}
142+
134143
ILOG(Info, Support) << "Generating and storing " << mConfig.plots.size() << " plots."
135144
<< ENDM;
145+
136146
//
137147
// Create and save trends for each stave
138148
//

Modules/ITS/src/TrendingTaskITSThr.cxx

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,18 @@ void TrendingTaskITSThr::trendValues(const Trigger& t, repository::DatabaseInter
129129
}
130130
void TrendingTaskITSThr::storePlots(repository::DatabaseInterface& qcdb)
131131
{
132-
ILOG(Info, Support) << "Generating " << mConfig.plots.size() << " plots." << ENDM;
132+
//
133+
// Create and save trends for each stave
134+
//
135+
136+
if (runlist.size() == 0) {
137+
ILOG(Info, Support) << "There are no plots to store, skipping" << ENDM;
138+
return;
139+
}
140+
141+
ILOG(Info, Support) << "Generating and storing " << mConfig.plots.size() << " plots."
142+
<< ENDM;
143+
133144
//
134145
// Create canvas with multiple trends - average threshold - 1 canvas per layer
135146
//

Modules/ITS/src/TrendingTaskITSTracks.cxx

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,11 +132,18 @@ void TrendingTaskITSTracks::trendValues(const Trigger& t, repository::DatabaseIn
132132

133133
void TrendingTaskITSTracks::storePlots(repository::DatabaseInterface& qcdb)
134134
{
135-
ILOG(Info, Support) << "Generating and storing " << mConfig.plots.size() << " plots."
136-
<< ENDM;
137135
//
138136
// Create and save trends for each stave
139137
//
138+
139+
if (runlist.size() == 0) {
140+
ILOG(Info, Support) << "There are no plots to store, skipping" << ENDM;
141+
return;
142+
}
143+
144+
ILOG(Info, Support) << "Generating and storing " << mConfig.plots.size() << " plots."
145+
<< ENDM;
146+
140147
int countplots = 0;
141148
int ilay = 0;
142149
for (const auto& plot : mConfig.plots) {
@@ -216,6 +223,7 @@ void TrendingTaskITSTracks::storePlots(repository::DatabaseInterface& qcdb)
216223

217224
// post processing plot
218225
TGraph* g = new TGraph(n, x, y);
226+
219227
SetGraphStyle(g, col[(int)class1 % 2], mkr[(int)class1 % 2]);
220228

221229
SetGraphNameAndAxes(g, plot.name, plot.title, isrun ? "run" : "time", plot.title, ymin,

0 commit comments

Comments
 (0)