Skip to content
Snippets Groups Projects

Pappas add FTHits dumper algorithm in the list

Merged Andreas Pappas requested to merge pappas_add_FTHits_dumper_algo into master
Files
2
@@ -102,6 +102,18 @@ def hitsCheck(data_name, data):
posAttributeCheck(it, data_name)
def fibersCheck(data_name, data):
# check that hits is a list of objects containing proper attributes
if not isinstance(data, list):
raise PhoenixFormatError(
"Expected FTHits to be a list. Not the case for %s" % data_name)
for item in data:
if "x0" not in item or "y" not in item or "z0" not in item or "dxDy" not in item:
raise PhoenixFormatError(
"Expected FTHits to have x0, y0, y and dxDy as attributes. Not the case for %s"
% data_name)
def clustersCheck(data_name, data):
return
@@ -123,6 +135,7 @@ KnownDataTypes = {
'Tracks': tracksCheck,
'Clusters': clustersCheck,
'Jets': jetsCheck,
'Fibers': fibersCheck,
'Hits': hitsCheck,
'Vertices': verticesCheck,
'PlanarCaloCells': planarCaloCheck,
Loading