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

◆ __init__()

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 

Member Function Documentation

◆ getdict()

def dataset.DataFile.getdict (   self)

Definition at line 124 of file dataset.py.

124  def getdict(self):
125  return {"filename": self.filename, "nevents": str(self.nevents), "runs": " ".join(str(_) for _ in self.runs)}
126 

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

Member Data Documentation

◆ filename

dataset.DataFile.filename

◆ nevents

dataset.DataFile.nevents

Definition at line 117 of file dataset.py.

Referenced by dataset.DataFile.getdict().

◆ runs

dataset.DataFile.runs

Definition at line 122 of file dataset.py.

Referenced by dataset.DataFile.getdict().

join
static std::string join(char **cmd)
Definition: RemoteFile.cc:17
dataset.getrunnumbersfromfile
def getrunnumbersfromfile(filename, trydas=True, allowunknown=False, dasinstance=defaultdasinstance)
Definition: dataset.py:59
str
#define str(s)
Definition: TestProcessor.cc:52
dataset.int
int
Definition: dataset.py:35