]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Comments from input ASCII files are printed
authormfloris <michele.floris@cern.ch>
Tue, 1 Apr 2014 13:32:08 +0000 (15:32 +0200)
committermfloris <michele.floris@cern.ch>
Tue, 1 Apr 2014 13:32:08 +0000 (15:32 +0200)
AliParticleYield now prints the comments from the original ASCII file (lines prefixed by "#"). If the comment contains a "warn" substring, it is printed in a very visible way.

PWGLF/ThermalFits/AliParticleYield.cxx

index 993136dcac01248976fffbad3bc498508f17b5c4..0013b24337e990392e800aeb0c16bbaf824fbcf5 100644 (file)
@@ -188,13 +188,22 @@ TClonesArray * AliParticleYield::ReadFromASCIIFile(const char * fileName, const
   }
   TString line;
   Int_t ipart = 0;
+  std::cout << "Reading " << fileName << std::endl;
+  
   while (line.ReadLine(filestream) ) {
     // Strip trailing and leading whitespaces
     line = line.Strip(TString::kLeading,  ' ');
     line = line.Strip(TString::kTrailing, ' ');
 
     // Skip commented lines and headers
-    if (line.BeginsWith("#")) continue;
+    if (line.BeginsWith("#")) {
+      //print comments. It if they look like warnings, print them such that they are really visible
+      if(line.Contains("warn", TString::kIgnoreCase)) std::cout << std::endl << "********************************************************" <<std::endl ;
+      std::cout << " " << line.Data() << std::endl;      
+      if(line.Contains("warn", TString::kIgnoreCase)) std::cout << "********************************************************" <<std::endl << std::endl;
+
+      continue;
+    }
     if (line.BeginsWith("PDG")) continue;
 
     // Tokenize line using custom separator