]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - EMCAL/AliCaloRawAnalyzerPeakFinder.cxx
cosmetics
[u/mrichter/AliRoot.git] / EMCAL / AliCaloRawAnalyzerPeakFinder.cxx
index 19675ea5ea77479345e15baf6d8d1a001a29150c..0facb60dfc221f77dcbb8405d88230dbe61d25a2 100644 (file)
@@ -40,6 +40,7 @@
 using namespace std;
 
 
+
 ClassImp( AliCaloRawAnalyzerPeakFinder )
 
 
@@ -50,25 +51,11 @@ AliCaloRawAnalyzerPeakFinder::AliCaloRawAnalyzerPeakFinder() :AliCaloRawAnalyzer
 {
   //Comment
   fAlgo= Algo::kPeakFinder;
-  InitOCDB(fRunOnAlien);
   fPeakFinderVectors = new AliCaloPeakFinderVectors() ;
   ResetVectors();
   LoadVectorsOCDB();
 }
 
-
-void 
-AliCaloRawAnalyzerPeakFinder::InitOCDB(bool alien) const
-{
-  // Setting the default OCDB pathe depending on wether we work locally or on the GRID.
-  if( !AliCDBManager::Instance()->IsDefaultStorageSet ())
-    {
-      AliCDBManager::Instance()->SetDefaultStorage(  alien == true ? "alien://$ALICE_ROOT/OCDB" : "local://$ALICE_ROOT/OCDB" );
-      AliCDBManager::Instance()->SetRun(100);
-    }
-}
-
-
 void  
 AliCaloRawAnalyzerPeakFinder::ResetVectors()
 {
@@ -266,67 +253,9 @@ AliCaloRawAnalyzerPeakFinder::LoadVectorsOCDB()
 }
 
 
-void 
-AliCaloRawAnalyzerPeakFinder::LoadVectorsASCII()
-{
-  //Read in the Peak finder vecors from ASCI files
-  fIsInitialized= true;  
-  const Int_t buffersize = 256;
-  for(int i = 0;  i < PF::MAXSTART ; i++)
-  {
-    for( int j=0; j < PF::SAMPLERANGE; j++)
-    {
-      char filenameCoarse[buffersize];
-      char filename[buffersize];
-      int n = j+fNsampleCut;
-      double start = (double)i+0;
-      
-      snprintf(filename, buffersize,       "%s/EMCAL/vectors-emcal/start%.1fN%dtau0.235fs10dt1.0.txt", getenv("ALICE_ROOT"), start, n);
-      snprintf(filenameCoarse, buffersize, "%s/EMCAL/vectors-emcal/start%.1fN%dtau0.235fs10dt3.0.txt", getenv("ALICE_ROOT"), start, n);
-      
-      FILE *fp  =  fopen(filename, "r");
-      FILE *fpc =  fopen(filenameCoarse, "r");
-      
-      if( fp == 0 )
-           {
-             AliFatal( Form( "could not open file: %s", filename ) );
-           }
-      else if(fpc == 0)
-           {
-             AliFatal( Form( "could not open file: %s", filenameCoarse ) );
-           }
-      else
-           {
-             for(int m = 0; m < n ; m++ )
-        {
-          fscanf(fp,  "%lf\t", &fPFAmpVectors[i][j][m] );
-          fscanf(fpc, "%lf\t", &fPFAmpVectorsCoarse[i][j][m] );
-        }
-             fscanf(fp,   "\n" );
-             fscanf(fpc,  "\n" );
-             for(int m = 0; m < n ; m++ )
-        {
-          fscanf(fp, "%lf\t",   &fPFTofVectors[i][j][m]  );
-          fscanf(fpc, "%lf\t",  &fPFTofVectorsCoarse[i][j][m]  );  
-        }
-             
-             fPeakFinderVectors->SetVector( i, j, fPFAmpVectors[i][j], fPFTofVectors[i][j],    
-                                      fPFAmpVectorsCoarse[i][j], fPFTofVectorsCoarse[i][j] );   
-        
-           }
-      
-      if(fp) fclose (fp );
-      if(fpc)fclose (fpc);
-      
-    }
-  }
-}
-
-
 void   
 AliCaloRawAnalyzerPeakFinder::WriteRootFile() const
-{
-  // Utility function to write Peak-Finder vectors to an root file
+{ // Utility function to write Peak-Finder vectors to an root file
   // The output is used to create an OCDB entry.
   fPeakFinderVectors->PrintVectors();
   TFile *f = new TFile("peakfindervectors2.root",  "recreate" );
@@ -338,7 +267,7 @@ AliCaloRawAnalyzerPeakFinder::WriteRootFile() const
 
 void 
 AliCaloRawAnalyzerPeakFinder::PrintVectors()
-{
+{ // Utility function to write Peak-Finder vectors 
   for(int i=0; i < 20; i++)
     {
       for( int j = 0; j < PF::MAXSTART; j ++ )