]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
count correctly the number of libraries
authoragheata <agheata@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 8 Nov 2011 12:16:03 +0000 (12:16 +0000)
committeragheata <agheata@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 8 Nov 2011 12:16:03 +0000 (12:16 +0000)
ANALYSIS/AliAnalysisTaskCfg.cxx
ANALYSIS/TenderSupplies/AddTaskTender.C
ANALYSIS/examples/AliAnalysisTaskEx01.cxx
ANALYSIS/examples/runEx01.C

index 3136825b367740f72c836c7c276091a9cf27df77..c38ba0140fff10d430e07b2b32eb5bd70d16055b 100644 (file)
@@ -243,7 +243,9 @@ Int_t AliAnalysisTaskCfg::GetNlibs() const
 {
 // Returns number of requested libraries.
    if (fLibs.IsNull()) return 0;
-   Int_t nlibs = fLibs.CountChar(',')+1;
+   TObjArray *list  = fLibs.Tokenize(",");
+   Int_t nlibs = list->GetEntriesFast();
+   delete list;
    return nlibs;
 }
 
index fb6706bb164560cd5d4aa3ea378e1e80640c5707..8fa9ae652c5fd091e2aab8dafe00323052d07c2b 100644 (file)
@@ -26,21 +26,26 @@ AliAnalysisTask *AddTaskTender(Bool_t useV0=kFALSE){
   }   
   
   //========= Attach VZERO supply ======
+/*
   if (useV0) {
      AliVZEROTenderSupply *vzeroSupply=new AliVZEROTenderSupply("VZEROtender");
      vzeroSupply->SetDebug(kFALSE);
      tender->AddSupply(vzeroSupply);
   }   
+*/
+
+/*  
   //========= Attach TPC supply ======
   AliTPCTenderSupply *tpcSupply=new AliTPCTenderSupply("TPCtender");
   tpcSupply->SetDebugLevel(2);
   //tpcSupply->SetMip(50.);
   tender->AddSupply(tpcSupply);
-
+*/
   //========= Attach TOF supply ======
   AliTOFTenderSupply *tofTender = new AliTOFTenderSupply("TOFtender");
   tender->AddSupply(tofTender);
-  
+
+/*  
   //========= Attach TRD supply ======
   AliTRDTenderSupply *trdSupply=new AliTRDTenderSupply("TRDtender");
   trdSupply->SetLoadReferencesFromCDB();
@@ -71,7 +76,7 @@ AliAnalysisTask *AddTaskTender(Bool_t useV0=kFALSE){
 
   //========= Attach Primary Vertex supply ======
   tender->AddSupply(new AliVtxTenderSupply("PriVtxtender"));
-  
+*/  
   //================================================
   //              data containers
   //================================================
index e29ae124a0c9d1c2b68c18c3358c374088fc2f69..f09585a8f6879c49b4ec0db1104056ae2b4ccf9d 100644 (file)
@@ -156,6 +156,7 @@ void AliAnalysisTaskEx01::UserExec(Option_t *)
         
         
     // Create pointer to reconstructed event
+    return;
     AliVEvent *event = InputEvent();
     if (!event) { Printf("ERROR: Could not retrieve event"); return; }
 
