AliCaloRawAnalyzerPeakFinder::InitOCDB(bool alien) const
{
// Setting the default OCDB pathe depending on wether we work locally or on the GRID.
- AliCDBManager::Instance()->SetDefaultStorage( alien == true ? "alien://$ALICE_ROOT/OCDB" : "local://$ALICE_ROOT/OCDB");
- AliCDBManager::Instance()->SetRun(100);
+
+
+ // if( AliCDBManager::Instance()->HasStorage("alien://$ALICE_ROOT/OCDB") == false && AliCDBManager::Instance()->HasStorage("local://$ALICE_ROOT/OCDB") == false )
+ if( !AliCDBManager::Instance()->IsDefaultStorageSet ())
+ {
+ AliCDBManager::Instance()->SetDefaultStorage( alien == true ? "alien://$ALICE_ROOT/OCDB" : "local://$ALICE_ROOT/OCDB" );
+ AliCDBManager::Instance()->SetRun(100);
+ }
}
//Loading of Peak-Finder vectors from the
//Offline Condition Database (OCDB)
AliCDBEntry* entry = AliCDBManager::Instance()->Get("EMCAL/Calib/PeakFinder/");
- cout << __FILE__ << ":" << __LINE__ << ": Printing metadata !! " << endl;
- entry->PrintMetaData();
-
+
if( entry != 0 )
+ {
+
+ cout << __FILE__ << ":" << __LINE__ << ": Printing metadata !! " << endl;
+ entry->PrintMetaData();
+
+ AliCaloPeakFinderVectors *pfv = (AliCaloPeakFinderVectors *)entry->GetObject();
+ if( pfv == 0 )
{
- AliCaloPeakFinderVectors *pfv = (AliCaloPeakFinderVectors *)entry->GetObject();
- if( pfv == 0 )
- {
- cout << __FILE__ << ":" << __LINE__ << "_ ERRROR " << endl;
- }
-
- CopyVectors( pfv );
-
- if( pfv != 0 )
- {
- fIsInitialized = true;
- }
+ cout << __FILE__ << ":" << __LINE__ << "_ ERRROR " << endl;
+ }
+
+ CopyVectors( pfv );
+
+ if( pfv != 0 )
+ {
+ fIsInitialized = true;
}
+ }
+
}
{
for(int m = 0; m < n ; m++ )
{
- fscanf(fp, "%lf\t", &fPFAmpVectors[i][j][m] );
+ fscanf(fp, "%lf\t", &fPFAmpVectors[i][j][m] );
fscanf(fpc, "%lf\t", &fPFAmpVectorsCoarse[i][j][m] );
}
fscanf(fp, "\n" );
fPeakFinderVectors->SetVector( i, j, fPFAmpVectors[i][j], fPFTofVectors[i][j],
fPFAmpVectorsCoarse[i][j], fPFTofVectorsCoarse[i][j] );
- fclose (fp);
- fclose (fpc);
}
+
+ if(fp) fclose (fp );
+ if(fpc)fclose (fpc);
+
}
}
}