ROOT logo
///////////////////////////////////////////////
//  Author: Henrik Tydesjo                   //
//  Preprocessor Class for the SPD           //
//                                           //
///////////////////////////////////////////////

#include "AliITSPreprocessorSPD.h"
#include "AliITSCalibrationSPD.h"
#include "AliITSOnlineCalibrationSPDhandler.h"
#include "AliCDBEntry.h"
#include "AliCDBMetaData.h"
#include "AliShuttleInterface.h"
#include "AliLog.h"
#include <TTimeStamp.h>
#include <TObjString.h>
#include <TSystem.h>
#include <fstream>

/* $Id$ */

using std::ifstream;
ClassImp(AliITSPreprocessorSPD)

//______________________________________________________________________________________________
AliITSPreprocessorSPD::AliITSPreprocessorSPD(AliShuttleInterface* shuttle) :
  AliPreprocessor("SPD", shuttle), fIdList()
{
  // constructor
  AddRunType("DAQ_MIN_TH_SCAN");
  AddRunType("DAQ_MEAN_TH_SCAN");
  AddRunType("DAQ_GEN_DAC_SCAN");
  AddRunType("DAQ_UNIFORMITY_SCAN");
  AddRunType("DAQ_NOISY_PIX_SCAN");
  AddRunType("DAQ_PIX_DELAY_SCAN");
  AddRunType("DAQ_FO_UNIF_SCAN");
  AddRunType("PHYSICS");

  fIdList.SetOwner(kTRUE);
}

//______________________________________________________________________________________________
AliITSPreprocessorSPD::~AliITSPreprocessorSPD()
{
  // destructor
}

//______________________________________________________________________________________________
void AliITSPreprocessorSPD::Initialize(Int_t run, UInt_t startTime,
	UInt_t endTime)
{
  // initialize
  AliPreprocessor::Initialize(run, startTime, endTime);

  AliInfo(Form("\n\tRun %d \n\tStartTime %s \n\tEndTime %s", run,
	       TTimeStamp(startTime).AsString(),
	       TTimeStamp(endTime).AsString()));
}

