Skip to content

Commit d6dcd94

Browse files
committed
Added gGrid check
1 parent 3a63feb commit d6dcd94

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

MC/config/common/external/generator/TPCLoopers.C

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,13 @@ FairGenerator *
403403
const std::array<bool, 2> isCCDB = {models[0].starts_with("ccdb:"), models[1].starts_with("ccdb:")};
404404
if (std::any_of(isAlien.begin(), isAlien.end(), [](bool v) { return v; }))
405405
{
406-
TGrid::Connect("alien://");
406+
if (!gGrid) {
407+
TGrid::Connect("alien://");
408+
if (!gGrid) {
409+
LOG(fatal) << "AliEn connection failed, check token.";
410+
exit(1);
411+
}
412+
}
407413
for (size_t i = 0; i < models.size(); ++i)
408414
{
409415
if (isAlien[i] && !TFile::Cp(models[i].c_str(), local_names[i].c_str()))

0 commit comments

Comments
 (0)