]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - HLT/PHOS/AliHLTPHOSBase.cxx
update of data handling classes for SSD calibration
[u/mrichter/AliRoot.git] / HLT / PHOS / AliHLTPHOSBase.cxx
index 07eb3db3460d0a56fee89968833d5faf217f57c2..b1398efedbfe69b229b796761334735a1edc8183 100644 (file)
  * about the suitability of this software for any purpose. It is          *
  * provided "as is" without express or implied warranty.                  *
  **************************************************************************/
+
 #include "AliHLTPHOSBase.h"
+#include "AliHLTPHOSConfig.h"
+#include "AliHLTPHOSAltroConfig.h"
+
 
-AliHLTPHOSBase::AliHLTPHOSBase()
+AliHLTPHOSBase::AliHLTPHOSBase(): AliHLTPHOSConfig(),  
+                                 AliHLTPHOSAltroConfig()
 {
 
 }
 
+
 AliHLTPHOSBase::~AliHLTPHOSBase()
 {
 
 }
 
+
+bool
+AliHLTPHOSBase::CheckFile(const char *fileName, const char *opt) const
+{
+  //returns true if the file specified by "fileName exists  and has acceees rights specified  by "opt", 
+  //returns false if it doesnt exist, or it exists, but doesnt have the access right specified by "opt"
+
+  FILE *fp = fopen(fileName, opt);
+
+  if(fp == 0)
+    {
+      cout <<"Error: from" << typeid(*this).name()  <<"could not open file: "<< fileName <<endl; 
+      return false;
+     }
+  else
+    {
+      fclose(fp); 
+      return true;
+    }
+}