]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Printing the warning about the "ESD mass" just once.
authorbelikov <belikov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 22 Mar 2011 16:28:15 +0000 (16:28 +0000)
committerbelikov <belikov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 22 Mar 2011 16:28:15 +0000 (16:28 +0000)
STEER/AliESDtrack.cxx

index c986a083bef1f3a0064467b4732d3f7d59fe12c2..dafb546d04adc799641e69ba32a09788e57d6217 100644 (file)
@@ -1169,8 +1169,12 @@ Double_t AliESDtrack::M() const
 {
   // Returns the assumed mass
   // (the pion mass, if the particle can't be identified properly).
-
-  AliWarning("This is the ESD mass. Use it with care !"); 
+  static Bool_t printerr=kTRUE;
+  if (printerr) {
+     AliWarning("WARNING !!! ... THIS WILL BE PRINTED JUST ONCE !!!");
+     printerr = kFALSE;
+     AliWarning("This is the ESD mass. Use it with care !"); 
+  }
   return GetMass(); 
 }