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 325 of file BeamSpotPostProcessing.py.

Member Function Documentation

◆ run()

def python.BeamSpotPostProcessing.UploadBeamSpot.run (   self)

Definition at line 326 of file BeamSpotPostProcessing.py.

326  def run(self):
327  beamSpotDbFileName = self.getFileName('-beamspot.db','AveBeamSpot')
328  cooltags = self.taskDict['COOLTAGS']
329  if not cooltags: cooltags = ''
330 
331  # Resolve beamspot tag
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  # Check that we haven't uploaded yet
338  if beamspottag in cooltags.split():
339  self.log('WARNING: Beam spot already uploaded to COOL: %s - continue anyway' % beamspottag)
340  # This command is kept for possible future use: raise PostProcessingError('ERROR: Beam spot already uploaded to COOL - if this is intentional, please upload manually.',
341  # self.executedSteps,TaskManager.StatusCodes['POSTPROCFAILED'])
342 
343  # Check that this is the express stream
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  # Dumping of the beam spot SQLite file is done by beamspotman
350  #self.logExec('cd %s; dumpBeamSpot.py %s' % (self.taskDir,beamSpotDbFileName))
351  self.logExec('beamspotman.py -b -n -t %s upload %s %s' % (beamspottag,self.dsName,self.taskName))
352  else:
353  #raise PostProcessingError('ERROR: No beam spot COOL SQLite file %s - did AveBeamSpot succeed?\n' % beamSpotDbFileName,self.executedSteps)
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 # # Once uploaded the beamspot can upload the DQ flags
357 # dataQualityDbFileName = self.getFileName('-dqflags.db','AveBeamSpot')
358 # if os.path.exists('/'.join([self.taskDir,dataQualityDbFileName])):
359 # self.logExec('beamspotman.py -b -n --dqtag %s dqflag %s %s' % (dqtag,self.dsName,self.taskName))
360 # else:
361 # 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)
362 

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