test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Public Attributes
MatrixUtil.InputInfo Class Reference
Inheritance diagram for MatrixUtil.InputInfo:

Public Member Functions

def __init__
 
def __str__
 
def das
 
def lumiRanges
 
def queries
 

Public Attributes

 dataSet
 
 events
 
 files
 
 ib_blacklist
 
 ib_block
 
 label
 
 location
 
 ls
 
 run
 
 split
 

Detailed Description

Definition at line 103 of file MatrixUtil.py.

Constructor & Destructor Documentation

def MatrixUtil.InputInfo.__init__ (   self,
  dataSet,
  label = '',
  run = [],
  ls = {},
  files = 1000,
  events = InputInfoNDefault,
  split = 10,
  location = 'CAF',
  ib_blacklist = None,
  ib_block = None 
)

Definition at line 104 of file MatrixUtil.py.

105  def __init__(self,dataSet,label='',run=[],ls={},files=1000,events=InputInfoNDefault,split=10,location='CAF',ib_blacklist=None,ib_block=None) :
106  self.run = run
107  self.ls = ls
108  self.files = files
109  self.events = events
110  self.location = location
111  self.label = label
112  self.dataSet = dataSet
113  self.split = split
114  self.ib_blacklist = ib_blacklist
115  self.ib_block = ib_block

Member Function Documentation

def MatrixUtil.InputInfo.__str__ (   self)

Definition at line 170 of file MatrixUtil.py.

References MatrixUtil.InputInfo.dataSet, MatrixUtil.InputInfo.ib_block, RPCRunIOV::RunIOV_Item.run, TB06Reco.run, TB06RecoH2.run, RPCDQMObject.run, ME::Header.run, HitEff.run, MatrixUtil.InputInfo.run, conddblib.TimeType.run, and SiPixelErrorEstimation.run.

Referenced by BeautifulSoup.Tag.__repr__(), BeautifulSoup.Tag.__unicode__(), and BeautifulSoup.Tag.prettify().

171  def __str__(self):
172  if self.ib_block:
173  return "input from: {0} with run {1}#{2}".format(self.dataSet, self.ib_block, self.run)
174  return "input from: {0} with run {1}".format(self.dataSet, self.run)
175 
176 
# merge dictionaries, with prioty on the [0] index
def MatrixUtil.InputInfo.das (   self,
  das_options 
)

Definition at line 116 of file MatrixUtil.py.

References MatrixUtil.InputInfo.ib_blacklist, join(), MatrixUtil.InputInfo.ls, DB_ME.queries, MatrixUtil.InputInfo.queries(), RPCRunIOV::RunIOV_Item.run, TB06RecoH2.run, TB06Reco.run, RPCDQMObject.run, ME::Header.run, HitEff.run, MatrixUtil.InputInfo.run, conddblib.TimeType.run, and SiPixelErrorEstimation.run.

117  def das(self, das_options):
118  if len(self.run) is not 0 or self.ls:
119  # take at most 5 queries, to avoid sinking das
120 
121  # do if you have LS queries
122  # command = ";".join(["das_client.py %s --query '%s'" % (das_options, query) for query in self.queries()[:3] ])
123  command = ";".join(["das_client %s --query '%s'" % (das_options, query) for query in self.queries()[:3] ])
124  command = "({0})".format(command)
125  else:
126  command = "das_client %s --query '%s'" % (das_options, self.queries()[0])
127 
128  # Run filter on DAS output
129  if self.ib_blacklist:
130  command += " | grep -E -v "
131  command += " ".join(["-e '{0}'".format(pattern) for pattern in self.ib_blacklist])
132  command += " | sort -u"
133  return command
static std::string join(char **cmd)
Definition: RemoteFile.cc:18
def MatrixUtil.InputInfo.lumiRanges (   self)

Definition at line 134 of file MatrixUtil.py.

References join(), MatrixUtil.InputInfo.ls, RPCRunIOV::RunIOV_Item.run, TB06Reco.run, TB06RecoH2.run, RPCDQMObject.run, ME::Header.run, HitEff.run, MatrixUtil.InputInfo.run, conddblib.TimeType.run, and SiPixelErrorEstimation.run.

135  def lumiRanges(self):
136  if len(self.run) != 0:
137  return "echo '{\n"+",".join(('"%d":[[1,268435455]]\n'%(x,) for x in self.run))+"}'"
138  if self.ls :
139  return "echo '{\n"+",".join(('"%d" : %s\n'%( int(x),self.ls[x]) for x in self.ls.keys()))+"}'"
140  return None
static std::string join(char **cmd)
Definition: RemoteFile.cc:18
def MatrixUtil.InputInfo.queries (   self)

Definition at line 141 of file MatrixUtil.py.

References MatrixUtil.InputInfo.dataSet, MatrixUtil.InputInfo.ib_block, MatrixUtil.InputInfo.ls, RPCRunIOV::RunIOV_Item.run, TB06Reco.run, TB06RecoH2.run, RPCDQMObject.run, ME::Header.run, HitEff.run, MatrixUtil.InputInfo.run, conddblib.TimeType.run, and SiPixelErrorEstimation.run.

Referenced by MatrixUtil.InputInfo.das().

142  def queries(self):
143  query_by = "block" if self.ib_block else "dataset"
144  query_source = "{0}#{1}".format(self.dataSet, self.ib_block) if self.ib_block else self.dataSet
145 
146  if self.ls :
147  the_queries = []
148  #for query_run in self.ls.keys():
149  # print "run is %s"%(query_run)
150  # if you have a LS list specified, still query das for the full run (multiple ls queries take forever)
151  # and use step1_lumiRanges.log to run only on LS which respect your selection
152 
153  # DO WE WANT T2_CERN ?
154  return ["file {0}={1} run={2}".format(query_by, query_source, query_run) for query_run in self.ls.keys()]
155  #return ["file {0}={1} run={2} site=T2_CH_CERN".format(query_by, query_source, query_run) for query_run in self.ls.keys()]
156 
157 
158  #
159  #for a_range in self.ls[query_run]:
160  # # print "a_range is %s"%(a_range)
161  # the_queries += ["file {0}={1} run={2} lumi={3} ".format(query_by, query_source, query_run, query_ls) for query_ls in expandLsInterval(a_range) ]
162  #print the_queries
163  return the_queries
164 
165  if len(self.run) is not 0:
166  return ["file {0}={1} run={2} site=T2_CH_CERN".format(query_by, query_source, query_run) for query_run in self.run]
167  #return ["file {0}={1} run={2} ".format(query_by, query_source, query_run) for query_run in self.run]
168  else:
169  return ["file {0}={1} site=T2_CH_CERN".format(query_by, query_source)]

Member Data Documentation

MatrixUtil.InputInfo.dataSet

Definition at line 111 of file MatrixUtil.py.

Referenced by MatrixUtil.InputInfo.__str__(), and MatrixUtil.InputInfo.queries().

MatrixUtil.InputInfo.events

Definition at line 108 of file MatrixUtil.py.

Referenced by eventsfwlite.Events.__getattr__(), eventsfwlite.Events.__init__(), looper.Looper.loop(), and looper.Looper.process().

MatrixUtil.InputInfo.files

Definition at line 107 of file MatrixUtil.py.

Referenced by chain.Chain._guessTreeName(), dataset.BaseDataset.listOfFiles(), dataset.BaseDataset.listOfGoodFiles(), and dataset.BaseDataset.printFiles().

MatrixUtil.InputInfo.ib_blacklist

Definition at line 113 of file MatrixUtil.py.

Referenced by MatrixUtil.InputInfo.das().

MatrixUtil.InputInfo.ib_block

Definition at line 114 of file MatrixUtil.py.

Referenced by MatrixUtil.InputInfo.__str__(), and MatrixUtil.InputInfo.queries().

MatrixUtil.InputInfo.label

Definition at line 110 of file MatrixUtil.py.

Referenced by Vispa.Plugins.ConfigEditor.ConfigDataAccessor.ConfigDataAccessor._sort_list(), python.rootplot.root2matplotlib.Hist.bar(), python.rootplot.root2matplotlib.Hist.barh(), python.rootplot.root2matplotlib.Hist.errorbar(), python.rootplot.root2matplotlib.Hist.errorbarh(), Vispa.Plugins.ConfigEditor.ConfigDataAccessor.ConfigDataAccessor.foundIn(), Vispa.Plugins.ConfigEditor.ConfigDataAccessor.ConfigDataAccessor.fullFilename(), Vispa.Plugins.ConfigEditor.ConfigDataAccessor.ConfigDataAccessor.inputEventContent(), Vispa.Plugins.ConfigEditor.ConfigDataAccessor.ConfigDataAccessor.outputEventContent(), core.TriggerMatchAnalyzer.TriggerMatchAnalyzer.process(), Vispa.Plugins.ConfigEditor.ToolDataAccessor.ToolDataAccessor.properties(), Vispa.Plugins.EdmBrowser.EdmDataAccessor.EdmDataAccessor.properties(), Vispa.Plugins.ConfigEditor.ConfigDataAccessor.ConfigDataAccessor.properties(), Vispa.Plugins.ConfigEditor.ConfigDataAccessor.ConfigDataAccessor.readConnections(), core.AutoHandle.AutoHandle.ReallyLoad(), Vispa.Plugins.ConfigEditor.ToolDataAccessor.ToolDataAccessor.updateProcess(), and Vispa.Plugins.ConfigEditor.ConfigDataAccessor.ConfigDataAccessor.usedBy().

MatrixUtil.InputInfo.location

Definition at line 109 of file MatrixUtil.py.

MatrixUtil.InputInfo.ls

Definition at line 106 of file MatrixUtil.py.

Referenced by MatrixUtil.InputInfo.das(), dqm_interfaces.DQMcommunicator.get_root_objects(), dqm_interfaces.DQMcommunicator.get_root_objects_list(), dqm_interfaces.DQMcommunicator.get_root_objects_list_recursive(), dqm_interfaces.DQMcommunicator.get_root_objects_names_list_recursive(), dqm_interfaces.DQMcommunicator.get_root_objects_recursive(), MatrixUtil.InputInfo.lumiRanges(), MatrixUtil.InputInfo.queries(), and dqm_interfaces.DirWalkerFile.walk().

MatrixUtil.InputInfo.run

Definition at line 105 of file MatrixUtil.py.

Referenced by generateEDF.LumiInfo.__str__(), MatrixUtil.InputInfo.__str__(), Types.EventID.cppID(), Types.LuminosityBlockID.cppID(), MatrixUtil.InputInfo.das(), personalPlayback.Playback.do_create_lumi(), personalPlayback.Playback.do_exec(), generateEDF.LumiInfo.fixXingInfo(), MatrixUtil.InputInfo.lumiRanges(), MatrixUtil.InputInfo.queries(), and dqm_interfaces.DirWalkerFile.walk().

MatrixUtil.InputInfo.split

Definition at line 112 of file MatrixUtil.py.