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

Public Member Functions

def __init__ (self)
 
def index (self)
 
def generate (self, configuration=None, folder='LBSUMM', cooltag='HEAD')
 

Public Attributes

 genlock
 

Detailed Description

Definition at line 99 of file GoodRunsLists/python/grl.py.

Constructor & Destructor Documentation

◆ __init__()

def python.grl.GRLGen.__init__ (   self)

Definition at line 100 of file GoodRunsLists/python/grl.py.

100  def __init__(self):
101  self.genlock = threading.Lock()
102  pass
103 

Member Function Documentation

◆ generate()

def python.grl.GRLGen.generate (   self,
  configuration = None,
  folder = 'LBSUMM',
  cooltag = 'HEAD' 
)

Definition at line 161 of file GoodRunsLists/python/grl.py.

161  def generate(self, configuration=None, folder='LBSUMM', cooltag='HEAD'):
162  if configuration is None:
163  return ''
164  with self.genlock as lock: # noqa: F841
165  q = multiprocessing.Queue()
166  proc = multiprocessing.Process(target=_get_grl_info,
167  args = [os.path.join(GRL_DIRECTORY, configuration),
168  cooltag],
169  kwargs = {'queue': q, 'folder': folder})
170  proc.start()
171  rv = q.get()
172  proc.join()
173  cherrypy.response.headers['content-type'] = 'text/xml'
174  cherrypy.response.headers['content-disposition'] = 'attachment; filename=%s' % rv[1]
175  return rv[0]

◆ index()

def python.grl.GRLGen.index (   self)

Definition at line 105 of file GoodRunsLists/python/grl.py.

105  def index(self):
106  rv = ['<html><head>'
107  '<title>GRL generator</title>'
108  '<script type="text/javascript" src="/static/js/grl.js"><!-- -->'
109  '</script>'
110  '</head><body onload="onLoad()">'
111  '<h1>Good Run List Generator</h1>'
112  '<p>This generator allows you to create good run list XML files from '
113  'configurations that are currently kept on AFS, in <tt>~atlasdqm/grl</tt>.'
114  '<p>Using tags:'
115  '<p>CoolRunQuery-00-01-92'
116  '<p>GoodRunsLists-00-00-71'
117  ]
118  rv.append('<div><form method="get" action="generate" style="border-width: 2px; border-style:solid">')
119  rv.append('Configuration file:&nbsp;<select name="configuration" id="confselect">')
120  for f, cn in _get_list_of_grl_classes():
121  rv.append('<option value="%(config)s">%(config)s</option>'
122  % {'config': cn})
123  rv.append('</select> <a href="javascript:downloadPython()">(Click to download)</a> <br/>\n')
124  rv.append('DQ folder:&nbsp;<select name="folder" id="folderselect" onchange="adjustTagList(this)">\n'
125  '<option value="LBSUMM" selected>LBSUMM: Full DQ summary (default, recommended)</option>\n'
126  '<option value="SHIFTOFL">SHIFTOFL: Offline shifters (experts)</option>\n'
127  '<option value="DQCALCOFL">DQCALCOFL: Automatic checks + online shifters (experts)</option>\n'
128  '</select> If in doubt, leave as LBSUMM<br/>'
129  )
130  rv.append('COOL tag:&nbsp;<select name="cooltag" id ="cooltagselect">')
131  for folder in ('LBSUMM', 'SHIFTOFL', 'DQCALCOFL'):
132  for t, descr, lock in _get_cool_tags_for_folder(folder):
133  if t in TAGS_TO_SUPPRESS: continue
134  apptext = []
135  if descr:
136  apptext.append('(%s)' % descr)
137  if lock == 'unlocked':
138  apptext.append('Tag unlocked, all runs may change')
139  elif lock == 'partial':
140  apptext.append('Tag partially locked, recent runs may change')
141  else:
142  apptext.append('Tag locked')
143  if apptext != []:
144  apptext.insert(0, '&mdash;')
145  rv.append('<option value="%(tag)s">%(tag)s %(apptext)s</option>'
146  % {'tag': t, 'apptext': ' '.join(apptext)})
147 
148  rv.append(
149  '<option value="">HEAD</option>'
150  '</select><br/>')
151  rv.append(
152  '<input type="submit" value="Submit"/>\n'
153  '</form></div>')
154 
155  rv.append('</body></html>')
156 
157 
158  return '\n'.join(rv)
159 

Member Data Documentation

◆ genlock

python.grl.GRLGen.genlock

Definition at line 101 of file GoodRunsLists/python/grl.py.


The documentation for this class was generated from the following file:
python.MadGraphUtils.generate
def generate(process_dir='PROC_mssm_0', grid_pack=False, gridpack_compile=False, extlhapath=None, required_accuracy=0.01, runArgs=None, bias_module=None, requirePMGSettings=False)
Definition: MadGraphUtils.py:385
python.grl._get_cool_tags_for_folder
def _get_cool_tags_for_folder(folder)
Definition: GoodRunsLists/python/grl.py:66
TCS::join
std::string join(const std::vector< std::string > &v, const char c=',')
Definition: Trigger/TrigT1/L1Topo/L1TopoCommon/Root/StringUtils.cxx:10
python.grl._get_list_of_grl_classes
def _get_list_of_grl_classes()
Definition: GoodRunsLists/python/grl.py:88
python.processes.powheg.ZZ.ZZ.__init__
def __init__(self, base_directory, **kwargs)
Constructor: all process options are set here.
Definition: ZZ.py:18
DeMoScan.index
string index
Definition: DeMoScan.py:364