CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes
dataset.DataFile Class Reference
Inheritance diagram for dataset.DataFile:

Public Member Functions

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

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.

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

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.

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

Member Data Documentation

dataset.DataFile.filename
dataset.DataFile.nevents

Definition at line 117 of file dataset.py.

Referenced by dataset.DataFile.getdict().

dataset.DataFile.runs