Definition at line 16 of file LHETools.py.
◆ __init__()
def LHETools.Record.__init__ |
( |
|
self, |
|
|
** |
kwargs |
|
) |
| |
Definition at line 17 of file LHETools.py.
18 self.invalid =
not (
set(kwargs.keys()) ==
set(self.FIELD_NAMES))
19 self.__dict__.
update({field: self.FIELD_TYPES[field](value)
20 for field, value
in kwargs.items()})
◆ from_string()
def LHETools.Record.from_string |
( |
|
cls, |
|
|
|
string |
|
) |
| |
Definition at line 23 of file LHETools.py.
23 def from_string(cls, string):
24 if len(cls.FIELD_NAMES) != len(string.split()):
25 LHEToolsLog.warning(
"Inconsistent number of fields in lhe file line:")
26 LHEToolsLog.warning(string)
29 return cls(**dict(zip(cls.FIELD_NAMES, string.split())))
31 LHEToolsLog.warning(
"Impossible to interpret lhe file line:")
32 LHEToolsLog.warning(string)
◆ to_string()
def LHETools.Record.to_string |
( |
|
self | ) |
|
Definition at line 35 of file LHETools.py.
36 return self.FMT.
format(**{field: getattr(self, field)
for field
in self.FIELD_NAMES})
if not self.invalid
else ""
◆ invalid
The documentation for this class was generated from the following file:
constexpr std::enable_if_t< is_bitmask_v< E >, E & > set(E &lhs, E rhs)
Convenience function to set bits in a class enum bitmask.