File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
MC/config/PWGGAJE/external/generator Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -147,6 +147,17 @@ public:
147147 return true;
148148 }
149149
150+ Bool_t checkEOF () {
151+ // Check if the POWHEG generation is done
152+ int result = system (("grep -q /LesHouchesEvents " + mLHEFoutput ).c_str ());
153+ if (result == 0 )
154+ {
155+ return true;
156+ } else {
157+ return false;
158+ }
159+ }
160+
150161 Bool_t POWchecker () {
151162 // Check if the POWHEG events file exists
152163 LOG (info ) << "Waiting for " << mLHEFoutput << " to exist" ;
@@ -155,6 +166,11 @@ public:
155166 std ::this_thread ::sleep_for (std ::chrono ::milliseconds (100 ));
156167 }
157168 LOG (info ) << "POWHEG events file for job " << mCurrFile << " found" ;
169+ while (!checkEOF ())
170+ {
171+ std ::this_thread ::sleep_for (std ::chrono ::milliseconds (100 ));
172+ }
173+ LOG (info ) << "POWHEG events ready" ;
158174 return true;
159175 }
160176
You can’t perform that action at this time.
0 commit comments