//______________________________________________________________________________________________
UInt_t AliITSPreprocessorSPD::Process(TMap* /*dcsAliasMap*/)
{
  // Do the actual preprocessing


  // *** GET RUN TYPE ***

  TString runType = GetRunType();


  fIdList.Clear();


  // ******************************************************************************************** //
  // *** GET THE FILE IDs FOR DEBUGGING *** //
  if (runType == "DAQ_MIN_TH_SCAN" || 
      runType == "DAQ_MEAN_TH_SCAN" || 
      runType == "DAQ_GEN_DAC_SCAN" || 
      runType == "DAQ_UNIFORMITY_SCAN" || 
      runType == "DAQ_NOISY_PIX_SCAN" || 
      runType == "DAQ_PIX_DELAY_SCAN" || 
      runType == "DAQ_FO_UNIF_SCAN" || 
      runType == "PHYSICS") {
    TString idListId = "SPD_id_list";
    TList* list = GetFileSources(kDAQ,idListId.Data());
    UInt_t nrIdFiles = 0;
    if (list) {
      TListIter *iter = new TListIter(list);
      while (TObjString* fileNameEntry = (TObjString*) iter->Next()) {
	TString fileName = GetFile(kDAQ, idListId.Data(), fileNameEntry->GetString().Data());
	if (fileName.IsNull()) {
	  Log(Form("GetFile failed to retrieve file %s.",fileNameEntry->GetString().Data()));
	  return 1;
	}
	nrIdFiles++;
	ifstream idFile;
	idFile.open(fileName.Data(), ifstream::in);
	if (idFile.fail()) {
	  Log(Form("Could not open file (%s) for reading.",fileName.Data()));
	  return 1;
	}
	else {
	  while(1) {
	    Char_t id[50];
	    idFile >> id;
	    if (idFile.eof()) break;
	    // Add id to the list;
	    fIdList.AddLast(new TObjString(id));
	  }
	}
	idFile.close();
      }
      delete iter;
    }
    if (nrIdFiles==0) {
      Log("Failed to retrieve any id list file.");
      return 1;
    }
  }


  // ******************************************************************************************** //
  // *** REFERENCE DATA *** //

  // SCAN runs:
  if (runType == "DAQ_MIN_TH_SCAN" ||
      runType == "DAQ_MEAN_TH_SCAN" ||
      runType == "DAQ_GEN_DAC_SCAN" || 
      runType == "DAQ_UNIFORMITY_SCAN" ||
      runType == "DAQ_NOISY_PIX_SCAN" ||
      runType == "DAQ_PIX_DELAY_SCAN") {
    // Store scan container files for all equipments used - as reference data
    // ids from FXS follow ("SPD_ref_scan_%d",eq), while Alien follow ("SPD_ref_scan_eq_%d",eq)
    // the first part of the id is passed as argument here:
    if (!StoreRefForIdStartingWith("SPD_ref_scan")) return 1;
  }

  // FO runs:
  else if (runType == "DAQ_FO_UNIF_SCAN") {
    // Store fo container files for all equipments used - as reference data
    // ids from FXS follow ("SPD_ref_fo_%d",eq), while Alien follow ("SPD_ref_fo_eq_%d",eq)
    // the first part of the id is passed as argument here:
    if (!StoreRefForIdStartingWith("SPD_ref_fo")) return 1;
  }

  // Physics runs (online monitoring):
  else if (runType == "PHYSICS") {
    // Store the phys "per run" container files - as reference data
    if (!StoreRefFromTarForId("SPD_ref_phys")) return 1;
    // Store the phys "dead" container files - as reference data
    if (!StoreRefFromTarForId("SPD_ref_phys_dead")) return 1;
  }



  // ******************************************************************************************** //
  // *** NOISY AND DEAD DATA *** //

  // Standalone runs:
  if (runType == "DAQ_NOISY_PIX_SCAN") {
    // Retrieve and unpack tared calibration files from FXS
    TString id = "SPD_scan_noisy";
    TList* list = GetFileSources(kDAQ,id.Data());
    if (list) {
      UInt_t index = 0;
      while (list->At(index)!=NULL) {
	TObjString* fileNameEntry = (TObjString*) list->At(index);
	TString fileName = GetFile(kDAQ, id.Data(), fileNameEntry->GetString().Data());
	if (fileName.IsNull()) {
	  Log(Form("GetFile failed to retrieve file %s.",fileNameEntry->GetString().Data()));
	  return 1;
	}
	if (!RemoveIdFromList("SPD_scan_noisy")) {
	  Log(Form("Warning: Retrieved file with id %s, that was not in the id list!",id.Data()));
	}
	TString command = Form("tar -xf %s",fileName.Data());
	gSystem->Exec(command.Data());
	index++;
      }
    }
    // Create new database entries
    TObjArray* spdEntryNoisy = new TObjArray(240);
    spdEntryNoisy->SetOwner(kTRUE);
    for(UInt_t module=0; module<240; module++){
      AliITSCalibrationSPD* calObj = new AliITSCalibrationSPD();
      spdEntryNoisy->Add(calObj);
    }
    // Add noisy from the copied FXS files
    AliITSOnlineCalibrationSPDhandler* handler = new AliITSOnlineCalibrationSPDhandler();
    TString fileLoc = ".";
    handler->SetFileLocation(fileLoc.Data());
    handler->ReadNoisyFromFiles();
    for (Int_t module=0; module<240; module++) {
      ((AliITSCalibrationSPD*) spdEntryNoisy->At(module)) -> SetNrBadSingle( handler->GetNrNoisySingle(module) );
      ((AliITSCalibrationSPD*) spdEntryNoisy->At(module)) -> SetBadList( handler->GetNoisyArray(module) );
    }
    delete handler;
    // Store the new calibration objects in OCDB
    Log("Noisy lists (scan) will be stored...");
    AliCDBMetaData metaData;
    metaData.SetBeamPeriod(0);
    metaData.SetResponsible("Henrik Tydesjo");
    metaData.SetComment("Created by SPD PreProcessor");
    // validity for this run until infinity
    if (!Store("Calib", "SPDNoisy", spdEntryNoisy, &metaData, 0, kTRUE)) {
      Log("Failed to store calibration data.");
      return 1;
    }
    Log("Database updated.");
    delete spdEntryNoisy;
  }

  // Physics runs (online monitoring):
  else if (runType == "PHYSICS") {

    // Noisy pixels:
    // Read noisy from previous calibration
    AliCDBEntry* cdbEntry = GetFromOCDB("Calib", "SPDNoisy");
    TObjArray* spdEntryNoisy;
    if(cdbEntry) {
      spdEntryNoisy = (TObjArray*)cdbEntry->GetObject();
      if(!spdEntryNoisy) return 1;
    }
    else {
      Log("Old calibration not found in database. This is required for further processing.");
      return 1;
    }
    AliITSOnlineCalibrationSPDhandler* handOld = new AliITSOnlineCalibrationSPDhandler();
    handOld->ReadNoisyFromCalibObj(spdEntryNoisy);
    // Retrieve and unpack tared calibration files from FXS
    TString idN = "SPD_phys_noisy";
    TList* listN = GetFileSources(kDAQ,idN.Data());
    if (listN) {
      UInt_t index = 0;
      while (listN->At(index)!=NULL) {
	TObjString* fileNameEntry = (TObjString*) listN->At(index);
	TString fileName = GetFile(kDAQ, idN.Data(), fileNameEntry->GetString().Data());
	if (fileName.IsNull()) {
	  Log(Form("GetFile failed to retrieve file %s.",fileNameEntry->GetString().Data()));
	  return 1;
	}
	if (!RemoveIdFromList(idN.Data())) {
	  Log(Form("Warning: Retrieved file with id %s, that was not in the id list!",idN.Data()));
	}
	TString command = Form("tar -xf %s",fileName.Data());
	gSystem->Exec(command.Data());
	index++;
      }
    }
    AliITSOnlineCalibrationSPDhandler* handNew = new AliITSOnlineCalibrationSPDhandler();
    handNew->SetFileLocation(".");
    handNew->ReadNoisyFromFiles();
    // add the new list to the old one
    UInt_t nrNewNoisy = handOld->AddNoisyFrom(handNew);
    // If new noisy pixels were found: Update calibration objects
    if (nrNewNoisy>0) {
      for (Int_t module=0; module<240; module++) {
	((AliITSCalibrationSPD*) spdEntryNoisy->At(module)) -> SetNrBadSingle( handOld->GetNrNoisySingle(module) );
	((AliITSCalibrationSPD*) spdEntryNoisy->At(module)) -> SetBadList( handOld->GetNoisyArray(module) );
      }
      // Store the new calibration objects in OCDB
      Log("Noisy lists (phys) will be stored...");
      AliCDBMetaData metaData;
      metaData.SetBeamPeriod(0);
      metaData.SetResponsible("Henrik Tydesjo");
      metaData.SetComment("Created by SPD PreProcessor");  
      // validity for this run only
      if (!Store("Calib", "SPDNoisy", spdEntryNoisy, &metaData, 0, kFALSE)) {
	Log("Failed to store calibration data.");
	return 1;
      }
      Log("Database updated.");
    }
    delete handNew;

    // Dead pixels:
    // Retrieve and unpack tared calibration files from FXS
    TString idD = "SPD_phys_dead";
    TList* listD = GetFileSources(kDAQ,idD.Data());
    UInt_t nrPhysDeadFiles = 0;
    if (listD) {
      UInt_t index = 0;
      while (listD->At(index)!=NULL) {
	TObjString* fileNameEntry = (TObjString*) listD->At(index);
	TString fileName = GetFile(kDAQ, idD.Data(), fileNameEntry->GetString().Data());
	if (fileName.IsNull()) {
	  Log(Form("GetFile failed to retrieve file %s.",fileNameEntry->GetString().Data()));
	  return 1;
	}
	nrPhysDeadFiles++;
	if (!RemoveIdFromList("SPD_phys_dead")) {
	  Log(Form("Warning: Retrieved file with id %s, that was not in the id list!",idD.Data()));
	}
	TString command = Form("tar -xf %s",fileName.Data());
	gSystem->Exec(command.Data());
	index++;
      }
    }
    if (nrPhysDeadFiles==0) {
      Log(Form("Could not find files with id %s. Should be present for each run.",idD.Data()));
      return 1;
    }
    // Create new database entries
    TObjArray* spdEntryDead = new TObjArray(240);
    spdEntryDead->SetOwner(kTRUE);
    for(UInt_t module=0; module<240; module++){
      AliITSCalibrationSPD* calObj = new AliITSCalibrationSPD();
      spdEntryDead->Add(calObj);
    }
    // Add dead from the copied FXS files
    handOld->SetFileLocation(".");
    handOld->ReadSilentFromFiles();
    for (UInt_t module=0; module<240; module++) {
      AliITSCalibrationSPD* calibSPD = (AliITSCalibrationSPD*) spdEntryDead->At(module);
      calibSPD->SetNrBadSingle( handOld->GetNrDeadSingle(module) );
      calibSPD->SetBadList( handOld->GetDeadArray(module) );
      for (UInt_t chipIndex=0; chipIndex<5; chipIndex++) {
	UInt_t eq,hs,chip,col,row;
	AliITSRawStreamSPD::OfflineToOnline(module, chipIndex*32, 0, eq, hs, chip, col, row);
	if (handOld->IsSilentChip(eq,hs,chip)) {
	  calibSPD->SetChipBad(chipIndex);
	}
	else {
	  calibSPD->UnSetChipBad(chipIndex);
	}
      }
    }
    delete handOld;
    // Store the new calibration objects in OCDB
    Log("Dead lists (phys) will be stored...");
    AliCDBMetaData metaData;
    metaData.SetBeamPeriod(0);
    metaData.SetResponsible("Henrik Tydesjo");
    metaData.SetComment("Created by SPD PreProcessor");
    // validity for this run only
    if (!Store("Calib", "SPDDead", spdEntryDead, &metaData, 0, kFALSE)) {
      Log("Failed to store calibration data.");
      return 1;
    }
    Log("Database updated.");
    delete spdEntryDead;

  }



  // ******************************************************************************************** //
  // check that there are no ids left in the list:
  if (fIdList.First()!=NULL) {
    TString logMessage = "";
    TListIter *iter = new TListIter(&fIdList);
    while (TObjString *st = (TObjString*)iter->Next()) {
      logMessage.Append(st->GetString());
      logMessage.Append(" ");
    }
    delete iter;
    Log(Form("Files with the following ids were never retrieved: %s.",logMessage.Data()));
    return 1;
  }
  fIdList.Clear();


  return 0; // 0 means success

}
//_________________________________________________________________________________________
Bool_t AliITSPreprocessorSPD::RemoveIdFromList(const Char_t *id) {
  // removes id from the list of ids
  Bool_t found = kFALSE;
  TListIter *iter = new TListIter(&fIdList);
  while (TObjString *st = (TObjString*)iter->Next()) {
    if (st->GetString().CompareTo(id)==0) {
      fIdList.Remove(st);
      found = kTRUE;
      break;
    }
  }
  delete iter;
  return found;
}
//_________________________________________________________________________________________
Bool_t AliITSPreprocessorSPD::StoreRefForIdStartingWith(const Char_t *idStart) {
  // Store the standalone container files as reference data (0 or 1 file for each equipment)
  // idStart is the first part of the id string (which also should contain the actual eq)
  for (UInt_t eq=0; eq<20; eq++) {
    TString id = Form("%s_%d",idStart,eq);
    TList* list = GetFileSources(kDAQ,id.Data()); // (the id should be unique, so always 1 file)
    if (list) {
      TObjString* fileNameEntry = (TObjString*) list->First();
      if (fileNameEntry!=NULL) {
	TString fileName = GetFile(kDAQ, id, fileNameEntry->GetString().Data());
	if (fileName.IsNull()) {
	    Log(Form("GetFile failed to retrieve file %s.",fileNameEntry->GetString().Data()));
	    return kFALSE;
	}
	if (!RemoveIdFromList(id.Data())) {
	  Log(Form("Warning: Retrieved file with id %s, that was not in the id list!",id.Data()));
	}
	TString refCAT = Form("%s_eq_%d",idStart,eq);
	if (!StoreReferenceFile(fileName.Data(),refCAT.Data())) {
	  Log(Form("Failed to store reference file %s.",fileName.Data()));
	  return kFALSE;
	}
      }
    }
  }
  return kTRUE;
}
//_________________________________________________________________________________________
Bool_t AliITSPreprocessorSPD::StoreRefFromTarForId(const Char_t *id) {
  // store reference files from tar file for the id given (this is just to not duplicate code)
  TList* list = GetFileSources(kDAQ,id);
  if (list) {
    UInt_t index = 0;
    while (list->At(index)!=NULL) {
      TObjString* fileNameEntry = (TObjString*) list->At(index);
      TString fileName = GetFile(kDAQ, id, fileNameEntry->GetString().Data());
      if (fileName.IsNull()) {
	Log(Form("GetFile failed to retrieve file %s.",fileNameEntry->GetString().Data()));
	return kFALSE;
      }
      if (!RemoveIdFromList(id)) {
	Log(Form("Warning: Retrieved file with id %s, that was not in the id list!",id));
      }
      // get the file names from the tar file
      //      TString pwd = gSystem->pwd();
      //      TString tempFileName = Form("%s/tempTar.txt",pwd.Data());
      TString tempFileName = "tempTar.txt";
      TString command = Form("tar -tf %s > %s",fileName.Data(),tempFileName.Data());
      gSystem->Exec(command.Data());
      TList fList;
      ifstream tempFile;
      tempFile.open(tempFileName.Data(), ifstream::in);
      if (tempFile.fail()) {
	Log(Form("Could not open file (%s) for reading.",tempFileName.Data()));
	return kFALSE;
      }
      else {
	while(1) {
	  Char_t fileN[100];
	  tempFile >> fileN;
	  if (tempFile.eof()) break;
	  fList.AddLast(new TObjString(fileN));
	}
      }
      // close and remove temp file
      tempFile.close();
      command = Form("rm -f %s",tempFileName.Data());
      gSystem->Exec(command.Data());
      // unpack
      command = Form("tar -xf %s",fileName.Data());
      gSystem->Exec(command.Data());
      // store each file
      UInt_t index2 = 0;
      while (fList.At(index2)!=NULL) {
	TString eqFileName = ((TObjString*)fList.At(index2))->GetString();
	// get eq id
	TString eqStr = eqFileName.Data();
	UInt_t len = eqStr.Length();
	eqStr.Replace(0,len-7,"",0);
	eqStr.ReplaceAll("_",1,"",0);
	eqStr.ReplaceAll(".root",5,"",0);
	Int_t eqId = eqStr.Atoi();
	if (eqId>=0 && eqId<20) {
	  TString refCAT = Form("%s_eq_%d",id,eqId);
	  if (!StoreReferenceFile(eqFileName.Data(),refCAT.Data())) {
	    Log(Form("Failed to store reference file %s.",eqFileName.Data()));
	    return kFALSE;
	  }
	}
	else {
	  Log(Form("Eq ID %d out of bounds for file %s",eqId,eqFileName.Data()));
	  fList.Clear();
	  return kFALSE;
	}
	index2++;
      }
      fList.Clear();
      index++;
    }
  }
  return kTRUE;
}
 AliITSPreprocessorSPD.cxx:1
 AliITSPreprocessorSPD.cxx:2
 AliITSPreprocessorSPD.cxx:3
 AliITSPreprocessorSPD.cxx:4
 AliITSPreprocessorSPD.cxx:5
 AliITSPreprocessorSPD.cxx:6
 AliITSPreprocessorSPD.cxx:7
 AliITSPreprocessorSPD.cxx:8
 AliITSPreprocessorSPD.cxx:9
 AliITSPreprocessorSPD.cxx:10
 AliITSPreprocessorSPD.cxx:11
 AliITSPreprocessorSPD.cxx:12
 AliITSPreprocessorSPD.cxx:13
 AliITSPreprocessorSPD.cxx:14
 AliITSPreprocessorSPD.cxx:15
 AliITSPreprocessorSPD.cxx:16
 AliITSPreprocessorSPD.cxx:17
 AliITSPreprocessorSPD.cxx:18
 AliITSPreprocessorSPD.cxx:19
 AliITSPreprocessorSPD.cxx:20
 AliITSPreprocessorSPD.cxx:21
 AliITSPreprocessorSPD.cxx:22
 AliITSPreprocessorSPD.cxx:23
 AliITSPreprocessorSPD.cxx:24
 AliITSPreprocessorSPD.cxx:25
 AliITSPreprocessorSPD.cxx:26
 AliITSPreprocessorSPD.cxx:27
 AliITSPreprocessorSPD.cxx:28
 AliITSPreprocessorSPD.cxx:29
 AliITSPreprocessorSPD.cxx:30
 AliITSPreprocessorSPD.cxx:31
 AliITSPreprocessorSPD.cxx:32
 AliITSPreprocessorSPD.cxx:33
 AliITSPreprocessorSPD.cxx:34
 AliITSPreprocessorSPD.cxx:35
 AliITSPreprocessorSPD.cxx:36
 AliITSPreprocessorSPD.cxx:37
 AliITSPreprocessorSPD.cxx:38
 AliITSPreprocessorSPD.cxx:39
 AliITSPreprocessorSPD.cxx:40
 AliITSPreprocessorSPD.cxx:41
 AliITSPreprocessorSPD.cxx:42
 AliITSPreprocessorSPD.cxx:43
 AliITSPreprocessorSPD.cxx:44
 AliITSPreprocessorSPD.cxx:45
 AliITSPreprocessorSPD.cxx:46
 AliITSPreprocessorSPD.cxx:47
 AliITSPreprocessorSPD.cxx:48
 AliITSPreprocessorSPD.cxx:49
 AliITSPreprocessorSPD.cxx:50
 AliITSPreprocessorSPD.cxx:51
 AliITSPreprocessorSPD.cxx:52
 AliITSPreprocessorSPD.cxx:53
 AliITSPreprocessorSPD.cxx:54
 AliITSPreprocessorSPD.cxx:55
 AliITSPreprocessorSPD.cxx:56
 AliITSPreprocessorSPD.cxx:57
 AliITSPreprocessorSPD.cxx:58
 AliITSPreprocessorSPD.cxx:59
 AliITSPreprocessorSPD.cxx:60
 AliITSPreprocessorSPD.cxx:61
 AliITSPreprocessorSPD.cxx:62
 AliITSPreprocessorSPD.cxx:63
 AliITSPreprocessorSPD.cxx:64
 AliITSPreprocessorSPD.cxx:65
 AliITSPreprocessorSPD.cxx:66
 AliITSPreprocessorSPD.cxx:67
 AliITSPreprocessorSPD.cxx:68
 AliITSPreprocessorSPD.cxx:69
 AliITSPreprocessorSPD.cxx:70
 AliITSPreprocessorSPD.cxx:71
 AliITSPreprocessorSPD.cxx:72
 AliITSPreprocessorSPD.cxx:73
 AliITSPreprocessorSPD.cxx:74
 AliITSPreprocessorSPD.cxx:75
 AliITSPreprocessorSPD.cxx:76
 AliITSPreprocessorSPD.cxx:77
 AliITSPreprocessorSPD.cxx:78
 AliITSPreprocessorSPD.cxx:79
 AliITSPreprocessorSPD.cxx:80
 AliITSPreprocessorSPD.cxx:81
 AliITSPreprocessorSPD.cxx:82
 AliITSPreprocessorSPD.cxx:83
 AliITSPreprocessorSPD.cxx:84
 AliITSPreprocessorSPD.cxx:85
 AliITSPreprocessorSPD.cxx:86
 AliITSPreprocessorSPD.cxx:87
 AliITSPreprocessorSPD.cxx:88
 AliITSPreprocessorSPD.cxx:89
 AliITSPreprocessorSPD.cxx:90
 AliITSPreprocessorSPD.cxx:91
 AliITSPreprocessorSPD.cxx:92
 AliITSPreprocessorSPD.cxx:93
 AliITSPreprocessorSPD.cxx:94
 AliITSPreprocessorSPD.cxx:95
 AliITSPreprocessorSPD.cxx:96
 AliITSPreprocessorSPD.cxx:97
 AliITSPreprocessorSPD.cxx:98
 AliITSPreprocessorSPD.cxx:99
 AliITSPreprocessorSPD.cxx:100
 AliITSPreprocessorSPD.cxx:101
 AliITSPreprocessorSPD.cxx:102
 AliITSPreprocessorSPD.cxx:103
 AliITSPreprocessorSPD.cxx:104
 AliITSPreprocessorSPD.cxx:105
 AliITSPreprocessorSPD.cxx:106
 AliITSPreprocessorSPD.cxx:107
 AliITSPreprocessorSPD.cxx:108
 AliITSPreprocessorSPD.cxx:109
 AliITSPreprocessorSPD.cxx:110
 AliITSPreprocessorSPD.cxx:111
 AliITSPreprocessorSPD.cxx:112
 AliITSPreprocessorSPD.cxx:113
 AliITSPreprocessorSPD.cxx:114
 AliITSPreprocessorSPD.cxx:115
 AliITSPreprocessorSPD.cxx:116
 AliITSPreprocessorSPD.cxx:117
 AliITSPreprocessorSPD.cxx:118
 AliITSPreprocessorSPD.cxx:119
 AliITSPreprocessorSPD.cxx:120
 AliITSPreprocessorSPD.cxx:121
 AliITSPreprocessorSPD.cxx:122
 AliITSPreprocessorSPD.cxx:123
 AliITSPreprocessorSPD.cxx:124
 AliITSPreprocessorSPD.cxx:125
 AliITSPreprocessorSPD.cxx:126
 AliITSPreprocessorSPD.cxx:127
 AliITSPreprocessorSPD.cxx:128
 AliITSPreprocessorSPD.cxx:129
 AliITSPreprocessorSPD.cxx:130
 AliITSPreprocessorSPD.cxx:131
 AliITSPreprocessorSPD.cxx:132
 AliITSPreprocessorSPD.cxx:133
 AliITSPreprocessorSPD.cxx:134
 AliITSPreprocessorSPD.cxx:135
 AliITSPreprocessorSPD.cxx:136
 AliITSPreprocessorSPD.cxx:137
 AliITSPreprocessorSPD.cxx:138
 AliITSPreprocessorSPD.cxx:139
 AliITSPreprocessorSPD.cxx:140
 AliITSPreprocessorSPD.cxx:141
 AliITSPreprocessorSPD.cxx:142
 AliITSPreprocessorSPD.cxx:143
 AliITSPreprocessorSPD.cxx:144
 AliITSPreprocessorSPD.cxx:145
 AliITSPreprocessorSPD.cxx:146
 AliITSPreprocessorSPD.cxx:147
 AliITSPreprocessorSPD.cxx:148
 AliITSPreprocessorSPD.cxx:149
 AliITSPreprocessorSPD.cxx:150
 AliITSPreprocessorSPD.cxx:151
 AliITSPreprocessorSPD.cxx:152
 AliITSPreprocessorSPD.cxx:153
 AliITSPreprocessorSPD.cxx:154
 AliITSPreprocessorSPD.cxx:155
 AliITSPreprocessorSPD.cxx:156
 AliITSPreprocessorSPD.cxx:157
 AliITSPreprocessorSPD.cxx:158
 AliITSPreprocessorSPD.cxx:159
 AliITSPreprocessorSPD.cxx:160
 AliITSPreprocessorSPD.cxx:161
 AliITSPreprocessorSPD.cxx:162
 AliITSPreprocessorSPD.cxx:163
 AliITSPreprocessorSPD.cxx:164
 AliITSPreprocessorSPD.cxx:165
 AliITSPreprocessorSPD.cxx:166
 AliITSPreprocessorSPD.cxx:167
 AliITSPreprocessorSPD.cxx:168
 AliITSPreprocessorSPD.cxx:169
 AliITSPreprocessorSPD.cxx:170
 AliITSPreprocessorSPD.cxx:171
 AliITSPreprocessorSPD.cxx:172
 AliITSPreprocessorSPD.cxx:173
 AliITSPreprocessorSPD.cxx:174
 AliITSPreprocessorSPD.cxx:175
 AliITSPreprocessorSPD.cxx:176
 AliITSPreprocessorSPD.cxx:177
 AliITSPreprocessorSPD.cxx:178
 AliITSPreprocessorSPD.cxx:179
 AliITSPreprocessorSPD.cxx:180
 AliITSPreprocessorSPD.cxx:181
 AliITSPreprocessorSPD.cxx:182
 AliITSPreprocessorSPD.cxx:183
 AliITSPreprocessorSPD.cxx:184
 AliITSPreprocessorSPD.cxx:185
 AliITSPreprocessorSPD.cxx:186
 AliITSPreprocessorSPD.cxx:187
 AliITSPreprocessorSPD.cxx:188
 AliITSPreprocessorSPD.cxx:189
 AliITSPreprocessorSPD.cxx:190
 AliITSPreprocessorSPD.cxx:191
 AliITSPreprocessorSPD.cxx:192
 AliITSPreprocessorSPD.cxx:193
 AliITSPreprocessorSPD.cxx:194
 AliITSPreprocessorSPD.cxx:195
 AliITSPreprocessorSPD.cxx:196
 AliITSPreprocessorSPD.cxx:197
 AliITSPreprocessorSPD.cxx:198
 AliITSPreprocessorSPD.cxx:199
 AliITSPreprocessorSPD.cxx:200
 AliITSPreprocessorSPD.cxx:201
 AliITSPreprocessorSPD.cxx:202
 AliITSPreprocessorSPD.cxx:203
 AliITSPreprocessorSPD.cxx:204
 AliITSPreprocessorSPD.cxx:205
 AliITSPreprocessorSPD.cxx:206
 AliITSPreprocessorSPD.cxx:207
 AliITSPreprocessorSPD.cxx:208
 AliITSPreprocessorSPD.cxx:209
 AliITSPreprocessorSPD.cxx:210
 AliITSPreprocessorSPD.cxx:211
 AliITSPreprocessorSPD.cxx:212
 AliITSPreprocessorSPD.cxx:213
 AliITSPreprocessorSPD.cxx:214
 AliITSPreprocessorSPD.cxx:215
 AliITSPreprocessorSPD.cxx:216
 AliITSPreprocessorSPD.cxx:217
 AliITSPreprocessorSPD.cxx:218
 AliITSPreprocessorSPD.cxx:219
 AliITSPreprocessorSPD.cxx:220
 AliITSPreprocessorSPD.cxx:221
 AliITSPreprocessorSPD.cxx:222
 AliITSPreprocessorSPD.cxx:223
 AliITSPreprocessorSPD.cxx:224
 AliITSPreprocessorSPD.cxx:225
 AliITSPreprocessorSPD.cxx:226
 AliITSPreprocessorSPD.cxx:227
 AliITSPreprocessorSPD.cxx:228
 AliITSPreprocessorSPD.cxx:229
 AliITSPreprocessorSPD.cxx:230
 AliITSPreprocessorSPD.cxx:231
 AliITSPreprocessorSPD.cxx:232
 AliITSPreprocessorSPD.cxx:233
 AliITSPreprocessorSPD.cxx:234
 AliITSPreprocessorSPD.cxx:235
 AliITSPreprocessorSPD.cxx:236
 AliITSPreprocessorSPD.cxx:237
 AliITSPreprocessorSPD.cxx:238
 AliITSPreprocessorSPD.cxx:239
 AliITSPreprocessorSPD.cxx:240
 AliITSPreprocessorSPD.cxx:241
 AliITSPreprocessorSPD.cxx:242
 AliITSPreprocessorSPD.cxx:243
 AliITSPreprocessorSPD.cxx:244
 AliITSPreprocessorSPD.cxx:245
 AliITSPreprocessorSPD.cxx:246
 AliITSPreprocessorSPD.cxx:247
 AliITSPreprocessorSPD.cxx:248
 AliITSPreprocessorSPD.cxx:249
 AliITSPreprocessorSPD.cxx:250
 AliITSPreprocessorSPD.cxx:251
 AliITSPreprocessorSPD.cxx:252
 AliITSPreprocessorSPD.cxx:253
 AliITSPreprocessorSPD.cxx:254
 AliITSPreprocessorSPD.cxx:255
 AliITSPreprocessorSPD.cxx:256
 AliITSPreprocessorSPD.cxx:257
 AliITSPreprocessorSPD.cxx:258
 AliITSPreprocessorSPD.cxx:259
 AliITSPreprocessorSPD.cxx:260
 AliITSPreprocessorSPD.cxx:261
 AliITSPreprocessorSPD.cxx:262
 AliITSPreprocessorSPD.cxx:263
 AliITSPreprocessorSPD.cxx:264
 AliITSPreprocessorSPD.cxx:265
 AliITSPreprocessorSPD.cxx:266
 AliITSPreprocessorSPD.cxx:267
 AliITSPreprocessorSPD.cxx:268
 AliITSPreprocessorSPD.cxx:269
 AliITSPreprocessorSPD.cxx:270
 AliITSPreprocessorSPD.cxx:271
 AliITSPreprocessorSPD.cxx:272
 AliITSPreprocessorSPD.cxx:273
 AliITSPreprocessorSPD.cxx:274
 AliITSPreprocessorSPD.cxx:275
 AliITSPreprocessorSPD.cxx:276
 AliITSPreprocessorSPD.cxx:277
 AliITSPreprocessorSPD.cxx:278
 AliITSPreprocessorSPD.cxx:279
 AliITSPreprocessorSPD.cxx:280
 AliITSPreprocessorSPD.cxx:281
 AliITSPreprocessorSPD.cxx:282
 AliITSPreprocessorSPD.cxx:283
 AliITSPreprocessorSPD.cxx:284
 AliITSPreprocessorSPD.cxx:285
 AliITSPreprocessorSPD.cxx:286
 AliITSPreprocessorSPD.cxx:287
 AliITSPreprocessorSPD.cxx:288
 AliITSPreprocessorSPD.cxx:289
 AliITSPreprocessorSPD.cxx:290
 AliITSPreprocessorSPD.cxx:291
 AliITSPreprocessorSPD.cxx:292
 AliITSPreprocessorSPD.cxx:293
 AliITSPreprocessorSPD.cxx:294
 AliITSPreprocessorSPD.cxx:295
 AliITSPreprocessorSPD.cxx:296
 AliITSPreprocessorSPD.cxx:297
 AliITSPreprocessorSPD.cxx:298
 AliITSPreprocessorSPD.cxx:299
 AliITSPreprocessorSPD.cxx:300
 AliITSPreprocessorSPD.cxx:301
 AliITSPreprocessorSPD.cxx:302
 AliITSPreprocessorSPD.cxx:303
 AliITSPreprocessorSPD.cxx:304
 AliITSPreprocessorSPD.cxx:305
 AliITSPreprocessorSPD.cxx:306
 AliITSPreprocessorSPD.cxx:307
 AliITSPreprocessorSPD.cxx:308
 AliITSPreprocessorSPD.cxx:309
 AliITSPreprocessorSPD.cxx:310
 AliITSPreprocessorSPD.cxx:311
 AliITSPreprocessorSPD.cxx:312
 AliITSPreprocessorSPD.cxx:313
 AliITSPreprocessorSPD.cxx:314
 AliITSPreprocessorSPD.cxx:315
 AliITSPreprocessorSPD.cxx:316
 AliITSPreprocessorSPD.cxx:317
 AliITSPreprocessorSPD.cxx:318
 AliITSPreprocessorSPD.cxx:319
 AliITSPreprocessorSPD.cxx:320
 AliITSPreprocessorSPD.cxx:321
 AliITSPreprocessorSPD.cxx:322
 AliITSPreprocessorSPD.cxx:323
 AliITSPreprocessorSPD.cxx:324
 AliITSPreprocessorSPD.cxx:325
 AliITSPreprocessorSPD.cxx:326
 AliITSPreprocessorSPD.cxx:327
 AliITSPreprocessorSPD.cxx:328
 AliITSPreprocessorSPD.cxx:329
 AliITSPreprocessorSPD.cxx:330
 AliITSPreprocessorSPD.cxx:331
 AliITSPreprocessorSPD.cxx:332
 AliITSPreprocessorSPD.cxx:333
 AliITSPreprocessorSPD.cxx:334
 AliITSPreprocessorSPD.cxx:335
 AliITSPreprocessorSPD.cxx:336
 AliITSPreprocessorSPD.cxx:337
 AliITSPreprocessorSPD.cxx:338
 AliITSPreprocessorSPD.cxx:339
 AliITSPreprocessorSPD.cxx:340
 AliITSPreprocessorSPD.cxx:341
 AliITSPreprocessorSPD.cxx:342
 AliITSPreprocessorSPD.cxx:343
 AliITSPreprocessorSPD.cxx:344
 AliITSPreprocessorSPD.cxx:345
 AliITSPreprocessorSPD.cxx:346
 AliITSPreprocessorSPD.cxx:347
 AliITSPreprocessorSPD.cxx:348
 AliITSPreprocessorSPD.cxx:349
 AliITSPreprocessorSPD.cxx:350
 AliITSPreprocessorSPD.cxx:351
 AliITSPreprocessorSPD.cxx:352
 AliITSPreprocessorSPD.cxx:353
 AliITSPreprocessorSPD.cxx:354
 AliITSPreprocessorSPD.cxx:355
 AliITSPreprocessorSPD.cxx:356
 AliITSPreprocessorSPD.cxx:357
 AliITSPreprocessorSPD.cxx:358
 AliITSPreprocessorSPD.cxx:359
 AliITSPreprocessorSPD.cxx:360
 AliITSPreprocessorSPD.cxx:361
 AliITSPreprocessorSPD.cxx:362
 AliITSPreprocessorSPD.cxx:363
 AliITSPreprocessorSPD.cxx:364
 AliITSPreprocessorSPD.cxx:365
 AliITSPreprocessorSPD.cxx:366
 AliITSPreprocessorSPD.cxx:367
 AliITSPreprocessorSPD.cxx:368
 AliITSPreprocessorSPD.cxx:369
 AliITSPreprocessorSPD.cxx:370
 AliITSPreprocessorSPD.cxx:371
 AliITSPreprocessorSPD.cxx:372
 AliITSPreprocessorSPD.cxx:373
 AliITSPreprocessorSPD.cxx:374
 AliITSPreprocessorSPD.cxx:375
 AliITSPreprocessorSPD.cxx:376
 AliITSPreprocessorSPD.cxx:377
 AliITSPreprocessorSPD.cxx:378
 AliITSPreprocessorSPD.cxx:379
 AliITSPreprocessorSPD.cxx:380
 AliITSPreprocessorSPD.cxx:381
 AliITSPreprocessorSPD.cxx:382
 AliITSPreprocessorSPD.cxx:383
 AliITSPreprocessorSPD.cxx:384
 AliITSPreprocessorSPD.cxx:385
 AliITSPreprocessorSPD.cxx:386
 AliITSPreprocessorSPD.cxx:387
 AliITSPreprocessorSPD.cxx:388
 AliITSPreprocessorSPD.cxx:389
 AliITSPreprocessorSPD.cxx:390
 AliITSPreprocessorSPD.cxx:391
 AliITSPreprocessorSPD.cxx:392
 AliITSPreprocessorSPD.cxx:393
 AliITSPreprocessorSPD.cxx:394
 AliITSPreprocessorSPD.cxx:395
 AliITSPreprocessorSPD.cxx:396
 AliITSPreprocessorSPD.cxx:397
 AliITSPreprocessorSPD.cxx:398
 AliITSPreprocessorSPD.cxx:399
 AliITSPreprocessorSPD.cxx:400
 AliITSPreprocessorSPD.cxx:401
 AliITSPreprocessorSPD.cxx:402
 AliITSPreprocessorSPD.cxx:403
 AliITSPreprocessorSPD.cxx:404
 AliITSPreprocessorSPD.cxx:405
 AliITSPreprocessorSPD.cxx:406
 AliITSPreprocessorSPD.cxx:407
 AliITSPreprocessorSPD.cxx:408
 AliITSPreprocessorSPD.cxx:409
 AliITSPreprocessorSPD.cxx:410
 AliITSPreprocessorSPD.cxx:411
 AliITSPreprocessorSPD.cxx:412
 AliITSPreprocessorSPD.cxx:413
 AliITSPreprocessorSPD.cxx:414
 AliITSPreprocessorSPD.cxx:415
 AliITSPreprocessorSPD.cxx:416
 AliITSPreprocessorSPD.cxx:417
 AliITSPreprocessorSPD.cxx:418
 AliITSPreprocessorSPD.cxx:419
 AliITSPreprocessorSPD.cxx:420
 AliITSPreprocessorSPD.cxx:421
 AliITSPreprocessorSPD.cxx:422
 AliITSPreprocessorSPD.cxx:423
 AliITSPreprocessorSPD.cxx:424
 AliITSPreprocessorSPD.cxx:425
 AliITSPreprocessorSPD.cxx:426
 AliITSPreprocessorSPD.cxx:427
 AliITSPreprocessorSPD.cxx:428
 AliITSPreprocessorSPD.cxx:429
 AliITSPreprocessorSPD.cxx:430
 AliITSPreprocessorSPD.cxx:431
 AliITSPreprocessorSPD.cxx:432
 AliITSPreprocessorSPD.cxx:433
 AliITSPreprocessorSPD.cxx:434
 AliITSPreprocessorSPD.cxx:435
 AliITSPreprocessorSPD.cxx:436
 AliITSPreprocessorSPD.cxx:437
 AliITSPreprocessorSPD.cxx:438
 AliITSPreprocessorSPD.cxx:439
 AliITSPreprocessorSPD.cxx:440
 AliITSPreprocessorSPD.cxx:441
 AliITSPreprocessorSPD.cxx:442
 AliITSPreprocessorSPD.cxx:443
 AliITSPreprocessorSPD.cxx:444
 AliITSPreprocessorSPD.cxx:445
 AliITSPreprocessorSPD.cxx:446
 AliITSPreprocessorSPD.cxx:447
 AliITSPreprocessorSPD.cxx:448
 AliITSPreprocessorSPD.cxx:449
 AliITSPreprocessorSPD.cxx:450
 AliITSPreprocessorSPD.cxx:451
 AliITSPreprocessorSPD.cxx:452
 AliITSPreprocessorSPD.cxx:453
 AliITSPreprocessorSPD.cxx:454
 AliITSPreprocessorSPD.cxx:455
 AliITSPreprocessorSPD.cxx:456
 AliITSPreprocessorSPD.cxx:457
 AliITSPreprocessorSPD.cxx:458
 AliITSPreprocessorSPD.cxx:459
 AliITSPreprocessorSPD.cxx:460
 AliITSPreprocessorSPD.cxx:461
 AliITSPreprocessorSPD.cxx:462
 AliITSPreprocessorSPD.cxx:463
 AliITSPreprocessorSPD.cxx:464
 AliITSPreprocessorSPD.cxx:465
 AliITSPreprocessorSPD.cxx:466
 AliITSPreprocessorSPD.cxx:467
 AliITSPreprocessorSPD.cxx:468
 AliITSPreprocessorSPD.cxx:469
 AliITSPreprocessorSPD.cxx:470
 AliITSPreprocessorSPD.cxx:471
 AliITSPreprocessorSPD.cxx:472
 AliITSPreprocessorSPD.cxx:473
 AliITSPreprocessorSPD.cxx:474
 AliITSPreprocessorSPD.cxx:475
 AliITSPreprocessorSPD.cxx:476
 AliITSPreprocessorSPD.cxx:477
 AliITSPreprocessorSPD.cxx:478
 AliITSPreprocessorSPD.cxx:479
 AliITSPreprocessorSPD.cxx:480
 AliITSPreprocessorSPD.cxx:481
 AliITSPreprocessorSPD.cxx:482