Changes for proof case
authorpanos <panos@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 7 Aug 2007 08:01:59 +0000 (08:01 +0000)
committerpanos <panos@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 7 Aug 2007 08:01:59 +0000 (08:01 +0000)
PWG2/AnalysisMacros/Proof/demoCAF.C
PWG2/AnalysisMacros/Proof/runAnalysis.C

index bc0b714..f026533 100644 (file)
@@ -1,5 +1,5 @@
 //________________________________________________________________________
-void demoCAF(TChain *chain, const char* mode) {
+void demoCAF(TChain *chain, const char *mode="proof") {
   //____________________________________________//
   // Make the analysis manager
   AliAnalysisManager *mgr = new AliAnalysisManager("testAnalysis");
@@ -9,14 +9,15 @@ void demoCAF(TChain *chain, const char* mode) {
   mgr->AddTask(task1);
   // Create containers for input/output
   AliAnalysisDataContainer *cinput1 = mgr->CreateContainer("cchain1",TChain::Class(),AliAnalysisManager::kInputContainer);
-  AliAnalysisDataContainer *coutput1 = mgr->CreateContainer("chist1", TH1::Class(),AliAnalysisManager::kOutputContainer, "Pt.ESD.1.root");
+  AliAnalysisDataContainer *coutput1 = mgr->CreateContainer("chist2", TH1::Class(),AliAnalysisManager::kOutputContainer, "Pt.ESD.1.root");
   //____________________________________________//
-                                                                                                                                              
+
   mgr->ConnectInput(task1,0,cinput1);
   mgr->ConnectOutput(task1,0,coutput1);
+  mgr->SetDebugLevel(2);
   if (mgr->InitAnalysis()) mgr->PrintStatus();
   else return;
-
+  
   mgr->StartAnalysis(mode,chain);
 }                         
                       
index 74022f8..18685b7 100644 (file)
@@ -14,21 +14,27 @@ void runProofESD(const char *selectorfile) {
   //that contains the latest ANALYSIS developments
   gSystem->AddIncludePath("-I\"$ALICE_ROOT/include\"");
   printf("****** Connect to PROOF *******\n");
-  TProof::Open("proof://<username>@lxb6046.cern.ch"); 
+  TProof::Open("proof://pchrist@lxb6046.cern.ch"); 
 
   // Enable the Analysis Package
   gProof->UploadPackage("ESD.par");
   gProof->EnablePackage("ESD");
+  gProof->UploadPackage("AOD.par");
+  gProof->EnablePackage("AOD");
   gProof->UploadPackage("ANALYSIS.par");
   gProof->EnablePackage("ANALYSIS");
+
+  gProof->GetManager()->ShowROOTVersions();
+  gProof->ShowEnabledPackages();
   
   // You should get this macro and the txt file from:
   // http://aliceinfo.cern.ch/Offline/Analysis/CAF/
   gROOT->LoadMacro("CreateESDChain.C");
   TChain* chain = 0x0;
-  chain = CreateESDChain("ESD100_110_v2.txt",10);
+  chain = CreateESDChain("ESD1.txt",100);
 
   gROOT->LoadMacro(selectorfile);
+  gProof->Load(selectorfile);
   gROOT->LoadMacro("demoCAF.C");
   demoCAF(chain,"proof");