Adding includes to make macros MergeMuonLight.C, ReadRecoCocktail.C compilable
authorivana <ivana@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 25 Apr 2007 08:56:57 +0000 (08:56 +0000)
committerivana <ivana@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 25 Apr 2007 08:56:57 +0000 (08:56 +0000)
(Hermine)

MUON/MergeMuonLight.C
MUON/ReadRecoCocktail.C
MUON/loadmacros.C

index 182643e..ad27107 100644 (file)
 //                flistname = name of a text file containing the list of files
 //                            to be merged 
 //                saveAll = boolian that allows/forbids saving of events with no muons
+
+#if !defined(__CINT__) || defined(__MAKECINT__)
+#include "TFile.h"
+#include "TTree.h"
+#include "TClonesArray.h"
+#include "AliMUONTrackLight.h"
+#include "AliMUONPairLight.h"
+#endif
+
+
 void MergeMuonLight(char *foutname="MuonLightMerged.root",char *flistname="lista.lis", Bool_t saveAll = kTRUE){ 
   // up to 2000 input files 
 
@@ -44,7 +54,7 @@ void MergeMuonLight(char *foutname="MuonLightMerged.root",char *flistname="lista
   while (!outflag) { 
     if (fscanf(pf,"%s",filename)==1) { 
       file[nfiles++] = new TFile (filename); 
-      cout << "Opening for input " << filename << endl;
+      printf("Opening for input %s", filename);
     }
     else outflag = 1; 
   }
index 8d75d84..b3c43a5 100644 (file)
 // base macro to read the trees generated with DecodeRecoCocktail.C 
 // 
 
+#if !defined(__CINT__) || defined(__MAKECINT__)
+#include "TFile.h"
+#include "TTree.h"
+#include "TCanvas.h"
+#include "TClonesArray.h"
+
+#include "AliMUONTrackLight.h"
+#include "AliMUONPairLight.h"
+#endif
+
 void ReadRecoCocktail(char* fname="./MuonLight.root"){ 
   TFile *file = new TFile(fname); 
   TClonesArray *muonArray   = new TClonesArray("AliMUONTrackLight",100); 
@@ -31,11 +41,11 @@ void ReadRecoCocktail(char* fname="./MuonLight.root"){
   Int_t ndimuUncorr=0; 
   for (Int_t iev=0; iev<nev; iev++) { 
     tree->GetEvent(iev); 
-    Int_t nmu = muonArray->GetEntries(); 
-    for (Int_t imu=0; imu<nmu; imu++) { 
-      AliMUONTrackLight *mu = (AliMUONTrackLight*) muonArray->At(imu); 
-      //      mu->Dump(); 
-    }
+//     Int_t nmu = muonArray->GetEntries(); 
+//     for (Int_t imu=0; imu<nmu; imu++) { 
+//       AliMUONTrackLight *mu = (AliMUONTrackLight*) muonArray->At(imu); 
+//       mu->Dump(); 
+//     }
     Int_t ndimu = dimuonArray->GetEntriesFast(); 
     for (Int_t idimu=0; idimu<ndimu; idimu++) { 
       AliMUONPairLight *dimu = (AliMUONPairLight*) dimuonArray->At(idimu); 
index 0481720..8d3067e 100644 (file)
@@ -18,8 +18,8 @@
 // Macro which loads and compiles the MUON macros:
 //
 // DecodeRecoCocktail.C          - ok, comp,  README; Hermine, Alessandro
-// ReadRecoCocktail.C            - ok, x,     README; Hermine, Alessandro
-// MergeMuonLight.C              - x,  x,     README; Hermine, Alessandro
+// ReadRecoCocktail.C            - ok, comp,  README; Hermine, Alessandro
+// MergeMuonLight.C              - x,  comp,  README; Hermine, Alessandro
 // MakeMUONFullMisAlignment.C    - ok, comp,  README; Javier, Ivana
 // MakeMUONResMisAlignment.C     - ok, comp,  README; Javier, Ivana
 // MakeMUONZeroMisAlignment.C    - ok, comp,  README; Javier, Ivana
@@ -93,8 +93,8 @@ void loadmacros ()
   // Load macros
   //
   gROOT->LoadMacro("$ALICE_ROOT/MUON/DecodeRecoCocktail.C++");      
-  // gROOT->LoadMacro("$ALICE_ROOT/MUON/ReadRecoCocktail.C++");     
-  // gROOT->LoadMacro("$ALICE_ROOT/MUON/MergeMuonLight.C++");       
+  gROOT->LoadMacro("$ALICE_ROOT/MUON/ReadRecoCocktail.C++");     
+  gROOT->LoadMacro("$ALICE_ROOT/MUON/MergeMuonLight.C++");       
   gROOT->LoadMacro("$ALICE_ROOT/MUON/MakeMUONFullMisAlignment.C++");
   gROOT->LoadMacro("$ALICE_ROOT/MUON/MakeMUONResMisAlignment.C++"); 
   gROOT->LoadMacro("$ALICE_ROOT/MUON/MakeMUONZeroMisAlignment.C++");