AliPhysics  648edd6 (648edd6)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ConvertOCDBtoText.C
Go to the documentation of this file.
1 
2 
3  char SMP2Name[][100]={"SMA0","SMC0","SMA1","SMC1","SMA2","SMC2","SMA3","SMC3","SMA4","SMC4","SMA5","SMC5","SMA9","SMC9","SMA10","SMC10","SMA11","SMC11","SMA12","SMC12"};
4  char SMnumber[][100]={"0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"};
5 
8  char detTypeString[][100]={"EMCAL","EMCALthird","DCAL","DCALthird"};
10  const int kNbColEMCAL=48;
11  const int kNbRowEMCAL=24;
12  const int kNbSMEMCAL=10;
14  const int kNbRowEMCALthird=(int)(kNbRowEMCAL/3);
15  const int kNbSMEMCALthird=2;
16  const int kNbColDCAL=32;
18  const int kNbSMDCAL=6;
21  const int kNbSMDCALthird=2;
22  const int kNbSMtot=kNbSMEMCAL+kNbSMEMCALthird+kNbSMDCAL+kNbSMDCALthird;
23  const int kTabNbCol[4]={kNbColEMCAL,kNbColEMCALthird,kNbColDCAL,kNbColDCALthird};
24  const int kTabNbRow[4]={kNbRowEMCAL,kNbRowEMCALthird,kNbRowDCAL,kNbRowDCALthird};
25  const int kTabNbSM[4]={kNbSMEMCAL,kNbSMEMCALthird,kNbSMDCAL,kNbSMDCALthird};
29 
30 
47 
52 {
53  //CUSTOMIZE customize :
54  //TFile * fIn = new TFile("/cebaf/cebaf/EMCAL/calibPi0_run2/createOCDB_4_with2015data/Run0_999999999_v1_s0_OCDBcoeffsLHC15ij_EMCALnotValid.root","READ");
55  TFile * fIn = new TFile("/cebaf/cebaf/EMCAL/calibPi0_run2/createOCDB_4_with2015data/Run0_999999999_v0_s2_OCDBcoeffsLHC15ijAfterCalib_EMCALnotValid.root","READ");
56  //TFile * fIn = new TFile("OCDBparamsCalib_allOneForTests.root","READ");
57 
58  FILE *txtFileOut = NULL;
59  //CUSTOMIZE customize :
60  txtFileOut = fopen("OCDBparamsAfterCalib2015.txt","w");
61  //txtFileOut = fopen("OCDBparamsCalib_allOneForTests.txt","w");
62 
63  AliCDBEntry * cdb = (AliCDBEntry*) fIn->Get("AliCDBEntry");
64  AliEMCALCalibData * cparam = cdb->GetObject();
65 
66  for(Int_t m = 0; m < kNbSMtot; m++){
67  for (Int_t c = 0; c < kTabNbCol[SMdetType[m]]; c++){
68  for (Int_t r = 0; r < kTabNbRow[SMdetType[m]]; r++){
69 
70  Float_t adc=cparam->GetADCchannel(m,c,r);
71  //Explanation of what the params below are : fprintf(txtFileOut,"SM %d, col %d, row %d, parameter %1.4f\n",m, c, r,adc);
72  //fprintf(txtFileOut,"%d %d %d %1.4f\n",m, c, r,adc);
73  //Take %1.4f out as introduces an unnecessary rounding at the 1% level.
74  fprintf(txtFileOut,"%d %d %d %f\n",m, c, r,adc);
75 
76  }
77  }
78  }
79 
80  printf("Done.\n");
81  fclose(txtFileOut);
82 
83  return;
84  }
85 
86 
87 
88 
const int kNbColEMCALthird
const int kTabNbCol[4]
const int kNbRowMax
TCanvas * c
Definition: TestFitELoss.C:172
const int kNbSMtot
const int kNbSMEMCAL
int SMdetType[]
const int kNbRowEMCAL
const int kNbColOffsetDCAL
int Int_t
Definition: External.C:63
float Float_t
Definition: External.C:68
void ConvertOCDBtoText(void)
const int kNbRowDCAL
char detTypeString[][100]
const int kNbRowDCALthird
char SMnumber[][100]
const int kNbColMax
const int kNbSMEMCALthird
const int kNbColDCAL
const int kTabNbRow[4]
const int kNbColEMCAL
int detTypeType[]
const int kNbSMDCALthird
const int kNbRowEMCALthird
const int kNbSMDCAL
const int kTabNbSM[4]
const int kNbColDCALthird
char SMP2Name[][100]