@@ -306,6 +306,10 @@ struct qVectorsTable {
306306 fullPath += " /v2" ;
307307 modeCorrQvecSp = getForTsOrRun<TH3F >(fullPath, timestamp, runnumber);
308308 }
309+ if (!modeCorrQvecSp) {
310+ LOGF (info, " Could not get the correction histograms for Q-vectors for mode %d. Setting to no correction." , ind);
311+ modeCorrQvecSp = new TH3F (" modeCorrQvecSp" , " modeCorrQvecSp" , 1 , 0 , 1 , 1 , 0 , 1 , 1 , 0 , 1 );
312+ }
309313 corrsQvecSp.push_back (modeCorrQvecSp);
310314 }
311315
@@ -322,6 +326,10 @@ struct qVectorsTable {
322326 fullPath += " /eseq2" ;
323327 modeCorrQvecEse = getForTsOrRun<TH3F >(fullPath, timestamp, runnumber);
324328 }
329+ if (!modeCorrQvecEse) {
330+ LOGF (info, " Could not get the correction histograms for Q-vectors for mode %d. Setting to no correction." , ind);
331+ modeCorrQvecEse = new TH3F (" modeCorrQvecEse" , " modeCorrQvecEse" , 1 , 0 , 1 , 1 , 0 , 1 , 1 , 0 , 1 );
332+ }
325333 corrsQvecEse.push_back (modeCorrQvecEse);
326334 }
327335 }
@@ -334,6 +342,10 @@ struct qVectorsTable {
334342 fullPath += " /v" ;
335343 fullPath += std::to_string (ind);
336344 auto objshift = getForTsOrRun<TProfile3D>(fullPath, timestamp, runnumber);
345+ if (!objshift) {
346+ LOGF (info, " Could not get the shift profile for Q-vectors for mode %d. Setting to no shift correction." , ind);
347+ objshift = new TProfile3D (" shiftProfileSp" , " shiftProfileSp" , 1 , 0 , 1 , 1 , 0 , 1 , 1 , 0 , 1 );
348+ }
337349 shiftProfileSp.push_back (objshift);
338350 }
339351
@@ -345,6 +357,10 @@ struct qVectorsTable {
345357 fullPath += " /eseq" ;
346358 fullPath += std::to_string (ind);
347359 auto objshift = getForTsOrRun<TProfile3D>(fullPath, timestamp, runnumber);
360+ if (!objshift) {
361+ LOGF (info, " Could not get the shift profile for Q-vectors for mode %d. Setting to no shift correction." , ind);
362+ objshift = new TProfile3D (" shiftProfileEse" , " shiftProfileEse" , 1 , 0 , 1 , 1 , 0 , 1 , 1 , 0 , 1 );
363+ }
348364 shiftProfileEse.push_back (objshift);
349365 }
350366 }
0 commit comments