]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - HLT/CALO/AliHLTCaloProcessor.cxx
Fix for deleting array of AliMixInputHandlerInfo objects, causes crash at the end...
[u/mrichter/AliRoot.git] / HLT / CALO / AliHLTCaloProcessor.cxx
index c47c58a80497bbb9de28816daf2ffa3edec2e235..ab0660e948caee71ab78e6f477cf7e1aaddb9cba 100644 (file)
  **************************************************************************/
 
 #include "AliHLTCaloProcessor.h"
-#include "unistd.h"
-
-
 
 const AliHLTComponentDataType AliHLTCaloProcessor::fgkInputDataTypes[]={kAliHLTVoidDataType,{0,"",""}}; //'zero' terminated array
 
-
 AliHLTCaloProcessor::AliHLTCaloProcessor():AliHLTProcessor(), 
-                                          fCaloEventCount(0), 
-                                          fModuleID(2), 
-                                          fPrintInfoModule(0), 
-                                          fPrintInfoFrequncyModule(1000), 
-                                          fRunNumber(0)
+                                          fCaloEventCount(0)
 {
-  //  ScanRunNumberFromFile();
+  lineNumber[0] = '\0';
 }
 
 
-
 AliHLTCaloProcessor::~AliHLTCaloProcessor()
 {
 
 }
 
-bool 
-AliHLTCaloProcessor::CheckFileLog(const char *origin,   const char *filename,  const char *opt)
-{
-  sprintf(fFilepath, "%s/%s", getenv("PWD"), filename);
-  FILE *fp = fopen(filename, opt);
-
-  if(fp == 0)
-    {
-      //      if( (opt == "w")  || (opt == "a")) \\OD
-      if( (!strcmp(opt,"w"))  || (!strcmp(opt,"a")))
-       {
-         sprintf(fMessage, "for writing  please check that the directory exists and that you have write access to it"  );
-       }
-      else
-       {
-         sprintf(fMessage, "for reading  please check that the directory exists and that you have read access to it"  );
-       }
-     Logging(kHLTLogFatal, origin , "cannot open file" , "Was not able to open file %s  %s", fFilepath, fMessage);
-     return false;
-    }
-  else
-    {
-      //      if( (opt == "w")  || (opt == "a")) \\OD
-      if( (!strcmp(opt,"w"))  || (!strcmp(opt,"a")))
-       {
-         sprintf(fMessage, "for writing" );
-       }
-      else
-       {
-         sprintf(fMessage, "for reading");
-       }
-      //    Logging(kHLTLogInfo, origin , "opening file" , "Sucessfully opening %s  %s", fFilepath, fMessage);
-      fclose(fp); 
-      return true;
-    }
-  
-}
-
-void 
-AliHLTCaloProcessor::DoneWritingLog(const char */*origin*/, const char * /*filename*/)
-{
-  //  char filepath[1024];
-  //  sprintf(fFilepath, "%s/%s", getenv("PWD"), filename);
-  //  Logging(kHLTLogInfo, origin , "finnished writing file" , "wrote file %s", fFilepath);
-
-  //  Logging(kHLTLogInfo, igin , "Don't use this function" , "Don't use this function", fFilepath);  
-  
-}
-
-
-void 
-AliHLTCaloProcessor::ScanRunNumberFromFile()
-{
-  printf("AliHLTCaloProcessor::ScanRunNumberFromFile: don't use this function");
-}
 
 const char*
 AliHLTCaloProcessor::IntToChar(int number)
 {
-  sprintf(lineNumber,"%d", number);
+  // comment
+  snprintf(lineNumber, 256, "%d", number);
   return lineNumber;
 }
 
-
-
-int
-AliHLTCaloProcessor::ScanArgumentsModule(int argc, const char** argv)
-{
-  fPrintInfoModule = kFALSE;
-  int iResult=0;
-  TString argument="";
-
-  for(int i=0; i<argc && iResult>=0; i++) 
-    {
-      argument=argv[i];
-      
-      if (argument.IsNull()) 
-       {
-         continue;
-       }
-                         
-    if (argument.CompareTo("-printinfo") == 0) 
-      {
-       if(i+1 <= argc)
-         {
-           argument=argv[i+1];
-           fPrintInfoFrequncyModule = atoi(argv[i+1]);
-           fPrintInfoModule = kTRUE;
-         }
-       else
-         {
-           Logging(kHLTLogWarning, __FILE__ , "inconsistency during init" , "asking for event info, but no update frequency is specified, option is ignored");
-         }
-      }
-    }
-  return 0;
-}
-