CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Classes | Functions | Variables
dataLoader Namespace Reference

Classes

class  DataLoader
 

Functions

def get_data
 
def get_data_csv
 

Variables

 separate_by_flav = False
 
 separate_by_op = False
 

Function Documentation

def dataLoader.get_data (   filename)

Definition at line 190 of file dataLoader.py.

References get_data_csv().

Referenced by generateFlavCfromFlavB.main(), and checkBTagCalibrationConsistency.run_check().

191 def get_data(filename):
192  with open(filename) as f:
193  csv_data = f.readlines()
194  if not (csv_data and "OperatingPoint" in csv_data[0]):
195  print "Data file does not contain typical header: %s. Exit" % filename
196  return False
197  csv_data.pop(0) # remove header
198  return get_data_csv(csv_data)
def get_data_csv
Definition: dataLoader.py:157
def get_data
Definition: dataLoader.py:190
def dataLoader.get_data_csv (   csv_data)

Definition at line 157 of file dataLoader.py.

References alcazmumu_cfi.filter, and list().

Referenced by get_data(), and checkBTagCalibrationConsistency.run_check_csv().

158 def get_data_csv(csv_data):
159  # grab measurement types
160  meas_types = set(
161  l.split(',')[1].strip()
162  for l in csv_data
163  if len(l.split()) == 11
164  )
165 
166  # grab operating points
167  ops = set(
168  int(l.split(',')[0])
169  for l in csv_data
170  if len(l.split()) == 11
171  ) if separate_by_op else ['all']
172 
173  # grab flavors
174  flavs = set(
175  int(l.split(',')[3])
176  for l in csv_data
177  if len(l.split()) == 11
178  ) if separate_by_flav else ['all']
179 
180  # make loaders and filter empty ones
181  lds = list(
182  DataLoader(csv_data, mt, op, fl)
183  for mt in meas_types
184  for op in ops
185  for fl in flavs
186  )
187  lds = filter(lambda d: d.entries, lds)
188  return lds
189 
def get_data_csv
Definition: dataLoader.py:157
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger list("!*","!HLTx*"if it matches 2 triggers or more) will accept the event if all the matching triggers are FAIL.It will reject the event if any of the triggers are PASS or EXCEPTION(this matches the behavior of"!*"before the partial wildcard feature was incorporated).Triggers which are in the READY state are completely ignored.(READY should never be returned since the trigger paths have been run

Variable Documentation

dataLoader.separate_by_flav = False

Definition at line 16 of file dataLoader.py.

dataLoader.separate_by_op = False

Definition at line 15 of file dataLoader.py.