protect against wrong instantiation of trending manager
authorabercuci <abercuci@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 16 Aug 2012 06:12:56 +0000 (06:12 +0000)
committerabercuci <abercuci@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 16 Aug 2012 06:12:56 +0000 (06:12 +0000)
PWGPP/TRD/AliTRDrecoTask.cxx

index 756a38d..ee4b781 100644 (file)
@@ -267,6 +267,10 @@ Bool_t AliTRDrecoTask::PutTrendValue(const Char_t *name, Double_t val, Double_t
 // Generic publisher for trend values\r
 \r
   AliTRDtrendingManager *tm = AliTRDtrendingManager::Instance();\r
+  if(!tm){\r
+    AliError("Wrong usage of the trending functionality. Could not instantiate AliTRDtrendingManager singleton.");\r
+    return kFALSE;\r
+  }\r
   tm->AddValue(Form("%s_%s", GetName(), name), val, err);\r
   return kTRUE;\r
 }\r