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