--- /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"));
+ // AliCaloPeakFinderVectors pfv = *((AliCaloPeakFinderVectors* )f2->GetKey( "AliCaloPeakFinderVectors"));
+ // AliCaloPeakFinderVectors *p = f2->Get("AliCaloPeakFinderVectors");
+
+ // AliCaloPeakFinderVectors pfv = *((AliCaloPeakFinderVectors* )f2->GetKey( "AliCaloPeakFinderVectors"));
+ AliCaloPeakFinderVectors *pfv = (f2->Get("AliCaloPeakFinderVectors"));
+
+ pfv->PrintVectors();
+ // p->PrintVectors();
+
+ 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/Calib/PeakFinder",0,AliCDBRunRange::Infinity());
+
+ if ( storage != 0 )
+ {
+ Bool_t ret = storage->Put( pfv,id,md);
+ if(ret == kFALSE )
+ {
+ cout << __FILE__ << ":" << __LINE__ << ": ERROR !!! storage->Put( pfv,id,md) returned false " << endl;
+ }
+ else
+ {
+ cout << __FILE__ << ":" << __LINE__ << ": INFO !!! storage->Put( pfv,id,md) returned TRUE " << endl;
+ }
+
+ }
+ }
+
+}
+
--- /dev/null
+#include "AliCaloRawAnalyzerPeakFinder.h"
+//#include "AliCaloRawAnalyzerPeakFinder.h"
+
+#include "AliCaloPeakFinderVectors.h"
+#define MAXSTART 3
+#define SAMPLERANGE 15
+#define SHIF 0.5
+
+
+void pfocdbmaker()
+{
+ AliCDBEntry e;
+ AliCaloRawAnalyzerPeakFinder *p = new AliCaloRawAnalyzerPeakFinder();
+ e.SetObject(p);
+ TFile *f = new TFile("pfvectors.root", "recreate" );
+ //Read in the Peak finder vecors from file
+ p->Write();
+ // e.Write();
+ f->Close();
+}
+
+
+
+
+
+
--- /dev/null
+
+void readpf()
+{
+ cout << "HELLO WORLD" << endl;
+ TFile *f = new TFile("peakfindervectors2.root", "read");
+
+ // f->ls();
+ // f->Print();
+ // AliCaloRawAnalyzerPeakFinder *p = (AliCaloRawAnalyzerPeakFinder*)f->GetKey("AliCaloRawAnalyzerPeakFinder");
+
+ AliCaloPeakFinderVectors *p = f->Get("AliCaloPeakFinderVectors");
+
+ if ( p == 0 )
+ {
+ cout << "ERROR, P == 0" << endl;
+ }
+ else
+ {
+ cout << "INFO, p = "<< p << endl;
+ p->PrintVectors();
+ }
+
+ cout << endl << "********** !!!!!!!!!!!!!! " << endl;
+
+
+ // AliCaloRawAnalyzerPeakFinder *p2 = new AliCaloRawAnalyzerPeakFinder();
+ // p2->PrintVectors();
+}
+
+