--- /dev/null
+#ifndef ALIPEAKFINDERCONSTANTS_H
+#define ALIPEAKFINDERCONSTANTS_H
+
+
+namespace PeakFinderConstants
+{
+ const int MAXSTART = 3;
+ const int SAMPLERANGE = 15;
+}
+
+#endif
--- /dev/null
+/**************************************************************************
+ * This file is property of and copyright by the Relativistic Heavy Ion *
+ * Group (RHIG), Department of Physics Yale University, US, 2010 *
+ * *
+ * Author: Per Thomas Hille <perthomas.hille@yale.edu> for the ALICE EMCAL*
+ * project. Contributors are mentioned in the code where appropriate. *
+ * Please report bugs to perthomas.hille@yale.edu *
+ * *
+ * Permission to use, copy, modify and distribute this software and its *
+ * documentation strictly for non-commercial purposes is hereby granted *
+ * without fee, provided that the above copyright notice appears in all *
+ * copies and that both the copyright notice and this permission notice *
+ * appear in the supporting documentation. The authors make no claims *
+ * about the suitability of this software for any purpose. It is *
+ * provided "as is" without express or implied warranty. *
+ **************************************************************************/
+
+//Container class for Peak Finder vectors
+
+#include "AliCaloPeakFinderVectors.h"
+#include <iostream>
+
+
+using namespace std;
+
+
+
+ClassImp( AliCaloPeakFinderVectors)
+
+
+
+AliCaloPeakFinderVectors::AliCaloPeakFinderVectors()
+{
+ ResetVectors();
+}
+
+
+AliCaloPeakFinderVectors::~AliCaloPeakFinderVectors()
+{
+
+}
+
+
+void
+AliCaloPeakFinderVectors::ResetVectors()
+{
+ // As implied by function name
+ for(int i=0; i < MAXSTART; i++ )
+ {
+ for(int j=0; j < SAMPLERANGE; j++)
+ {
+ if(i < MAXSTART && j < SAMPLERANGE )
+ {
+ for(int k = 0; k < 100; k++)
+ {
+ fPFAmpV[i][j][k] = 0 ;
+ fPFTofV[i][j][k] = 0 ;
+ fPFAmpVC[i][j][k] = 0 ;
+ fPFTofVC[i][j][k] = 0 ;
+ }
+ }
+ }
+ }
+}
+
+
+void
+AliCaloPeakFinderVectors::SetVector(const int i, const int j, const Double_t *const a, const Double_t *const t,
+ const Double_t *const ac, const Double_t *const tc )
+{
+ // As implied by function name
+ if(i < MAXSTART && j < SAMPLERANGE )
+ {
+ for(int k = 0; k < 100; k++)
+ {
+ fPFAmpV[i][j][k] = a[k];
+ fPFTofV[i][j][k] = t[k];
+ fPFAmpVC[i][j][k] = ac[k];
+ fPFTofVC[i][j][k] = tc[k];
+ }
+ }
+}
+
+
+void
+AliCaloPeakFinderVectors::GetVector(const int i, const int j, Double_t *const a, Double_t *const t,
+ Double_t *const ac, Double_t *const tc ) const
+{
+ // As implied by function name
+ if(i < MAXSTART && j < SAMPLERANGE )
+ {
+ for( int k = 0; k < 100; k++)
+ {
+ a[k] = fPFAmpV[i][j][k];
+ t[k] = fPFTofV[i][j][k];
+ ac[k] = fPFAmpVC[i][j][k];
+ tc[k] = fPFTofVC[i][j][k];
+ }
+ }
+}
+
+
+void
+AliCaloPeakFinderVectors::PrintVectors() const
+{
+ // As implied by function name
+ cout << __FILE__ << __LINE__ << __FUNCTION__ << endl;
+ for(int i= 0; i < MAXSTART; i++ )
+ {
+ for(int j=0; j < SAMPLERANGE; j++ )
+ {
+ for(int k=0; k < 10; k++ )
+ {
+ cout << fPFAmpV[i][j][k] << "\t";
+ }
+ cout << endl;
+ }
+ cout << endl;
+ }
+}
+
--- /dev/null
+#ifndef ALICALOPEAKFINDERVECTORS_H
+#define ALICALOPEAKFINDERVECTORS_H
+
+/**************************************************************************
+ * This file is property of and copyright by the Relativistic Heavy Ion *
+ * Group (RHIG), Department of Physics Yale University, US, 2010 *
+ * *
+ * Author: Per Thomas Hille <perthomas.hille@yale.edu> for the ALICE EMCAL*
+ * project. Contributors are mentioned in the code where appropriate. *
+ * Please report bugs to perthomas.hille@yale.edu *
+ * *
+ * Permission to use, copy, modify and distribute this software and its *
+ * documentation strictly for non-commercial purposes is hereby granted *
+ * without fee, provided that the above copyright notice appears in all *
+ * copies and that both the copyright notice and this permission notice *
+ * appear in the supporting documentation. The authors make no claims *
+ * about the suitability of this software for any purpose. It is *
+ * provided "as is" without express or implied warranty. *
+ **************************************************************************/
+
+//Container class for Peak Finder vectors
+
+#include "TObject.h"
+#include "AliCaloPeakFinderConstants.h"
+using namespace PeakFinderConstants;
+
+
+class AliCaloPeakFinderVector;
+
+
+class AliCaloPeakFinderVectors : public TObject
+{
+ public:
+ AliCaloPeakFinderVectors();
+ virtual ~AliCaloPeakFinderVectors();
+ void SetVector(const int i, const int j, const Double_t *const a, const Double_t *const t,
+ const Double_t *const ac, const Double_t *const tc );
+ void GetVector(const int i, const int j, Double_t *const a, Double_t *const t,
+ Double_t *const ac, Double_t *const tc ) const;
+ void ResetVectors();
+
+ Double_t fPFAmpVC[MAXSTART][SAMPLERANGE][100]; // Vectors for Amplitude extraction, first iteration
+ Double_t fPFTofVC[MAXSTART][SAMPLERANGE][100]; // Vectors for TOF extraction, first iteration
+ Double_t fPFAmpV[MAXSTART][SAMPLERANGE][100]; // Vectors for Amplitude extraction, second iteration
+ Double_t fPFTofV[MAXSTART][SAMPLERANGE][100]; // Vectors for TOF extraction, second iteration
+
+ void PrintVectors() const;
+
+ ClassDef( AliCaloPeakFinderVectors, 1 )
+
+};
+
+#endif
+
* Primary Author: Per Thomas Hille <perthomas.hille@yale.edu> *
* *
* Contributors are mentioned in the code where appropriate. *
- * Please report bugs to p.t.hille@fys.uio.no *
+ * Please report bugs to perthomas.hille@yale.edu *
* *
* Permission to use, copy, modify and distribute this software and its *
* documentation strictly for non-commercial purposes is hereby granted *
* provided "as is" without express or implied warranty. *
**************************************************************************/
+
// The Peak-Finder algorithm
// The amplitude is extracted as a
// weighted sum of the samples using the
#include "unistd.h"
#include "TMath.h"
#include "AliLog.h"
+#include "AliCDBEntry.h"
+#include "AliCDBManager.h"
+#include "TFile.h"
+#include "AliCaloPeakFinderVectors.h"
using namespace std;
+
ClassImp( AliCaloRawAnalyzerPeakFinder )
-AliCaloRawAnalyzerPeakFinder::AliCaloRawAnalyzerPeakFinder() :AliCaloRawAnalyzer("Peak-Finder", "PF")
-// fTof(0),
-// fAmp(0)
+
+AliCaloRawAnalyzerPeakFinder::AliCaloRawAnalyzerPeakFinder() :AliCaloRawAnalyzer("Peak-Finder", "PF"),
+ fAmp(0),
+ fPeakFinderVectors(0),
+ fRunOnAlien(false)
{
- //comment
+ InitOCDB(fRunOnAlien);
+ fPeakFinderVectors = new AliCaloPeakFinderVectors() ;
+ ResetVectors();
+ LoadVectorsOCDB();
+ // cout << "*********** OCDB VECTORS ************" << endl;
+ // fPeakFinderVectors->PrintVectors();
+ // PrintVectors();
+}
+
+
+void
+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);
+}
- fNsampleCut = 5;
+void
+AliCaloRawAnalyzerPeakFinder::ResetVectors()
+{
for(int i=0; i < MAXSTART; i++)
{
for(int j=0; j < SAMPLERANGE; j++ )
{
- fPFAmpVectors[i][j] = new double[100];
- fPFTofVectors[i][j] = new double[100];
- fPFAmpVectorsCoarse[i][j] = new double[100];
- fPFTofVectorsCoarse[i][j] = new double[100];
-
for(int k=0; k < 100; k++ )
{
fPFAmpVectors[i][j][k] = 0;
}
}
}
-
- LoadVectors();
-
}
}
+
Double_t
AliCaloRawAnalyzerPeakFinder::ScanCoarse(const Double_t *const array, const int length ) const
{
+ // Fisrt (coarce) estimate of Amplitude using the Peak-Finder.
+ // The output of the first iteration is sued to select vectors
+ // for the second iteration.
+
Double_t tmpTof = 0;
Double_t tmpAmp= 0;
short maxampindex; //index of maximum amplitude
short maxamp; //Maximum amplitude
- // fAmp = 0;
-
-
- fAmpA[0] = 0;
- fAmpA[1] = 0;
- fAmpA[2] = 0;
-
-
- // cout << __FILE__ << __LINE__ << "\tendbin = " << bunchvector.at(index).GetEndBin() << "\tstartbin = " << bunchvector.at(index).GetStartBin() << endl;
-
+ fAmp = 0;
int index = SelectBunch( bunchvector, &maxampindex, &maxamp );
if( index >= 0)
if( maxf < fAmpCut || ( maxamp - ped) > 900 ) // (maxamp - ped) > 900 = Close to saturation (use low gain then)
{
- // cout << __FILE__ << __LINE__ <<":, maxamp = " << maxamp << ", ped = "<< ped << ",. maxf = "<< maxf << ", maxampindex = "<< maxampindex << endl;
return AliCaloFitResults( maxamp, ped, AliCaloFitResults::kCrude, maxf, timebinOffset);
}
pfindex = pfindex > SAMPLERANGE ? SAMPLERANGE : pfindex;
int dt = maxampindex - startbin -2;
-
- // cout << __FILE__ << __LINE__ <<"\t The coarse estimated t0 is " << ScanCoarse( &fReversed[dt] , n ) << endl;
-
-
- // Float_t tmptof = ScanCoarse( &fReversed[dt] , n );
-
- // cout << __FILE__ << __LINE__ << ", dt = " << dt << ",\tmaxamindex = " << maxampindex << "\tstartbin = "<< startbin << endl;
-
- for( int i=0; i < SAMPLERANGE; i++ )
- {
- for( int j = 0; j < 3; j++ )
- {
- // fAmpA[j] += fPFAmpVectors[0][pfindex][i]*tmp[j];
- fAmpA[j] += fPFAmpVectors[0][pfindex][i]*fReversed[ dt +i +j -1 ];
- }
- }
-
- double diff = 9999;
int tmpindex = 0;
- for(int k=0; k < 3; k ++)
- {
- // cout << __FILE__ << __LINE__ << "amp[="<< k <<"] = " << fAmpA[k] << endl;
- if( TMath::Abs(fAmpA[k] - ( maxamp - ped) ) < diff)
- {
- diff = TMath::Abs(fAmpA[k] - ( maxamp - ped));
- tmpindex = k;
- }
- }
-
Float_t tmptof = ScanCoarse( &fReversed[dt] , n );
if( tmptof < -1 )
else
if( tmptof > -1 && tmptof < 100 )
{
- tmpindex =1;
+ tmpindex = 1;
}
else
{
tmpindex = 2;
}
+
double tof = 0;
for(int k=0; k < SAMPLERANGE; k++ )
{
tof += fPFTofVectors[0][pfindex][k]*fReversed[ dt +k + tmpindex -1 ];
}
+
+ for( int i=0; i < SAMPLERANGE; i++ )
+ {
+ {
+ fAmp += fPFAmpVectors[0][pfindex][i]*fReversed[ dt +i +tmpindex -1 ];
+ }
+ }
- // cout << __FILE__ << __LINE__ << "tofRaw = "<< tof / fAmpA[tmpindex] << endl;
-
- // tof = tof / fAmpA[tmpindex] + (dt + startbin)*100;
-
- if( TMath::Abs( (maxf - fAmpA[tmpindex])/maxf ) > 0.1 )
+ if( TMath::Abs( (maxf - fAmp )/maxf ) > 0.1 )
{
- fAmpA[tmpindex] = maxf;
+ fAmp = maxf;
}
-
- // timebinOffset
-
- // tof = (dt + startbin + tmpindex )*100 - tof/fAmpA[tmpindex];
- // tof = ( timebinOffset )*100 - tof/fAmpA[tmpindex]; // ns
- tof = timebinOffset - 0.01*tof/fAmpA[tmpindex]; // clock ticks
- // tof = tof/fAmpA[tmpindex];
-
+ tof = timebinOffset - 0.01*tof/fAmp; // clock ticks
- return AliCaloFitResults( maxamp, ped , AliCaloFitResults::kFitPar, fAmpA[tmpindex], tof, timebinOffset, AliCaloFitResults::kDummy, AliCaloFitResults::kDummy,
+ return AliCaloFitResults( maxamp, ped , AliCaloFitResults::kFitPar, fAmp, tof,
+ timebinOffset, AliCaloFitResults::kDummy, AliCaloFitResults::kDummy,
AliCaloFitResults::kDummy, AliCaloFitSubarray(index, maxrev, first, last) );
}
else
return AliCaloFitResults( maxamp , ped, AliCaloFitResults::kCrude, maxf, timebinOffset);
}
}
- // cout << __FILE__ << __LINE__ << "WARNING, returning amp = -1 " << endl;
return AliCaloFitResults(AliCaloFitResults::kInvalid, AliCaloFitResults::kInvalid);
}
+void
+AliCaloRawAnalyzerPeakFinder::CopyVectors(const AliCaloPeakFinderVectors *const pfv )
+{
+ // As name implies
+
+ if ( pfv != 0)
+ {
+ for(int i = 0; i < MAXSTART ; i++)
+ {
+ for( int j=0; j < SAMPLERANGE; j++)
+ {
+ pfv->GetVector( i, j, fPFAmpVectors[i][j] , fPFTofVectors[i][j],
+ fPFAmpVectorsCoarse[i][j] , fPFTofVectorsCoarse[i][j] );
+ fPeakFinderVectors->SetVector( i, j, fPFAmpVectors[i][j], fPFTofVectors[i][j],
+ fPFAmpVectorsCoarse[i][j], fPFTofVectorsCoarse[i][j] );
+ }
+ }
+ }
+ else
+ {
+ AliFatal( "pfv = ZERO !!!!!!!");
+ // cout << __FILE__ << __LINE__ << __FUNCTION__ << " ERROR, pfv = ZERO !!!!!!!" << endl;
+ }
+}
+
+
+
+void
+AliCaloRawAnalyzerPeakFinder::LoadVectorsOCDB()
+{
+ //Loading of Peak-Finder vectors from the
+ //Offline Condition Database (OCDB)
+
+ // AliCDBManager::Instance()->SetDefaultStorage("local://$ALICE_ROOT/OCDB");
+ // AliCDBManager::Instance()->SetRun(100);
+
+ AliCDBEntry* entry = AliCDBManager::Instance()->Get("EMCAL/Calib/PeakFinder/");
+ // AliCaloPeakFinderVectors *pfv ;
+
+ if( entry != 0 )
+ {
+ AliCaloPeakFinderVectors *pfv = (AliCaloPeakFinderVectors *)entry->GetObject();
+ CopyVectors( pfv );
+
+ }
+ // CopyVectors( pfv );
+}
+
+
void
-AliCaloRawAnalyzerPeakFinder::LoadVectors()
+AliCaloRawAnalyzerPeakFinder::LoadVectorsASCII()
{
- //Read in the Peak finder vecors from file
+ //Read in the Peak finder vecors from ASCI files
for(int i = 0; i < MAXSTART ; i++)
{
for( int j=0; j < SAMPLERANGE; j++)
{
char filenameCoarse[256];
char filename[256];
-
int n = j+fNsampleCut;
-
- // double start = (double)i+0.5;
double start = (double)i+0;
-
+
sprintf(filename, "%s/EMCAL/vectors-emcal/start%.1fN%dtau0.235fs10dt1.0.txt", getenv("ALICE_ROOT"), start, n);
sprintf(filenameCoarse, "%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");
{
for(int m = 0; m < n ; m++ )
{
- // cout << __FILE__ << __LINE__ << "i="<<i <<"\tj=" <<j << "\tm=" << m << endl;
-
- fscanf(fp, "%lf\t", &fPFAmpVectors[i][j][m] );
- // fPFAmpVectorsCoarse[i][j][m] = 1;
+ 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++ )
{
- // fPFTofVectors[i][j][m] = 1;
-
fscanf(fp, "%lf\t", &fPFTofVectors[i][j][m] );
fscanf(fpc, "%lf\t", &fPFTofVectorsCoarse[i][j][m] );
- // fPFTofVectorsCoarse[i][j][m] = 1;
}
-
+ fPeakFinderVectors->SetVector( i, j, fPFAmpVectors[i][j], fPFTofVectors[i][j],
+ fPFAmpVectorsCoarse[i][j], fPFTofVectorsCoarse[i][j] );
+
fclose (fp);
fclose (fpc);
}
}
-
-/*
-void
-AliCaloRawAnalyzerPeakFinder::PolTof( const double rectof ) const
-//
+void
+AliCaloRawAnalyzerPeakFinder::WriteRootFile() const
{
- static Double_t p0 = -55.69;
- static Double_t p1 = 3.178;
- static Double_t p2 = -0.05587;
- static Double_t p3 = 0.0003185;
- static Double_t p4 = -7.91E-7;
- static Double_t p5 = 7.576E-10;
+ // Utility function to write Peak-Finder vectors to an root file
+ // The output is used to create an OCDB entry.
+
+ cout << "**** Peakfinder vectors before writing to file **********" << endl;
+ fPeakFinderVectors->PrintVectors();
+ cout << "****************** END ***********************" << endl;
+ TFile *f = new TFile("peakfindervectors2.root", "recreate" );
+ fPeakFinderVectors->Write();
+ f->Close();
+ delete f;
}
-*/
* Primary Author: Per Thomas Hille <perthomas.hille@yale.edu> *
* *
* Contributors are mentioned in the code where appropriate. *
- * Please report bugs to p.t.hille@fys.uio.no *
+ * Please report bugs to perthomas.hille@yale.edu *
* *
* Permission to use, copy, modify and distribute this software and its *
* documentation strictly for non-commercial purposes is hereby granted *
* provided "as is" without express or implied warranty. *
**************************************************************************/
-
// The Peak-Finder algorithm
// The amplitude is extracted as a
// weighted sum of the samples using the
// best possible weights.
-
#include "AliCaloRawAnalyzer.h"
+#include "AliCaloPeakFinderConstants.h"
-#define MAXSTART 3
-#define SAMPLERANGE 15
-#define SHIF 0.5
+using namespace PeakFinderConstants;
class AliCaloBunchInfo;
+class AliCaloPeakFinderVectors;
class AliCaloRawAnalyzerPeakFinder : public AliCaloRawAnalyzer
public:
AliCaloRawAnalyzerPeakFinder();
virtual ~AliCaloRawAnalyzerPeakFinder();
- virtual AliCaloFitResults Evaluate( const std::vector<AliCaloBunchInfo> &bunchvector, const UInt_t altrocfg1, const UInt_t altrocfg2 );
+ virtual AliCaloFitResults Evaluate( const std::vector<AliCaloBunchInfo> &bunchvector,
+ const UInt_t altrocfg1, const UInt_t altrocfg2 );
private:
AliCaloRawAnalyzerPeakFinder( const AliCaloRawAnalyzerPeakFinder & );
AliCaloRawAnalyzerPeakFinder & operator = ( const AliCaloRawAnalyzerPeakFinder & );
-
- void LoadVectors();
- Double_t ScanCoarse(const Double_t *const array, const int length ) const ; // Find a rough estimate of peak position and t0
-
- // void PolTof( const double rectof ) const;
+ void LoadVectorsASCII();
+ void LoadVectorsOCDB();
+ void CopyVectors(const AliCaloPeakFinderVectors *const pfvectors );
+ void ResetVectors();
+ void InitOCDB(bool alien) const;
+ // void PrintVectors() const;
+ void WriteRootFile() const;
+ Double_t ScanCoarse(const Double_t *const array, const int length ) const ; // Find a rough estimate of peak position and t0
+
+ Double_t fPFAmpVectorsCoarse[MAXSTART][SAMPLERANGE][100]; // Vectors for Amplitude extraction, first iteration
+ Double_t fPFTofVectorsCoarse[MAXSTART][SAMPLERANGE][100]; // Vectors for TOF extraction, first iteration
+ Double_t fPFAmpVectors[MAXSTART][SAMPLERANGE][100]; // Vectors for Amplitude extraction, second iteration
+ Double_t fPFTofVectors[MAXSTART][SAMPLERANGE][100]; // Vectors for TOF extraction, second iteration
+ Double_t fAmp;
+ AliCaloPeakFinderVectors *fPeakFinderVectors; // Collection of Peak-Fincer vectors
- double *fPFAmpVectorsCoarse[MAXSTART][SAMPLERANGE]; // Vectors for Amplitude extraction, first iteration
- double *fPFTofVectorsCoarse[MAXSTART][SAMPLERANGE]; // Vectors for TOF extraction, first iteration
-
- double *fPFAmpVectors[MAXSTART][SAMPLERANGE]; // Vectors for Amplitude extraction, second iteration
- double *fPFTofVectors[MAXSTART][SAMPLERANGE]; // Vectors for TOF extraction, second iteration
-
- // double fTof;
- // double fAmp;
-
- double fAmpA[3]; // The amplitude of the signal (eveluate 3 times using 3 differtnt phase shifts of the input samples )
- // double fAmp2;
- // double fAmp3;
+ bool fRunOnAlien; // Wether or not we are running on the GRID
ClassDef( AliCaloRawAnalyzerPeakFinder, 1 )
-
};
+
#endif
#pragma link C++ class AliCaloRawAnalyzerNN+;
#pragma link C++ class AliCaloRawAnalyzerLMS+;
#pragma link C++ class AliCaloRawAnalyzerPeakFinder+;
+#pragma link C++ class AliCaloPeakFinderVectors+;
#pragma link C++ class AliEMCALHistoUtilities+;
#endif
AliCaloRawAnalyzerLMS.cxx \
AliCaloRawAnalyzerPeakFinder.cxx \
AliCaloRawAnalyzerNN.cxx \
+AliCaloPeakFinderVectors.cxx \
AliEMCALHistoUtilities.cxx
-HDRS:= $(SRCS:.cxx=.h)
+HDRS:= $(SRCS:.cxx=.h) AliCaloPeakFinderConstants.h
DHDR= EMCALUtilsLinkDef.h
--- /dev/null
+void MakeEMCALPF(){
+ const char* macroname = "MakeEMCALPF.C";
+ TFile *f2 = new TFile("peakfindervectors2.root", "read" );
+
+ // AliCaloPeakFinderVectors *pfv = (AliCaloPeakFinderVectors* )f2->GetKey( "AliCaloPeakFinderVectors");
+
+ AliCaloPeakFinderVectors pfv = *((AliCaloPeakFinderVectors* )f2->GetKey( "AliCaloPeakFinderVectors"));
+
+ f2->Close();
+ {
+ // TString Storage = "local://home/perthi/aliroot-current/OCDB/";
+ TString Storage = "local://OCDB/";
+
+ if(!Storage.BeginsWith("local://") && !Storage.BeginsWith("alien://")) {
+ Error(macroname ,"STORAGE variable set to %s is not valid. Exiting\n",Storage.Data());
+ return;
+ }
+
+ Info(macroname,"Saving PF objects in CDB storage %s",
+ Storage.Data());
+ AliCDBManager* cdb = AliCDBManager::Instance();
+
+
+ AliCDBStorage* storage = cdb->GetStorage(Storage.Data());
+ if(!storage){
+ Error(macroname,"Unable to open storage %s\n",Storage.Data());
+ return;
+ }
+
+ AliCDBMetaData* md = new AliCDBMetaData();
+ md->SetResponsible("Per Thomas Hille");
+ md->SetComment("Peak-Finder vectors for EMCAL");
+ md->SetAliRootVersion(gSystem->Getenv("ARVERSION"));
+ AliCDBId id("EMCAL/Config/PeakFinder",0,AliCDBRunRange::Infinity());
+
+ // if(pfv == 0)
+ // {
+ // cout << " ERROR !!!!!!!!!" << endl;
+ // }
+
+ // else
+
+ {
+ storage->Put( &pfv,id,md);
+ }
+
+ // delete md;
+ }
+
+
+ //
+}
+