ATLAS Offline Software
Loading...
Searching...
No Matches
python.TrigValSteering.Input.TrigValInput Class Reference
Inheritance diagram for python.TrigValSteering.Input.TrigValInput:
Collaboration diagram for python.TrigValSteering.Input.TrigValInput:

Public Types

typedef HLT::TypeInformation::for_each_type_c< typenameEDMLIST::map, my_functor, my_result<>, my_arg< HLT::TypeInformation::get_cont, CONTAINER > >::type result

Public Member Functions

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

Public Attributes

 log = get_logger()
 keyword = keyword
 source = None
 format = None
list paths = None

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.

Member Typedef Documentation

◆ result

Definition at line 90 of file EDM_MasterSearch.h.

Constructor & Destructor Documentation

◆ __init__()

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__()

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()

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 = None

Definition at line 39 of file Input.py.

◆ keyword

python.TrigValSteering.Input.TrigValInput.keyword = keyword

Definition at line 27 of file Input.py.

◆ log

python.TrigValSteering.Input.TrigValInput.log = get_logger()

Definition at line 26 of file Input.py.

◆ paths

python.TrigValSteering.Input.TrigValInput.paths = None

Definition at line 45 of file Input.py.

◆ source

python.TrigValSteering.Input.TrigValInput.source = None

Definition at line 32 of file Input.py.


The documentation for this class was generated from the following file: