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

Public Member Functions

def run (self)
 
def run (self, absent=False)
 

Detailed Description

Automatically determine DQ info (after uploading beamspot).  For reprocessing also upload absent defects to remove previosuly set ones

Definition at line 406 of file BeamSpotPostProcessing.py.

Member Function Documentation

◆ run() [1/2]

def python.BeamSpotPostProcessing.DQBeamSpotReproc.run (   self)

Definition at line 408 of file BeamSpotPostProcessing.py.

408  def run(self):
409  return DQBeamSpot.run(self, absent=True)
410 

◆ run() [2/2]

def python.BeamSpotPostProcessing.DQBeamSpot.run (   self,
  absent = False 
)
inherited

Definition at line 365 of file BeamSpotPostProcessing.py.

365  def run(self, absent=False):
366  ntFileName = self.getFileName('-nt.root','BeamSpotNt')
367  dataQualityDbFileName = self.getFileName('-dqflags.db')
368 
369  if os.path.exists('/'.join([self.taskDir,dataQualityDbFileName])):
370  self.logExec('cd %s; rm -f %s' % (self.taskDir,dataQualityDbFileName))
371 
372  if os.path.exists('/'.join([self.taskDir,ntFileName])):
373  cmd = 'cd %s; dqBeamSpot.py -b %s -o %s %s' % (self.taskDir,'-a' if absent else '',dataQualityDbFileName,ntFileName)
374  status = self.logExec(cmd,doPrint=True,abortOnError=False)
375 
376  if status:
377  raise PostProcessingError('ERROR in postprocessing step DQBeamSpot while executing:\n\n%s\n' % (cmd),self.executedSteps)
378 
379  # Add DQ flags to results and do linking
380  self.addResult(dataQualityDbFileName)
381 
382  dataQualityTxtFileName = dataQualityDbFileName.replace('.db','.txt')
383  cmd = 'grep -c "ID_BS_NOBEAMSPOT" %s/%s' % (self.taskDir, dataQualityTxtFileName)
384  status,out = subprocess.getstatusoutput(cmd)
385 
386  # Catch errors (do it this way as the exit codes from grep are nasty)
387  try:
388  nRed=int(out)
389  except ValueError:
390  raise PostProcessingError('ERROR in postprocessing step DQBeamSpot while executing:\n\n%s\n' % (cmd),self.executedSteps)
391 
392  if nRed==0:
393  link='<a class="ok" href="../files?u=%s/%s/%s-dqflags.txt">DQFlags</a>' % (self.dsName,self.taskName,self.baseNameStep)
394  else:
395  link='<a class="bad" href="../files?u=%s/%s/%s-dqflags.txt">DQFlags</a>' % (self.dsName,self.taskName,self.baseNameStep)
396 
397  resultLinks = self.taskDict['RESULTLINKS']
398  if resultLinks.find(link)==-1:
399  resultLinks = ' '.join([resultLinks, link])
400 
401  # Set links by hand
402  self.taskman.setValue(self.dsName,self.taskName,'RESULTLINKS',resultLinks)
403  else:
404  raise PostProcessingError('ERROR: No ntuple file %s - did BeamSpotNt step run?\n' % ntFileName,self.executedSteps)
405 

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
python.CaloAddPedShiftConfig.int
int
Definition: CaloAddPedShiftConfig.py:45