ATLAS Offline Software
Public Member Functions | Public Attributes | List of all members
python.TrigValSteering.Input.TrigValInput Class Reference
Inheritance diagram for python.TrigValSteering.Input.TrigValInput:
Collaboration diagram for python.TrigValSteering.Input.TrigValInput:

Public Member Functions

def __init__ (self, keyword, source, format, paths)
 
def __str__ (self)
 
def is_valid (self)
 

Public Attributes

 log
 
 keyword
 
 source
 
 format
 
 paths
 

Detailed Description

Input object representing a data sample of a given format. The sample can
consist of multiple files.

Definition at line 20 of file Input.py.

Constructor & Destructor Documentation

◆ __init__()

def python.TrigValSteering.Input.TrigValInput.__init__ (   self,
  keyword,
  source,
  format,
  paths 
)

Definition at line 26 of file Input.py.

26  def __init__(self, keyword, source, format, paths):
27  self.log = get_logger()
28  self.keyword = keyword
29 
30  allowed_sources = ['data', 'mc']
31  if source not in allowed_sources:
32  self.log.error('source has to be one of %s', allowed_sources)
33  self.source = None
34  else:
35  self.source = source
36 
37  allowed_formats = ['BS', 'HITS', 'RDO', 'ESD', 'AOD']
38  if format not in allowed_formats:
39  self.log.error('format has to be one of %s', allowed_formats)
40  self.format = None
41  else:
42  self.format = format
43 
44  if not isinstance(paths, list):
45  self.log.error('paths have to be provided as a list')
46  self.paths = None
47  else:
48  self.paths = []
49  for path in paths:
50  if not os.path.isfile(path):
51  self.log.error('Cannot access file: %s', path)
52  else:
53  self.paths.append(path)
54  if len(self.paths) == 0:
55  self.log.error('Failed to parse paths')
56  self.paths = None
57 

Member Function Documentation

◆ __str__()

def python.TrigValSteering.Input.TrigValInput.__str__ (   self)

Definition at line 58 of file Input.py.

58  def __str__(self):
59  str = 'TrigValInput object:\n'
60  str += '---- keyword: {}\n'.format(self.keyword)
61  str += '---- source: {}\n'.format(self.source)
62  str += '---- format: {}\n'.format(self.format)
63  str += '---- paths: {}\n'.format(self.paths)
64  str += '---- is_valid: {}'.format(self.is_valid())
65  return str
66 

◆ is_valid()

def python.TrigValSteering.Input.TrigValInput.is_valid (   self)

Definition at line 67 of file Input.py.

67  def is_valid(self):
68  for param in [self.keyword, self.source, self.format, self.paths]:
69  if param is None:
70  return False
71  return True
72 
73 
74 @lru_cache

Member Data Documentation

◆ format

python.TrigValSteering.Input.TrigValInput.format

Definition at line 40 of file Input.py.

◆ keyword

python.TrigValSteering.Input.TrigValInput.keyword

Definition at line 28 of file Input.py.

◆ log

python.TrigValSteering.Input.TrigValInput.log

Definition at line 27 of file Input.py.

◆ paths

python.TrigValSteering.Input.TrigValInput.paths

Definition at line 46 of file Input.py.

◆ source

python.TrigValSteering.Input.TrigValInput.source

Definition at line 33 of file Input.py.


The documentation for this class was generated from the following file:
vtune_athena.format
format
Definition: vtune_athena.py:14
dumpHVPathFromNtuple.append
bool append
Definition: dumpHVPathFromNtuple.py:91
python.processes.powheg.ZZ.ZZ.__init__
def __init__(self, base_directory, **kwargs)
Constructor: all process options are set here.
Definition: ZZ.py:18
python.TrigValSteering.Common.get_logger
def get_logger()
Definition: Common.py:33
error
Definition: IImpactPoint3dEstimator.h:70