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 19 of file Input.py.

Constructor & Destructor Documentation

◆ __init__()

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

Definition at line 25 of file Input.py.

25  def __init__(self, keyword, source, format, paths):
26  self.log = get_logger()
27  self.keyword = keyword
28 
29  allowed_sources = ['data', 'mc']
30  if source not in allowed_sources:
31  self.log.error('source has to be one of %s', allowed_sources)
32  self.source = None
33  else:
34  self.source = source
35 
36  allowed_formats = ['BS', 'HITS', 'RDO', 'ESD', 'AOD']
37  if format not in allowed_formats:
38  self.log.error('format has to be one of %s', allowed_formats)
39  self.format = None
40  else:
41  self.format = format
42 
43  if not isinstance(paths, list):
44  self.log.error('paths have to be provided as a list')
45  self.paths = None
46  else:
47  self.paths = []
48  for path in paths:
49  # for files on EOS, use xrootd rather than fuse mount
50  if '/eos/' in path:
51  self.paths.append(f'root://eosatlas.cern.ch/{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 39 of file Input.py.

◆ keyword

python.TrigValSteering.Input.TrigValInput.keyword

Definition at line 27 of file Input.py.

◆ log

python.TrigValSteering.Input.TrigValInput.log

Definition at line 26 of file Input.py.

◆ paths

python.TrigValSteering.Input.TrigValInput.paths

Definition at line 45 of file Input.py.

◆ source

python.TrigValSteering.Input.TrigValInput.source

Definition at line 32 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