CMS 3D CMS Logo

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

Public Member Functions

def __init__
 
def getdict
 

Public Attributes

 filename
 
 nevents
 
 runs
 

Detailed Description

Definition at line 114 of file dataset.py.

Constructor & Destructor Documentation

def dataset.DataFile.__init__ (   self,
  filename,
  nevents,
  runs = None,
  trydas = True,
  allowunknown = False,
  dasinstance = defaultdasinstance 
)

Definition at line 115 of file dataset.py.

116  def __init__(self, filename, nevents, runs=None, trydas=True, allowunknown=False, dasinstance=defaultdasinstance):
117  self.filename = filename
118  self.nevents = int(nevents)
119  if runs is None:
120  runs = getrunnumbersfromfile(filename, trydas=trydas, allowunknown=allowunknown, dasinstance=dasinstance)
121  if isinstance(runs, str):
122  runs = runs.split()
123  self.runs = [int(_) for _ in runs]
def getrunnumbersfromfile
Definition: dataset.py:59

Member Function Documentation

def dataset.DataFile.getdict (   self)

Definition at line 124 of file dataset.py.

References dataset.DataFile.filename, join(), dataset.DataFile.nevents, dataset.RunRange.runs, dataset.DataFile.runs, and str.

125  def getdict(self):
126  return {"filename": self.filename, "nevents": str(self.nevents), "runs": " ".join(str(_) for _ in self.runs)}
static std::string join(char **cmd)
Definition: RemoteFile.cc:19
#define str(s)

Member Data Documentation

dataset.DataFile.filename

Definition at line 116 of file dataset.py.

Referenced by hippyaddtobaddatafiles.KeepWhileOpenFile.__exit__(), hippyaddtobaddatafiles.KeepWhileOpenFile.__open(), python.rootplot.rootmath.Target.__repr__(), dataset.DataFile.getdict(), and utils.unpickler.run().

dataset.DataFile.nevents

Definition at line 117 of file dataset.py.

Referenced by dataset.DataFile.getdict().

dataset.DataFile.runs

Definition at line 122 of file dataset.py.

Referenced by dataset.DataFile.getdict().