@@ -238,7 +239,7 @@ void AliAnalysisTaskEx01::Terminate(Option_t *)
 {
     // Draw result to screen, or perform fitting, normalizations
     // Called once at the end of the query
-        
+    return;    
     fOutput = dynamic_cast<TList*> (GetOutputData(1));
     if(!fOutput) { Printf("ERROR: could not retrieve TList fOutput"); return; }
         
index d932bdb34a27d80b82812e222013cb024f49f878..3871018c8ec2a7a2a8ea1732564288bd8f72901f 100644 (file)
@@ -8,12 +8,12 @@
 class AliAnalysisGrid;
 
 //______________________________________________________________________________
-void run(
-         const char* runtype = "proof", // local, proof or grid
-         const char *gridmode = "full", // Set the run mode (can be "full", "test", "offline", "submit" or "terminate"). Full & Test work for proof
+void runEx01(
+         const char* runtype = "local", // local, proof or grid
+         const char *gridmode = "test", // Set the run mode (can be "full", "test", "offline", "submit" or "terminate"). Full & Test work for proof
          const bool bMCtruth = 0, // 1 = MCEvent handler is on (MC truth), 0 = MCEvent handler is off (MC reconstructed/real data)
          const bool bMCphyssel = 0, // 1 = looking at MC truth or reconstructed, 0 = looking at real data
-         const Long64_t nentries = 2000, // for local and proof mode, ignored in grid mode. Set to 1234567890 for all events.
+         const Long64_t nentries = 50000000, // for local and proof mode, ignored in grid mode. Set to 1234567890 for all events.
          const Long64_t firstentry = 0, // for local and proof mode, ignored in grid mode
          const char *proofdataset = "/alice/data/LHC10c_000120821_p1", // path to dataset on proof cluster, for proof analysis
          const char *proofcluster = "alice-caf.cern.ch", // which proof cluster to use in proof mode
@@ -38,6 +38,7 @@ void run(
     gSystem->Load("libESD.so");
     gSystem->Load("libAOD.so");
     gSystem->Load("libANALYSIS.so");
+    gSystem->Load("libOADB.so");
     gSystem->Load("libANALYSISalice.so");
   
     // add aliroot indlude path
@@ -51,10 +52,14 @@ void run(
     AliAnalysisGrid *plugin = CreateAlienHandler(taskname, gridmode, proofcluster, proofdataset); 
     mgr->SetGridHandler(plugin);
     
-    AliVEventHandler* esdH = new AliESDInputHandler();
-    mgr->SetInputEventHandler(esdH);
+//    AliVEventHandler* iH = new AliESDInputHandler();
+    AliAODInputHandler* iH = new AliAODInputHandler();
+//    iH->SetInactiveBranches("tracks. vertices. v0s. cascades. jets. caloClusters. fmdClusters. pmdClusters. dimuons. AliAODZDC");
+    iH->SetInactiveBranches("*");
+//    iH->SetCheckStatistics(kTRUE);
+    mgr->SetInputEventHandler(iH);
         
-    // mc event handler
+    // mc event handlerrunEx01.C
     if(bMCtruth) {
         AliMCEventHandler* mchandler = new AliMCEventHandler();
         // Not reading track references
@@ -93,14 +98,14 @@ void run(
     // For this case, comment out the task->SelectCol.... line, 
     // and see AliBasicTask.cxx UserExec() function for details on this.
 
-    gROOT->LoadMacro("$ALICE_ROOT/ANALYSIS/macros/AddTaskPhysicsSelection.C");
-    AliPhysicsSelectionTask *physSelTask = AddTaskPhysicsSelection(bMCphyssel);
-    if(!physSelTask) { Printf("no physSelTask"); return; }
+//    gROOT->LoadMacro("$ALICE_ROOT/ANALYSIS/macros/AddTaskPhysicsSelection.C");
+//    AliPhysicsSelectionTask *physSelTask = AddTaskPhysicsSelection(bMCphyssel);
+//    if(!physSelTask) { Printf("no physSelTask"); return; }
     //AliPhysicsSelection *physSel = physSelTask->GetPhysicsSelection();
     //physSel->AddCollisionTriggerClass("+CINT1B-ABCE-NOPF-ALL");// #3119 #769");
                 
     // create task
-    gROOT->LoadMacro("AliAnalysisTaskEx01.cxx++g");
+    gROOT->LoadMacro("AliAnalysisTaskEx01.cxx+g");
     AliAnalysisTaskSE* task = new AliAnalysisTaskEx01(taskname);
     task->SelectCollisionCandidates(AliVEvent::kMB); // if physics selection performed in UserExec(), this line should be commented
     mgr->AddTask(task);
@@ -118,6 +123,7 @@ void run(
         
     // enable debug printouts
     mgr->SetDebugLevel(2);
+    mgr->SetNSysInfo(100);
     if (!mgr->InitAnalysis()) return;
     mgr->PrintStatus();
   
@@ -135,10 +141,11 @@ AliAnalysisGrid* CreateAlienHandler(const char *taskname, const char *gridmode,
 
     // Set versions of used packages
     plugin->SetAPIVersion("V1.1x");
-    plugin->SetROOTVersion("v5-27-06b");
-    plugin->SetAliROOTVersion("v4-21-08-AN");
+    plugin->SetROOTVersion("v5-28-00d");
+    plugin->SetAliROOTVersion("v4-21-25-AN-1");
 
     // Declare input data to be processed.
+    plugin->SetCheckCopy(kFALSE);
 
     // Method 1: Create automatically XML collections using alien 'find' command.
     // Define production directory LFN
@@ -148,12 +155,17 @@ AliAnalysisGrid* CreateAlienHandler(const char *taskname, const char *gridmode,
     // Set data search pattern
     //plugin->SetDataPattern("*ESDs.root"); // THIS CHOOSES ALL PASSES
     // Data pattern for reconstructed data
-    plugin->SetDataPattern("*ESDs/pass2/*ESDs.root"); // CHECK LATEST PASS OF DATA SET IN ALIENSH
+//    plugin->SetDataPattern("*ESDs/pass2/*ESDs.root"); // CHECK LATEST PASS OF DATA SET IN ALIENSH
+    plugin->SetDataPattern("ESDs/pass2/AOD038/*AliAOD.root"); // CHECK LATEST PASS OF DATA SET IN ALIENSH
     plugin->SetRunPrefix("000");   // real data
     // ...then add run numbers to be considered
-    plugin->AddRunNumber(115514);
+    Int_t runlist[15]={117039, 146859, 146858, 146856, 146824, 146817, 146806, 146805, 146804, 146803, 146802, 146801, 146748, 146747, 146746};  
+    for (Int_t ind=0; ind<1; ind++) {
+//     plugin->AddRunNumber(138275);
+      plugin->AddRunNumber(runlist[ind]);
+    }
     //plugin->SetRunRange(114917,115322);
-    plugin->SetNrunsPerMaster(1);
+    plugin->SetNrunsPerMaster(10); // 1
     plugin->SetOutputToRunNo();
     // comment out the next line when using the "terminate" option, unless
     // you want separate merged files for each run
@@ -237,10 +249,12 @@ AliAnalysisGrid* CreateAlienHandler(const char *taskname, const char *gridmode,
     // May request ClearPackages (individual ClearPackage not supported)
     plugin->SetClearPackages(kFALSE);
     // Plugin test mode works only providing a file containing test file locations, used in "local" mode also
-    plugin->SetFileForTestMode("files.txt"); // file should contain path name to a local directory containg *ESDs.root etc
+    plugin->SetFileForTestMode("filesaod.txt"); // file should contain path name to a local directory containg *ESDs.root etc
     // Request connection to alien upon connection to grid
     plugin->SetProofConnectGrid(kFALSE);
-
+    // Other PROOF specific parameters
+    plugin->SetProofParameter("PROOF_UseMergers","-1");
+    printf("Using: PROOF_UseMergers   : %s\n", plugin->GetProofParameter("PROOF_UseMergers"));
     return plugin;
 }