Skip to content

Commit

Permalink
Merge pull request #569 from gconesab/master
Browse files Browse the repository at this point in the history
Add some time buffer in case the epos intermediate file with the events was not present
  • Loading branch information
gconesab authored Feb 16, 2024
2 parents dee0ed9 + 191b95d commit 6b3673f
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions MC/GeneratorConfig.C
Original file line number Diff line number Diff line change
Expand Up @@ -1162,6 +1162,28 @@ GeneratorEPOSLHC(Bool_t pileup)
fifoname.Data(), nEventsEpos,
projectileId, projectileEnergy,
targetId, targetEnergy,pileup));

// Wait till 10 seconds if the crmceventfifo(_pileup) file with hep data does not exist
// try 100 times, if not, let it continue
Bool_t ok = kFALSE;
Int_t niter = 0;
while ( !ok )
{
if ( gSystem->AccessPathName(fifoname) )
{
printf(" ... EPOS input file not found wait 10 seconds, iteration %d ... \n", niter);
gROOT->ProcessLine(".! sleep 10");
niter++;
}
else
{
ok = kTRUE;
}

// Avoid more iterations, if we really get to that
if ( niter > 99 ) ok = kTRUE;
}

//
// connect HepMC reader
AliGenReaderHepMC *reader = new AliGenReaderHepMC();
Expand Down

0 comments on commit 6b3673f

Please sign in to comment.