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

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

Member Function Documentation

def MatrixUtil.InputInfo.__str__ (   self)

Definition at line 164 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().

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

Definition at line 111 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.

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

Definition at line 129 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.

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

Definition at line 136 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().

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

Member Data Documentation

MatrixUtil.InputInfo.dataSet

Definition at line 106 of file MatrixUtil.py.

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

MatrixUtil.InputInfo.events

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

Referenced by chain.Chain._guessTreeName().

MatrixUtil.InputInfo.ib_blacklist

Definition at line 108 of file MatrixUtil.py.

Referenced by MatrixUtil.InputInfo.das().

MatrixUtil.InputInfo.ib_block

Definition at line 109 of file MatrixUtil.py.

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

MatrixUtil.InputInfo.label

Definition at line 105 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(), 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 104 of file MatrixUtil.py.

MatrixUtil.InputInfo.ls

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