ATLAS Offline Software
Public Member Functions | List of all members
python.BeamSpotPostProcessing.UploadBeamSpot Class Reference
Inheritance diagram for python.BeamSpotPostProcessing.UploadBeamSpot:
Collaboration diagram for python.BeamSpotPostProcessing.UploadBeamSpot:

Public Member Functions

def run (self)
 

Detailed Description

Definition at line 327 of file BeamSpotPostProcessing.py.

Member Function Documentation

◆ run()

def python.BeamSpotPostProcessing.UploadBeamSpot.run (   self)

Definition at line 328 of file BeamSpotPostProcessing.py.

328  def run(self):
329  beamSpotDbFileName = self.getFileName('-beamspot.db','AveBeamSpot')
330  cooltags = self.taskDict['COOLTAGS']
331  if not cooltags: cooltags = ''
332 
333  # Resolve beamspot tag
334  try:
335  beamspottag = COOLUtils.resolveCurrentBeamSpotFolder()
336  except Exception:
337  raise PostProcessingError('ERROR: Unable to resolve beamspot folder tag',self.executedSteps,TaskManager.StatusCodes['POSTPROCFAILED'])
338 
339  # Check that we haven't uploaded yet
340  if beamspottag in cooltags.split():
341  self.log('WARNING: Beam spot already uploaded to COOL: %s - continue anyway' % beamspottag)
342  # This command is kept for possible future use: raise PostProcessingError('ERROR: Beam spot already uploaded to COOL - if this is intentional, please upload manually.',
343  # self.executedSteps,TaskManager.StatusCodes['POSTPROCFAILED'])
344 
345  # Check that this is the express stream
346  if self.dsName.split('.')[-1] != 'express_express' and self.dsName.split('.')[-1] != 'calibration_BeamSpot':
347  print (self.dsName.split('.')[-1] )
348  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)
349  return
350  if os.path.exists('/'.join([self.taskDir,beamSpotDbFileName])):
351  # Dumping of the beam spot SQLite file is done by beamspotman
352  #self.logExec('cd %s; dumpBeamSpot.py %s' % (self.taskDir,beamSpotDbFileName))
353  self.logExec('beamspotman.py -b -n -t %s upload %s %s' % (beamspottag,self.dsName,self.taskName))
354  else:
355  #raise PostProcessingError('ERROR: No beam spot COOL SQLite file %s - did AveBeamSpot succeed?\n' % beamSpotDbFileName,self.executedSteps)
356  self.log(text='ERROR: No beam spot COOL SQLite file %s\n Nothing to upload - was beam spot determination successful?\n' % beamSpotDbFileName,doPrint=True)
357 
358 # # Once uploaded the beamspot can upload the DQ flags
359 # dataQualityDbFileName = self.getFileName('-dqflags.db','AveBeamSpot')
360 # if os.path.exists('/'.join([self.taskDir,dataQualityDbFileName])):
361 # self.logExec('beamspotman.py -b -n --dqtag %s dqflag %s %s' % (dqtag,self.dsName,self.taskName))
362 # else:
363 # self.log(text='ERROR: No beam spot DQ flag SQLite file %s\n Nothing to upload - was beam spot or DQ determination successful?\n' % dqDbFileName,doPrint=True)
364 

The documentation for this class was generated from the following file:
run
int run(int argc, char *argv[])
Definition: ttree2hdf5.cxx:28
TCS::join
std::string join(const std::vector< std::string > &v, const char c=',')
Definition: Trigger/TrigT1/L1Topo/L1TopoCommon/Root/StringUtils.cxx:10
Trk::split
@ split
Definition: LayerMaterialProperties.h:38