ATLAS Offline Software
FilterParams.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
2 
3 from AthenaCommon.Logging import logging
4 from AthenaCommon.Constants import DEBUG
5 
6 logger = logging.getLogger( __name__)
7 logger.setLevel(DEBUG)
8 
10  """Class used to transport parameters required to construct
11  a Filter object.
12  This includes the name of the filter type and its constructor
13  arguments.
14  """
15 
16  def __init__(self, typename='', args=None):
17 
18  self.typename = typename
19  self.args = args
20 
21  def __eq__(self, other):
22  return self.typename == other.typename and self.args == other.args
23 
24  def __str__(self):
25 
26  s = [self.__class__.__name__ + ':']
27  to_show = ['typename', 'args']
28  width = max([len(a) for a in to_show])
29 
30  [s.append('%s %s' % (a.ljust(width), str(getattr(self, a))))
31  for a in to_show]
32 
33  return '\n'.join(s)
python.FilterParams.FilterParams.args
args
Definition: FilterParams.py:19
python.FilterParams.FilterParams
Definition: FilterParams.py:9
max
#define max(a, b)
Definition: cfImp.cxx:41
python.FilterParams.FilterParams.typename
typename
Definition: FilterParams.py:18
python.FilterParams.FilterParams.__eq__
def __eq__(self, other)
Definition: FilterParams.py:21
python.FilterParams.FilterParams.__str__
def __str__(self)
Definition: FilterParams.py:24
Constants
some useful constants -------------------------------------------------—
TCS::join
std::string join(const std::vector< std::string > &v, const char c=',')
Definition: Trigger/TrigT1/L1Topo/L1TopoCommon/Root/StringUtils.cxx:10
str
Definition: BTagTrackIpAccessor.cxx:11
python.FilterParams.FilterParams.__init__
def __init__(self, typename='', args=None)
Definition: FilterParams.py:16