ATLAS Offline Software
Loading...
Searching...
No Matches
python.BeamSpotPostProcessing.UploadBeamSpot Class Reference
Inheritance diagram for python.BeamSpotPostProcessing.UploadBeamSpot:
Collaboration diagram for python.BeamSpotPostProcessing.UploadBeamSpot:

Public Member Functions

 run (self)

Public Attributes

 executedSteps
 taskDir
 dsName
 taskName

Detailed Description

Definition at line 325 of file BeamSpotPostProcessing.py.

Member Function Documentation

◆ run()

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
std::vector< std::string > split(const std::string &s, const std::string &t=":")
Definition hcg.cxx:177
Definition run.py:1

Member Data Documentation

◆ dsName

python.BeamSpotPostProcessing.UploadBeamSpot.dsName

Definition at line 351 of file BeamSpotPostProcessing.py.

◆ executedSteps

python.BeamSpotPostProcessing.UploadBeamSpot.executedSteps

Definition at line 335 of file BeamSpotPostProcessing.py.

◆ taskDir

python.BeamSpotPostProcessing.UploadBeamSpot.taskDir

Definition at line 348 of file BeamSpotPostProcessing.py.

◆ taskName

python.BeamSpotPostProcessing.UploadBeamSpot.taskName

Definition at line 351 of file BeamSpotPostProcessing.py.


The documentation for this class was generated from the following file: