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 99 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 100 of file MatrixUtil.py.

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

Member Function Documentation

def MatrixUtil.InputInfo.__str__ (   self)

Definition at line 166 of file MatrixUtil.py.

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

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

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

Definition at line 112 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, HitEff.run, ME::Header.run, MatrixUtil.InputInfo.run, conddblib.TimeType.run, and SiPixelErrorEstimation.run.

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

Definition at line 130 of file MatrixUtil.py.

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

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

Definition at line 137 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, HitEff.run, ME::Header.run, MatrixUtil.InputInfo.run, conddblib.TimeType.run, and SiPixelErrorEstimation.run.

Referenced by MatrixUtil.InputInfo.das().

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

Member Data Documentation

MatrixUtil.InputInfo.dataSet

Definition at line 107 of file MatrixUtil.py.

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

MatrixUtil.InputInfo.events

Definition at line 104 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 103 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 109 of file MatrixUtil.py.

Referenced by MatrixUtil.InputInfo.das().

MatrixUtil.InputInfo.ib_block

Definition at line 110 of file MatrixUtil.py.

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

MatrixUtil.InputInfo.label

Definition at line 106 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 105 of file MatrixUtil.py.

MatrixUtil.InputInfo.ls

Definition at line 102 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 101 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 108 of file MatrixUtil.py.