Add exception handler around loading of ITS/TPC clusters in on_new_event().
[u/mrichter/AliRoot.git] / EVE / alice-macros / NLT_trackcount_init.C
index 35b90c4..136d9bb 100644 (file)
@@ -50,11 +50,16 @@ void NLT_trackcount_init()
 
 void on_new_event()
 {
-  Reve::PointSet* itsc = its_clusters();
-  itsc->SetMarkerColor(5);
+  try {
+    Reve::PointSet* itsc = its_clusters();
+    itsc->SetMarkerColor(5);
 
-  Reve::PointSet* tpcc = tpc_clusters();
-  tpcc->SetMarkerColor(4);
+    Reve::PointSet* tpcc = tpc_clusters();
+    tpcc->SetMarkerColor(4);
+  }
+  catch(Reve::Exc_t& exc) {
+    printf("Exception loading ITS/TPC clusters: %s\n", exc.Data());
+  }
 
   primary_vertex(1, 1);