Writing histograms to file is temporarily disabled.
authorpolicheh <policheh@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 6 Apr 2010 10:03:55 +0000 (10:03 +0000)
committerpolicheh <policheh@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 6 Apr 2010 10:03:55 +0000 (10:03 +0000)
PHOS/PHOSGAINda.cxx

index 75a882d..803281f 100644 (file)
@@ -301,30 +301,30 @@ int main(int argc, char **argv) {
   
   //Write the Total file (accumulated statistics for number of runs)
   sprintf(totfile,"PHOS_Calib_Total.root");
-  TFile * ftot = new TFile(totfile,"update");
+  TFile * ftot = new TFile(totfile,"recreate");
   
-  if (!ftot->IsZombie()){
-    printf("Updating file %s.\n",ftot->GetName());
+//   if (!ftot->IsZombie()){
+//     printf("Updating file %s.\n",ftot->GetName());
 
-    for(Int_t iMod=0; iMod<5; iMod++) {
-      if(!dAs[iMod]) continue;
+//     for(Int_t iMod=0; iMod<5; iMod++) {
+//       if(!dAs[iMod]) continue;
     
-      printf("DA1 for module %d detected.\n",iMod);
+//       printf("DA1 for module %d detected.\n",iMod);
     
-      for(Int_t iX=0; iX<64; iX++) {
-       for(Int_t iZ=0; iZ<56; iZ++) {
+//       for(Int_t iX=0; iX<64; iX++) {
+//     for(Int_t iZ=0; iZ<56; iZ++) {
        
-         for(Int_t iGain=0; iGain<2; iGain++) {
-           sprintf(h2name,"%d_%d_%d_%d",iMod,iX,iZ,iGain);
-           TH2F* h2tot = (TH2F*)ftot->Get(h2name);
-           const TH2F* h2run = dAs[iMod]->GetTimeEnergyHistogram(iX,iZ,iGain); // Time vs Energy
-           if(!h2tot && h2run) h2run->Write();
-           if(h2tot && h2run) { h2tot->Add(h2run); h2tot->Write(h2tot->GetName(),TObject::kWriteDelete); }
-         }
-       }
-      }
-    }
-  }
+//       for(Int_t iGain=0; iGain<2; iGain++) {
+//         sprintf(h2name,"%d_%d_%d_%d",iMod,iX,iZ,iGain);
+//         TH2F* h2tot = (TH2F*)ftot->Get(h2name);
+//         const TH2F* h2run = dAs[iMod]->GetTimeEnergyHistogram(iX,iZ,iGain); // Time vs Energy
+//         if(!h2tot && h2run) h2run->Write();
+//         if(h2tot && h2run) { h2tot->Add(h2run); h2tot->Write(h2tot->GetName(),TObject::kWriteDelete); }
+//       }
+//     }
+//       }
+//     }
+//   }
   
   ftot->Close();