327 beamSpotDbFileName = self.getFileName('-beamspot.db','AveBeamSpot')
328 cooltags = self.taskDict['COOLTAGS']
329 if not cooltags: cooltags = ''
330
331
332 try:
333 beamspottag = COOLUtils.resolveCurrentBeamSpotFolder()
334 except Exception:
335 raise PostProcessingError('ERROR: Unable to resolve beamspot folder tag',self.executedSteps,TaskManager.StatusCodes['POSTPROCFAILED'])
336
337
338 if beamspottag in cooltags.split():
339 self.log('WARNING: Beam spot already uploaded to COOL: %s - continue anyway' % beamspottag)
340
341
342
343
344 if self.dsName.
split(
'.')[-1] !=
'express_express' and self.dsName.
split(
'.')[-1] !=
'calibration_BeamSpot':
345 print (self.dsName.
split(
'.')[-1] )
346 self.log(text="WARNING: Not running on the express or BeamSpot stream, so won't upload anything - if this is intentional, please upload manually\n",doPrint=True)
347 return
348 if os.path.exists('/'.join([self.taskDir,beamSpotDbFileName])):
349
350
351 self.logExec('beamspotman.py -b -n -t %s upload %s %s' % (beamspottag,self.dsName,self.taskName))
352 else:
353
354 self.log(text='ERROR: No beam spot COOL SQLite file %s\n Nothing to upload - was beam spot determination successful?\n' % beamSpotDbFileName,doPrint=True)
355
356
357
358
359
360
361
362
std::vector< std::string > split(const std::string &s, const std::string &t=":")