ATLAS Offline Software
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
LHETools.EventInfo Class Reference
Inheritance diagram for LHETools.EventInfo:
Collaboration diagram for LHETools.EventInfo:

Public Member Functions

def from_string (cls, string)
 
def to_string (self)
 

Public Attributes

 invalid
 

Static Public Attributes

list FIELD_NAMES = ['nparticles', 'id', 'weight', 'scale', 'A_QED', 'A_QCD']
 
dictionary FIELD_TYPES
 
string FMT = "{nparticles:7d} {id:6d} {weight: .5E} {scale: .5E} {A_QED: .5E} {A_QCD: .5E}"
 

Detailed Description

Definition at line 39 of file LHETools.py.

Member Function Documentation

◆ from_string()

def LHETools.Record.from_string (   cls,
  string 
)
inherited

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)
27  return cls()
28  try:
29  return cls(**dict(zip(cls.FIELD_NAMES, string.split())))
30  except:
31  LHEToolsLog.warning("Impossible to interpret lhe file line:")
32  LHEToolsLog.warning(string)
33  return cls()
34 

◆ to_string()

def LHETools.Record.to_string (   self)
inherited

Definition at line 35 of file LHETools.py.

35  def to_string(self):
36  return self.FMT.format(**{field: getattr(self, field) for field in self.FIELD_NAMES}) if not self.invalid else ""
37 
38 

Member Data Documentation

◆ FIELD_NAMES

list LHETools.EventInfo.FIELD_NAMES = ['nparticles', 'id', 'weight', 'scale', 'A_QED', 'A_QCD']
static

Definition at line 41 of file LHETools.py.

◆ FIELD_TYPES

dictionary LHETools.EventInfo.FIELD_TYPES
static
Initial value:
= {
'nparticles': int,
'id': int,
'weight': float,
'scale': float,
'A_QCD': float,
'A_QED': float
}

Definition at line 44 of file LHETools.py.

◆ FMT

string LHETools.EventInfo.FMT = "{nparticles:7d} {id:6d} {weight: .5E} {scale: .5E} {A_QED: .5E} {A_QCD: .5E}"
static

Definition at line 54 of file LHETools.py.

◆ invalid

LHETools.Record.invalid
inherited

Definition at line 18 of file LHETools.py.


The documentation for this class was generated from the following file:
vtune_athena.format
format
Definition: vtune_athena.py:14
CaloClusterListBadChannel.cls
cls
Definition: CaloClusterListBadChannel.py:8
ActsTrk::to_string
std::string to_string(const DetectorType &type)
Definition: GeometryDefs.h:34