]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Added switch to read from AliReaderESDtree (C.Finck)
authorskowron <skowron@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 2 Nov 2004 13:13:03 +0000 (13:13 +0000)
committerskowron <skowron@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 2 Nov 2004 13:13:03 +0000 (13:13 +0000)
ANALYSIS/WriteAOD.C

index e17b947eeebd867cdc31d92bfdf1326cee02b9c4..7c0af706bf167001e52626d34d39dca211adcedd 100644 (file)
@@ -2,6 +2,7 @@
   #include "$(ALICE_ROOT)/TPC/alles.h"
   #include "AliReader.h"
   #include "AliReaderKineTree.h"
+  #include "AliReaderESDTree.h"
   #include "AliAODParticleCut.h"
   #include "AliAOD.h"
   #include "AliAODPairCut.h"
@@ -76,6 +77,7 @@ void WriteAOD(Option_t* datatype, Int_t first = -1,Int_t last = -1,
   AliReader* reader;
   Int_t kine = strcmp(datatype,"Kine");
   Int_t ESD = strcmp(datatype,"ESD");
+  Int_t ESDMuon = strcmp(datatype,"ESDMuon");
   Int_t intern = strcmp(datatype,"AOD");
 
   if(!kine)
@@ -101,6 +103,21 @@ void WriteAOD(Option_t* datatype, Int_t first = -1,Int_t last = -1,
     reader = new AliHBTReaderAOD("AOD.root");
     multcheck = kTRUE;
    }
+
+  else if (!ESDMuon)
+   {
+     // set reader for ESD
+     AliReaderESDTree* muonreader = new AliReaderESDTree("AliESDs.root");
+     // active muon ESD reader
+     muonreader->SetReadMuon(kTRUE);
+     // disable central barrel (default = kTRUE)
+     muonreader->SetReadCentralBarrel(kFALSE);
+     // disable simulated data (not implemented yet)
+     muonreader->ReadSimulatedData(kFALSE);
+
+     reader = muonreader;
+     multcheck = kFALSE;
+   }
   else
    {
     cerr<<"Option "<<datatype<<"  not recognized. Exiting"<<endl;