3 from __future__
import print_function
8 self.
name =
"GoodRunsListConfig"
37 print (
'Name : %s' % (self.
name))
39 print (
'File : %s' % (self.
listname))
40 print (
'Show : %s' % (self.
show))
41 print (
'DQ folder : %s' % (self.
dqfolder))
57 print (
'to exclude', toexclude)
58 for i, q
in enumerate(arr):
61 arr[i] =
' '.
join([qsplit[0] + toexclude] + qsplit[1:])
64 cmd +=
"%s %s and " % (key,selection)
68 cmd +=
" %s" % (self.
show)
69 else: cmd +=
" / show run and events / nodef"
72 cmd +=
" , %s" % (xmlstring)
77 from CoolRunQuery.AtlRunQueryLib
import DQSelector,AtlRunQueryOptions
78 from CoolRunQuery.AtlRunQueryParser
import ArgumentParser
83 atlqueryarg = self.
querytool +
" " + ap.ParseArgument( query )
84 (options, args) = AtlRunQueryOptions().
parse(atlqueryarg)
87 selector = DQSelector(name =
'dataquality', dq = options.dqchannels)
91 dqconfig = selector.selectors[dqfolder]
92 for flag
in dqconfig.flags:
93 fncName = dqconfig.flagInterpreter[flag][
'passFncName']
94 fncName = fncName.replace(
"\'",
"")
95 funcArr.append(fncName)
100 dqchannels = options.dqchannels
101 for i
in range(len(dqchannels)):
102 dqArr = dqchannels[i].
split()
103 dqArr[1] = funcArr[i]
104 dqchannels[i] =
' '.
join(dqArr)
113 if len(dqfolder)>0: self.
dqfolder = dqfolder
115 dqquery = self.
querydict[
'dq'][idx].strip()
116 queryArr = dqquery.split()
119 ctagArr = queryArr[1].
split(
'#')
121 queryArr[1] =
'%s#%s' % (self.
dqfolder,ctagArr[1])
124 elif len(queryArr)==2:
126 dqquery =
'%s %s %s' % (queryArr[0],queryArr[1],queryArr[2])
131 if len(dqctag)==0:
return
133 dqquery = self.
querydict[
'dq'][idx].strip()
134 queryArr = dqquery.split()
137 ctagArr = queryArr[1].
split(
'#')
138 queryArr[1] =
'%s#%s' % (ctagArr[0],dqctag)
140 elif len(queryArr)==2:
141 dqfoldtag =
'%s#%s' % (self.
dqfolder,dqctag)
142 queryArr.insert(1,dqfoldtag)
143 dqquery =
'%s %s %s' % (queryArr[0],queryArr[1],queryArr[2])
148 if len(ctag)>0: self.
querydict[
'ctag'] = ctag