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

Public Member Functions

None __init__ (self)
 
str __str__ (self)
 
bool isValid (self)
 
None addCollection (self, *str collection)
 

Static Public Member Functions

str extractPrefix (*str collection)
 

Public Attributes

 collections
 

Static Public Attributes

 types
 
 postFixes
 

Detailed Description

Definition at line 6 of file ActsCollectionsConfig.py.

Constructor & Destructor Documentation

◆ __init__()

None ActsCollectionsConfig.TrackBackends.__init__ (   self)

Definition at line 23 of file ActsCollectionsConfig.py.

23  def __init__(self) -> None:
24  self.collections = dict()
25  for el in TrackBackends.postFixes:
26  self.collections[el] = None
27 

Member Function Documentation

◆ __str__()

str ActsCollectionsConfig.TrackBackends.__str__ (   self)

Definition at line 28 of file ActsCollectionsConfig.py.

28  def __str__(self) -> str:
29  message = "[ "
30  for el in TrackBackends.postFixes:
31  message += f"{el}={self.collections[el]} "
32  message += "]"
33  return message
34 

◆ addCollection()

None ActsCollectionsConfig.TrackBackends.addCollection (   self,
*str  collection 
)

Definition at line 50 of file ActsCollectionsConfig.py.

50  def addCollection(self,
51  *,
52  collection: str) -> None:
53  assert isinstance(collection, str)
54  for el in TrackBackends.postFixes:
55  if collection.endswith(el):
56  if self.collections[el] is not None:
57  raise Exception(f"Trying to add collection '{collection}', but this backend is already recorded")
58  self.collections[el] = collection
59  return
60  # If not in allowed post fixes we raise Exception
61  raise Exception(f"Collection {collection} is a NOT KNOWN ACTS track backend")
62 

◆ extractPrefix()

str ActsCollectionsConfig.TrackBackends.extractPrefix ( *str  collection)
static

Definition at line 36 of file ActsCollectionsConfig.py.

36  def extractPrefix(*, collection: str) -> str:
37  assert isinstance(collection, str)
38  for el in TrackBackends.postFixes:
39  if collection.endswith(el):
40  return collection.replace(el, "")
41  # If not in allowed post fixes we raise Exception
42  raise Exception(f"Collection {collection} is a NOT KNOWN ACTS track backend, prefix could not be deduced")
43 

◆ isValid()

bool ActsCollectionsConfig.TrackBackends.isValid (   self)

Definition at line 44 of file ActsCollectionsConfig.py.

44  def isValid(self) -> bool:
45  for (key, value) in self.collections.items():
46  if value is None:
47  return False
48  return True
49 

Member Data Documentation

◆ collections

ActsCollectionsConfig.TrackBackends.collections

Definition at line 24 of file ActsCollectionsConfig.py.

◆ postFixes

ActsCollectionsConfig.TrackBackends.postFixes
static

Definition at line 15 of file ActsCollectionsConfig.py.

◆ types

ActsCollectionsConfig.TrackBackends.types
static

Definition at line 8 of file ActsCollectionsConfig.py.


The documentation for this class was generated from the following file:
isValid
bool isValid(const T &p)
Definition: AtlasPID.h:214
Muon::IDC_Helper::addCollection
IDC::IDENTIFIABLE * addCollection(const Identifier collId, IDC *idc, const IDHELPER &idHelper, MsgStream &log)
TrigJetMonitorAlgorithm.items
items
Definition: TrigJetMonitorAlgorithm.py:79
python.processes.powheg.ZZ.ZZ.__init__
def __init__(self, base_directory, **kwargs)
Constructor: all process options are set here.
Definition: ZZ.py:18