Callable object making a SAM query out of a `SampleInfo` object.
Definition at line 106 of file manageDataRunDefinitions.py.
def manageDataRunDefinitions.DimensionQueryMaker.__call__ |
( |
|
self, |
|
|
|
info |
|
) |
| |
Definition at line 110 of file manageDataRunDefinitions.py.
111 info:
"SampleInfo object with all the information for the query",
112 minimum:
"throws an exception if fewer than these elements are included" = 0,
113 ) ->
"a SAM dimensions query string":
116 DimensionQueryMaker.simpleItem(
'run_number', info.run),
117 DimensionQueryMaker.multiItem(StageDimensions, info.stage,
'stage'),
118 DimensionQueryMaker.simpleItem(
'data_stream', info.stream),
119 DimensionQueryMaker.simpleItem(
'icarus_project.version', info.projectVersion),
122 if len(dims) < minimum:
123 raise RuntimeError(f
"Query resulted in only {len(dims)} constraints: '{query}'")
return query
S join(S const &sep, Coll const &s)
Returns a concatenation of strings in s separated by sep.