-void MakeVZEROEqualizationFactorsEntry()
+void MakeVZEROEqualizationFactorsEntry(Bool_t default = kTRUE, const char *infile = "alpha.dat")
{
AliCDBManager *man = AliCDBManager::Instance();
man->SetDefaultStorage("local://$ALICE_ROOT/OCDB");
- // Creation of the light yields OCDB object
- const Double_t alpha[66] = {0.0,
- 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0,
- 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0,
- 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0,
- 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0,
- 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0,
- 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0,
- 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0,
- 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0,
- 0.0};
TH1F *eqFactors = new TH1F("VZEROEqualizationFactors","VZERO Equalization Factors for Pb-Pb",64,-0.5,63.5);
- eqFactors->SetContent(alpha);
+ if (default) {
+ const Double_t alpha[66] = {0.0,
+ 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0,
+ 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0,
+ 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0,
+ 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0,
+ 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0,
+ 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0,
+ 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0,
+ 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0,
+ 0.0};
+ eqFactors->SetContent(alpha);
+ }
+ else {
+ FILE *falphas;
+ if((falphas = fopen(infile,"r")) == NULL){
+ printf("Cannot open file %s",infile);
+ return;
+ }
+ Double_t alpha[66], alpha2[66], beta[66];
+ alpha[0] = alpha2[0] = beta[0] = alpha[65] = alpha2[65] = beta[65] = 0;
+ Int_t tempCh;
+ for(Int_t j=0; j<64; ++j) fscanf(falphas,"%d %lf %lf %lf", &tempCh, &beta[j+1], &alpha[j+1], &alpha2[j+1]);
+ fclose(falphas);
+
+ eqFactors->SetContent(alpha2);
+ }
AliCDBMetaData *md= new AliCDBMetaData(); // metaData describing the object
md->SetResponsible("Brigitte Cheynis");