当前位置: 首页>>代码示例>>C++>>正文


C++ AliAnalysisManager::SetDebugLevel方法代码示例

本文整理汇总了C++中AliAnalysisManager::SetDebugLevel方法的典型用法代码示例。如果您正苦于以下问题:C++ AliAnalysisManager::SetDebugLevel方法的具体用法?C++ AliAnalysisManager::SetDebugLevel怎么用?C++ AliAnalysisManager::SetDebugLevel使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在AliAnalysisManager的用法示例。


在下文中一共展示了AliAnalysisManager::SetDebugLevel方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: runProofFwdDetsQA

void runProofFwdDetsQA(const char * dataset = "/COMMON/COMMON/LHC09a4_run8101X",Long64_t nentries=100000, Long64_t firstentry=0)
{
  gSystem->Load("libANALYSIS");
  gSystem->Load("libANALYSISalice");
  gSystem->AddIncludePath("-I$ALICE_ROOT/include");

  // Connect to Proof
  gEnv->SetValue("XSec.GSI.DelegProxy","2");
  TProof::Open("cheshkov:[email protected]");

  // Upload and enable packages: please use the correct version!
  gProof->UploadPackage("/afs/cern.ch/alice/caf/sw/ALICE/PARs/v4-16-Release/AF-v4-16");
  gProof->EnablePackage("/afs/cern.ch/alice/caf/sw/ALICE/PARs/v4-16-Release/AF-v4-16");

  // Create the analysis manager
  AliAnalysisManager *mgr = new AliAnalysisManager("AliAnaFwdDetsQA");

  AliVEventHandler* esdH = new AliESDInputHandler();
  mgr->SetInputEventHandler(esdH);

  // Enable MC event handler
  AliVEventHandler* handler = new AliMCEventHandler;
  mgr->SetMCtruthEventHandler(handler);

  // Create task

  gProof->Load(Form("%s/PWGPP/AliAnaFwdDetsQA.cxx++g",
		    gSystem->Getenv("ALICE_ROOT")));
  AliAnalysisTask *task = new AliAnaFwdDetsQA("AliAnaFwdDetsQA");

  // Add task
  mgr->AddTask(task);

  // Create containers for input/output
  AliAnalysisDataContainer *cinput = mgr->GetCommonInputContainer();
  AliAnalysisDataContainer *coutput = 
    mgr->CreateContainer("coutput", TList::Class(), 
    AliAnalysisManager::kOutputContainer, "FwdDetsQA.root");

  // Connect input/output
  mgr->ConnectInput(task, 0, cinput);
  mgr->ConnectOutput(task, 1, coutput);


  // Enable debug printouts
  mgr->SetDebugLevel(3);

  if (!mgr->InitAnalysis())
    return;

  mgr->PrintStatus();

  TFileCollection *proofColl = gProof->GetDataSet(dataset);
  TChain *chain = new TChain("esdTree");
  chain->AddFileInfoList((TCollection*)(proofColl->GetList()));
  mgr->StartAnalysis("proof", chain, nentries, firstentry);

    //  mgr->StartAnalysis("proof",dataset,nentries,firstentry);
}
开发者ID:ktf,项目名称:AliPhysics,代码行数:59,代码来源:runProofFwdDetsQA.C

示例2: runProofT0analysis

void runProofT0analysis(const char * dataset = "/COMMON/COMMON/LHC09a4_10TeV_200k#esdTree",Long64_t nentries=20000, Long64_t firstentry=0)
{
// Connect to Proof
  TProof::Open("proof://[email protected]"); 
  //TProof::Open("lxb6046");

  // Upload and enable packages: please use the correct version!
  gProof->UploadPackage("AF-v4-16");
  gProof->EnablePackage("AF-v4-16");
  gProof->ShowDataSets();      
 
  // Create the analysis manager
  AliAnalysisManager *mgr = new AliAnalysisManager("AliT0MultiplicityTask");

  AliVEventHandler* esdH = new AliESDInputHandler();
  mgr->SetInputEventHandler(esdH);

  // Enable MC event handler
  AliVEventHandler* handler = new AliMCEventHandler;
  mgr->SetMCtruthEventHandler(handler);

  // Create task
  //  gProof->Load("AliMCComparisonTrack.cxx++g");
  gProof->Load("AliT0MultiplicityTask.cxx++g");
  AliAnalysisTask *task = new AliT0MultiplicityTask("AliT0MultiplicityTask");

  // Add task
  mgr->AddTask(task);

  // Create containers for input/output
  AliAnalysisDataContainer *cinput = 
    mgr->CreateContainer("cchain", TChain::Class(), AliAnalysisManager::kInputContainer);
  AliAnalysisDataContainer *coutput = 
    mgr->CreateContainer("coutput", TList::Class(), 
    AliAnalysisManager::kOutputContainer, "MultHist.root");

  // Connect input/output
  mgr->ConnectInput(task, 0, cinput);
  mgr->ConnectOutput(task, 1, coutput);


  // Enable debug printouts
  mgr->SetDebugLevel(3);

  if (!mgr->InitAnalysis())
    return;

  mgr->PrintStatus();

   mgr->StartAnalysis("proof",dataset,nentries,firstentry);
}
开发者ID:alisw,项目名称:AliRoot,代码行数:51,代码来源:runProofT0analysis.C

示例3: rundStarTask

void rundStarTask(const char* mode = "test", bool isMC=true){
  // Include AliPhysics and AliRoot libraries
  gSystem->AddIncludePath("-I$ALICE_ROOT/include -I$ALICE_PHYSICS/include");
  //Check the run mode
  if(std::strcmp(mode,"local")!=0 && std::strcmp(mode,"grid")!=0 && std::strcmp(mode,"test")!=0){
    Printf("\n\tIncorrect run option, check first argument of run macro");
    Printf("\tmode = local, test or grid\n");
    return;
  }
  Printf("%s analysis chosen",mode);
  //Define the plugin
  AliAnalysisGrid *plugin = 0x0;
  TChain *chain = 0x0;
  if(std::strcmp(mode,"local")!=0) {
    plugin = CreateAlienHandler(mode,isMC);
    if(!plugin) return;
  }
  else {
    gROOT->LoadMacro("$ALICE_PHYSICS/PWG/EMCAL/macros/CreateAODChain.C");
    chain = CreateAODChain("localdata.txt");
  }
  // Create the analysis manager
  AliAnalysisManager *mgr = new AliAnalysisManager(kTaskName);
  if(plugin) mgr->SetGridHandler(plugin);
  // Define input handlers
  if(isMC){
    AliMCEventHandler*  mcHandler = new AliMCEventHandler();
    if (plugin) mgr->SetMCtruthEventHandler(mcHandler);
  }
  AliAODInputHandler *aodH = new AliAODInputHandler();
  mgr->SetInputEventHandler(aodH);
  // Compile the class
  gROOT->LoadMacro("AliAnalysisTaskdStar.cxx++g");
  // PID response
  gROOT->LoadMacro("$ALICE_ROOT/ANALYSIS/macros/AddTaskPIDResponse.C");
  AliAnalysisTaskPIDResponse *pidTask = AddTaskPIDResponse(isMC); // useMC
  // dStar task
  gROOT->LoadMacro("AddTaskdStar.C");
  AliAnalysisTaskdStar *task = AddTaskdStar(isMC);
  // Disbale debug printouts
  mgr->SetDebugLevel(3);
  AliLog::SetGlobalLogLevel(AliLog::kFatal);
  AliLog::SetGlobalDebugLevel(0);
  if (!mgr->InitAnalysis()) return;
  mgr->PrintStatus();
  // Start analysis in grid.
  if (std::strcmp(mode,"local")==0)
    mgr->StartAnalysis(mode,chain);
  else
    mgr->StartAnalysis("grid");
}
开发者ID:ktf,项目名称:AliPhysics,代码行数:51,代码来源:rundStarTask.C

示例4: runProofTRDComparison

void runProofTRDComparison(const char *dataset="/PWG0/COMMON/run30000X_10TeV_0.5T",Long64_t nentries=1000, Long64_t firstentry=0)
{
  // Connect to Proof
  TProof::Open("lxb6046");

  // Upload and enable packages: please use the correct version!
  gProof->UploadPackage("AF-v4-14");
  gProof->EnablePackage("AF-v4-14");

  // Create the analysis manager
  AliAnalysisManager *mgr = new AliAnalysisManager("AliTRDComparison");

  AliVEventHandler* esdH = new AliESDInputHandler();
  mgr->SetInputEventHandler(esdH);

  // Enable MC event handler
  AliVEventHandler* handler = new AliMCEventHandler;
  mgr->SetMCtruthEventHandler(handler);

  // Create task
  gProof->Load("AliMCComparisonTrack.cxx++g");
  gProof->Load("AliTRDComparisonTask.cxx++g");
  AliAnalysisTask *task = new AliTRDComparisonTask("AliTRDComparisonTask");

  // Add task
  mgr->AddTask(task);

  // Create containers for input/output
  AliAnalysisDataContainer* cinput = mgr->GetCommonInputContainer();
  AliAnalysisDataContainer* coutput = 
    mgr->CreateContainer("coutput", TList::Class(), 
    AliAnalysisManager::kOutputContainer, "AliTRDComparisonHist.root");

  // Connect input/output
  mgr->ConnectInput(task, 0, cinput);
  mgr->ConnectOutput(task, 1, coutput);


  // Enable debug printouts
  mgr->SetDebugLevel(3);

  if (!mgr->InitAnalysis())
    return;

  mgr->PrintStatus();

  mgr->StartAnalysis("proof",dataset,nentries,firstentry);
}
开发者ID:ktf,项目名称:AliPhysics,代码行数:48,代码来源:runProofTRDComparison.C

示例5: TaskBuzzer

void TaskBuzzer(UInt_t config, const char *collection="wn.xml") 
{
  printf("Running buzzer with: %s\n", ConfigName(config));
  TGrid::Connect("alien://");
  if (!gGrid || !gGrid->IsConnected()) {
    ::Error("PilotAnalysis", "No grid connection");
    return;
  }
  TChain *chain = CreateChain(collection, "ESD");
  // Load libraries
  gSystem->SetIncludePath("-I. -I$ROOTSYS/include -I$ALICE_ROOT/include -I$ALICE_ROOT -I$ALICE_ROOT/ITS -I$ALICE_ROOT/TRD");
  LoadLibraries();
  // Create manager
  AliAnalysisManager *mgr  = new AliAnalysisManager("ESDfiltering", "Production train");
  mgr->SetNSysInfo(100);
  // Input handler
  AliESDInputHandlerRP *esdHandler = new AliESDInputHandlerRP();
//  AliESDInputHandler *esdHandler = new AliESDInputHandler();
  esdHandler->SetReadFriends(kTRUE);
  esdHandler->SetActiveBranches("ESDfriend");
  mgr->SetInputEventHandler(esdHandler);
  if (config & kAOD) {
     // AOD output handler
     AliAODHandler* aodHandler   = new AliAODHandler();
     aodHandler->SetOutputFileName("AliAOD.root");
     if (!mergeExcludes.IsNull()) mergeExcludes += " ";
     mergeExcludes += "AliAOD.root";
     mgr->SetOutputEventHandler(aodHandler);
  }   
  // AnalysisTasks
  AddAnalysisTasks(config);

  mgr->SetDebugLevel(1);
  if (mgr->InitAnalysis()) {                                                                                                              
    mgr->PrintStatus(); 
    mgr->StartAnalysis("local", chain);
  }  
} 
开发者ID:alisw,项目名称:AliRoot,代码行数:38,代码来源:TaskBuzzer.C

示例6: runCPVAnalysis

void runCPVAnalysis(const char *runmode = "full")
{
    // set if you want to run the analysis locally (kTRUE), or on grid (kFALSE)
    // Bool_t local = kFALSE;
     Bool_t local = kTRUE;
    // if you run on grid, specify test mode (kTRUE) or full grid model (kFALSE)
    // Bool_t gridTest = kTRUE;
    Bool_t gridTest = kFALSE;
    
    // since we will compile a class, tell root where to look for headers  
    gROOT->ProcessLine(".include $ROOTSYS/include");
    gROOT->ProcessLine(".include $ALICE_ROOT/include");

    // create the analysis manager
    AliAnalysisManager *mgr = new AliAnalysisManager("AnalysisTaskCPV");
    AliESDInputHandler *esdH = new AliESDInputHandler();
    mgr->SetInputEventHandler(esdH);


    //PID task
    gROOT->LoadMacro("$ALICE_ROOT/ANALYSIS/macros/AddTaskPIDResponse.C");
    AliAnalysisTask *taskPID =  AddTaskPIDResponse(/*Bool_t isMC=*/ kFALSE, /*Bool_t autoMCesd=*/kTRUE,
						   /*Bool_t tuneOnData=*/kTRUE);
    
    // // Add physics selection
    gROOT->LoadMacro("$ALICE_PHYSICS/OADB/macros/AddTaskPhysicsSelection.C");
    AliPhysicsSelectionTask* physSelTask = AddTaskPhysicsSelection();
    physSelTask->GetPhysicsSelection()->SetUseBXNumbers(kFALSE);// ---> ???
    
    // load the addtask macro
    gROOT->LoadMacro("AddTaskCPV.C");
    // create an instance of your analysis task
    AliAnalysisTaskCPV *task = AddTaskCPV();
    task->SetRCPV(428.3);
    task->SelectCollisionCandidates(AliVEvent::kINT7);

    if(!mgr->InitAnalysis()) return;
    mgr->SetDebugLevel(2);
    mgr->PrintStatus();
    mgr->SetUseProgressBar(1, 25);

    if(local) {
        // if you want to run locally, we need to define some input
        TChain* chain = new TChain("esdTree");
        // add a few files to the chain (change this so that your local files are added)
        TGrid::Connect("alien://");
        chain->Add("alien:///alice/data/2015/LHC15n/000244340/pass2/15000244340020.100/AliESDs.root");
        // start the analysis locally, reading the events from the tchain
        mgr->StartAnalysis("local", chain);
    } else {
        // if we want to run on grid, we create and configure the plugin
        AliAnalysisAlien *alienHandler = new AliAnalysisAlien();
	alienHandler->SetCheckCopy(kFALSE);
        // also specify the include (header) paths on grid
        alienHandler->AddIncludePath("-I. -I$ROOTSYS/include -I$ALICE_ROOT -I$ALICE_ROOT/include -I$ALICE_PHYSICS/include");
        // select the aliphysics version. all other packages
        // are LOADED AUTOMATICALLY!
        alienHandler->SetAliPhysicsVersion("vAN-20170215-1");
        // set the Alien API version
        alienHandler->SetAPIVersion("V1.1x");
        // select the input data
        alienHandler->SetGridDataDir("/alice/data/2015/LHC15n");
        alienHandler->SetDataPattern("/pass2/*/AliESDs.root");

	const Int_t runList[] = {244340, 244343};
	const Int_t nRuns = 2;
	// const Int_t runList[] = {244340, 244343, 244351, 244355, 244359, 
	// 			 244364, 244377, 244411, 244416, 244418, 
	// 			 244421, 244453, 244480, 244481, 244482, 
	// 			 244483, 244484, 244531, 244540, 244542, 
	// 			 244617, 244618, 244627, 244628};
	// const Int_t nRuns = 24;
        // MC has no prefix, data has prefix 000
        alienHandler->SetRunPrefix("000");
        // runnumber
	for (Int_t iRun=0; iRun<nRuns; iRun++) {
	  alienHandler->AddRunNumber(runList[iRun]);
	}
        // number of files per subjob
        alienHandler->SetSplitMaxInputFileNumber(50);
        alienHandler->SetExecutable("CPVTask.sh");
        // specify how many seconds your job may take
        alienHandler->SetTTL(36000);
        alienHandler->SetJDLName("CPVTask.jdl");

        alienHandler->SetOutputToRunNo(kTRUE);
        alienHandler->SetKeepLogs(kTRUE);
        // merging: run with kTRUE to merge on grid
        // after re-running the jobs in SetRunMode("terminate") 
        // (see below) mode, set SetMergeViaJDL(kFALSE) 
        // to collect final results
        alienHandler->SetMaxMergeStages(2);
        alienHandler->SetMergeViaJDL(kTRUE);

        // define the output folders
        alienHandler->SetGridWorkingDir("CPVWorkingDir");
        alienHandler->SetGridOutputDir("CPVOutputDir_R428");

        // connect the alien plugin to the manager
        mgr->SetGridHandler(alienHandler);
//.........这里部分代码省略.........
开发者ID:ktf,项目名称:AliPhysics,代码行数:101,代码来源:runCPVAnalysis.C

示例7: runLocalSim


//.........这里部分代码省略.........
// chain->Add("/media/wd/data/LHC10a/140010/040/AliESDs.root");
// chain->Add("/media/wd/data/LHC10a/140010/053/AliESDs.root");
// chain->Add("/media/wd/data/LHC10a/140010/083/AliESDs.root");
// chain->Add("/media/wd/data/LHC10a/140010/069/AliESDs.root");
// chain->Add("/media/wd/data/LHC10a/140010/016/AliESDs.root");
// chain->Add("/media/wd/data/LHC10a/140010/006/AliESDs.root");
// chain->Add("/media/wd/data/LHC10a/140010/039/AliESDs.root");
// chain->Add("/media/wd/data/LHC10a/140010/077/AliESDs.root");
// chain->Add("/media/wd/data/LHC10a/140010/100/AliESDs.root");
// chain->Add("/media/wd/data/LHC10a/140010/036/AliESDs.root");
// chain->Add("/media/wd/data/LHC10a/140010/003/AliESDs.root");
// chain->Add("/media/wd/data/LHC10a/140010/052/AliESDs.root");
// chain->Add("/media/wd/data/LHC10a/140010/007/AliESDs.root");
// chain->Add("/media/wd/data/LHC10a/140010/009/AliESDs.root");
// chain->Add("/media/wd/data/LHC10a/140010/026/AliESDs.root");
// chain->Add("/media/wd/data/LHC10a/140010/062/AliESDs.root");
// chain->Add("/media/wd/data/LHC10a/140010/030/AliESDs.root");
// chain->Add("/media/wd/data/LHC10a/140010/095/AliESDs.root");
// chain->Add("/media/wd/data/LHC10a/140010/070/AliESDs.root");
// chain->Add("/media/wd/data/LHC10a/140010/027/AliESDs.root");
// chain->Add("/media/wd/data/LHC10a/140010/054/AliESDs.root");
// chain->Add("/media/wd/data/LHC10a/140010/073/AliESDs.root");
// chain->Add("/media/wd/data/LHC10a/140010/022/AliESDs.root");
// chain->Add("/media/wd/data/LHC10a/140010/044/AliESDs.root");
// chain->Add("/media/wd/data/LHC10a/140010/012/AliESDs.root");
// chain->Add("/media/wd/data/LHC10a/140010/056/AliESDs.root");
// chain->Add("/media/wd/data/LHC10a/140010/031/AliESDs.root");
// chain->Add("/media/wd/data/LHC10a/140010/086/AliESDs.root");
// chain->Add("/media/wd/data/LHC10a/140010/023/AliESDs.root");
// chain->Add("/media/wd/data/LHC10a/140010/075/AliESDs.root");
// chain->Add("/media/wd/data/LHC10a/140010/093/AliESDs.root");
// chain->Add("/media/wd/data/LHC10a/140010/005/AliESDs.root");
// chain->Add("/media/wd/data/LHC10a/140010/035/AliESDs.root");
// chain->Add("/media/wd/data/LHC10a/140010/057/AliESDs.root");
// chain->Add("/media/wd/data/LHC10a/140010/019/AliESDs.root");
// chain->Add("/media/wd/data/LHC10a/140010/042/AliESDs.root");
// chain->Add("/media/wd/data/LHC10a/140010/046/AliESDs.root");
// chain->Add("/media/wd/data/LHC10a/140010/048/AliESDs.root");
// chain->Add("/media/wd/data/LHC10a/140010/024/AliESDs.root");
// chain->Add("/media/wd/data/LHC10a/140010/018/AliESDs.root");
// chain->Add("/media/wd/data/LHC10a/140010/014/AliESDs.root");
// chain->Add("/media/wd/data/LHC10a/140010/064/AliESDs.root");
// chain->Add("/media/wd/data/LHC10a/140010/032/AliESDs.root");
// chain->Add("/media/wd/data/LHC10a/140010/104/AliESDs.root");
// chain->Add("/media/wd/data/LHC10a/140010/029/AliESDs.root");
// chain->Add("/media/wd/data/LHC10a/140010/082/AliESDs.root");
// chain->Add("/media/wd/data/LHC10a/140010/058/AliESDs.root");
// chain->Add("/media/wd/data/LHC10a/140010/089/AliESDs.root");
// chain->Add("/media/wd/data/LHC10a/140010/080/AliESDs.root");
// chain->Add("/media/wd/data/LHC10a/140010/101/AliESDs.root");
// chain->Add("/media/wd/data/LHC10a/140010/055/AliESDs.root");
// chain->Add("/media/wd/data/LHC10a/140010/098/AliESDs.root");
// chain->Add("/media/wd/data/LHC10a/140010/096/AliESDs.root");
// chain->Add("/media/wd/data/LHC10a/140010/038/AliESDs.root");
// chain->Add("/media/wd/data/LHC10a/140010/1000/AliESDs.root");
// chain->Add("/media/wd/data/LHC10a/140010/033/AliESDs.root");
// chain->Add("/media/wd/data/LHC10a/140010/094/AliESDs.root");
// chain->Add("/media/wd/data/LHC10a/140010/004/AliESDs.root");
// chain->Add("/media/wd/data/LHC10a/140010/060/AliESDs.root");
// chain->Add("/media/wd/data/LHC10a/140010/076/AliESDs.root");
// chain->Add("/media/wd/data/LHC10a/140010/078/AliESDs.root");
// chain->Add("/media/wd/data/LHC10a/140010/061/AliESDs.root");
// chain->Add("/media/wd/data/LHC10a/140010/090/AliESDs.root");
// chain->Add("/media/wd/data/LHC10a/140010/037/AliESDs.root");
// chain->Add("/media/wd/data/LHC10a/140010/097/AliESDs.root");
// chain->Add("/media/wd/data/LHC10a/140010/099/AliESDs.root");




    // Make the analysis manager
    AliAnalysisManager *mgr = new AliAnalysisManager("TotEtManager");
    AliVEventHandler* esdH = new AliESDInputHandler;
    mgr->SetInputEventHandler(esdH);
    AliMCEventHandler* handler = new AliMCEventHandler;
    handler->SetReadTR(kFALSE);
    mgr->SetMCtruthEventHandler(handler);

    AliAnalysisTaskTotEt *task1 = new AliAnalysisTaskTotEt("TaskTotEt");
    mgr->AddTask(task1);

    // Create containers for input/output
    //AliAnalysisDataContainer *cinput1 = mgr->CreateContainer("cchain1", TChain::Class(),AliAnalysisManager::kInputContainer);
    AliAnalysisDataContainer *cinput1 = mgr->GetCommonInputContainer();

    AliAnalysisDataContainer *coutput1 = mgr->CreateContainer("out1", TList::Class(), AliAnalysisManager::kOutputContainer,"Et.ESD.sim.root");

    //____________________________________________//
    mgr->ConnectInput(task1,0,cinput1);
    mgr->ConnectOutput(task1,1,coutput1);

    mgr->SetDebugLevel(1);

    if (!mgr->InitAnalysis()) return;
    mgr->PrintStatus();
    mgr->StartAnalysis("local",chain);

    timer.Stop();
    timer.Print();
}
开发者ID:odjuvsla,项目名称:physics_analysis,代码行数:101,代码来源:runLocalSim.C

示例8: runGrid

void runGrid() {

  gSystem->Load("libCore.so");
  gSystem->Load("libTree.so");
  gSystem->Load("libGeom.so");
  gSystem->Load("libVMC.so");
  gSystem->Load("libPhysics.so");
  gSystem->Load("libSTEERBase");
  //  gSystem->Load("libESD");
  gSystem->Load("libAOD");
  gSystem->Load("libANALYSIS");
  gSystem->Load("libANALYSISalice");
  gSystem->Load("libTENDER");
  //  gSystem->Load("libPWGPP");

  gROOT->ProcessLine(".include $ALICE_ROOT/include");
  
  gROOT->LoadMacro("CreateAlienHandler.C");
  AliAnalysisGrid *alienHandler = CreateAlienHandler();  
  if (!alienHandler) return;

  cout<<" Got alien handler"<<endl;
  AliAnalysisManager *mgr = new AliAnalysisManager("TestManager");

  mgr->SetGridHandler(alienHandler);

  /*
  // For centrality Selection: Requires input event handler.
  gROOT->LoadMacro("$ALICE_ROOT/ANALYSIS/macros/AddTaskCentrality.C");
  AliCentralitySelectionTask *taskCentrality = AddTaskCentrality();
  taskCentrality->SetPass(2); // remember to set the pass you are processing!!! 
  */
  // My Task
  gROOT->LoadMacro("AliAnalysisFBMultFluct.cxx++g");
  AliAnalysisTask *task = new AliAnalysisFBMultFluct("TaskFBGrid");

  //  task->SelectCollisionCandidates(AliVEvent::kMB) // Added for minbias trigger on 3Jun14
  //  task->SelectCollisionCandidates(AliVEvent::kCentral) // Added for minbias trigger on 3Jun14

  mgr->AddTask(task);

  /*
  AliESDInputHandler* esdH = new AliESDInputHandler;
  mgr->SetInputEventHandler(esdH);
  AliMCEventHandler *mc = new AliMCEventHandler();
  mgr->SetMCtruthEventHandler(mc);
  TChain *chain = new TChain("aodTree");
  //  chain->Add("/Users/sadhanadash/QA/AliESDs.root");
  chain->Add("/Users/rashmi/ALICE/InitFluct/alice/data/2010/LHC11h/000170388/ESDs/pass2_muon/AOD/132/AliAOD.root");
  //  chain->Add("/Users/rashmi/ALICE/InitFluct/alice/data/2011/LHC11h/000170388/ESDs/pass2_muon/AOD/132/AliESDs.root");
  chain->Add("AliESDs.root");
  */

  
  //  AliAODInputHandler* aodH = new AliAODInputHandler;
    AliVEventHandler* aodH = new AliAODInputHandler;
  mgr->SetInputEventHandler(aodH);
  cout<<" SetInputEventHandler"<<endl;
  
  //   TChain *chain = new TChain("aodTree");
   //alice/data/2010/LHC10h/000139510/ESDs/pass2/AOD160/0001
  //chain->Add("AODfile/139510/AliAOD.root");
  //  chain->Add("pass2/137161/1/AliAOD.root");
  //  chain->Add("pass2/137161/2/AliAOD.root");
  // chain->GetListOfFiles()->Print();

  // Create containers for input/output

  AliAnalysisDataContainer *coutput = 
    //     mgr->CreateContainer("coutput", TObjArray::Class(),
    //     mgr->CreateContainer("coutput", TList::Class(),
    //     AliAnalysisManager::kOutputContainer, "MC.AOD.root" );
    mgr->CreateContainer("coutput", TList::Class(),
			 AliAnalysisManager::kOutputContainer, "AOD.DATA.root" );

  AliAnalysisDataContainer *cTree = 
    mgr->CreateContainer("cTree",TTree::Class(),AliAnalysisManager::kOutputContainer,"AOD.DATA.root");
  
  mgr->ConnectInput(task, 0, mgr->GetCommonInputContainer());
  mgr->ConnectOutput(task,1,coutput);
  mgr->ConnectOutput(task,2,cTree);
  /*
  mgr->CreateContainer("cinput",TFile::Class(),1,"AOD.137161.input.root");
  mgr->ConnectInput(task,2,cinput); 
  */
  mgr->SetDebugLevel(1);
  
  if (!mgr->InitAnalysis()) return;
  mgr->PrintStatus();

  cout<<" Starting Analysis now"<<endl;
  //  mgr->StartAnalysis("local",chain);
  mgr->StartAnalysis("grid");
}
开发者ID:ktf,项目名称:AliPhysics,代码行数:94,代码来源:runGrid.C

示例9: RunGrid

//______________________________________________________________________________
void RunGrid(
         const char* runtype = "grid", // 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 Long64_t nentries = 400, // 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
         const char *taskname = "Deuterons2011ESD"
         )
{
  // check run type
  if(runtype != "local" && runtype != "proof" && runtype != "grid"){
    Printf("\n\tIncorrect run option, check first argument of run macro");
    Printf("\tint runtype = local, proof or grid\n");
    return;
  }
  Printf("%s analysis chosen",runtype);
  
  gROOT->ProcessLine(".include $ALICE_ROOT/include");
  
  gSystem->AddIncludePath("-I$ALICE_ROOT/include");
  gSystem->AddIncludePath("-I$ALICE_ROOT/PWGHF/vertexingHF");
  // Load analysis specific libraries
  //=====================================================================
  
  gSystem->SetIncludePath("-I. -I$ROOTSYS/include -I$ALICE_ROOT -I$ALICE_ROOT/include -I$ALICE_ROOT/ITS -I$ALICE_ROOT/TPC -I$ALICE_ROOT/CONTAINERS -I$ALICE_ROOT/STEER/STEER -I$ALICE_ROOT/STEER/STEERBase -I$ALICE_ROOT/STEER/ESD -I$ALICE_ROOT/STEER/AOD -I$ALICE_ROOT/TRD -I$ALICE_ROOT/macros -I$ALICE_ROOT/ANALYSIS  -I$ALICE_ROOT/OADB -I$ALICE_ROOT/PWGHF -I$ALICE_ROOT/PWGHF/base -I$ALICE_ROOT/PWGHF/vertexingHF -I$ALICE_ROOT/PWG/FLOW/Base -I$ALICE_ROOT/PWG/FLOW/Tasks -g");
  
  gSystem->Load("libTree.so");
  gSystem->Load("libGeom.so");
  gSystem->Load("libPhysics.so");
  gSystem->Load("libVMC.so");
  gSystem->Load("libMinuit.so");
  gSystem->Load("libSTEERBase.so");
  gSystem->Load("libESD.so");
  gSystem->Load("libAOD.so");
  gSystem->Load("libANALYSIS.so");
  gSystem->Load("libOADB.so");
  gSystem->Load("libANALYSISalice.so");
  gSystem->Load("libCORRFW.so");
  gSystem->Load("libPWGHFbase.so");
  gSystem->Load("libPWGflowBase.so");
  gSystem->Load("libPWGflowTasks.so");
  gSystem->Load("libPWGHFvertexingHF.so");
  
  // Load analysis specific libraries
  //=====================================================================
  //------ Create AlienPlugin ---------------------
  AliAnalysisGrid *plugin = 0x0;
  TChain *chain = 0x0;
  if (runtype != "local") {
    plugin = CreateAlienHandler(taskname, gridmode, proofcluster, proofdataset);
    if(!plugin) return;
  } else {
    gROOT->LoadMacro("$ALICE_ROOT/PWGCF/Correlations/macros/dphicorrelations/CreateESDChain.C");
    chain = CreateESDChain("ESDs.txt");
  }
  
  //---- Create the analysis manager
  AliAnalysisManager* mgr = new AliAnalysisManager(taskname);
  if(plugin) mgr->SetGridHandler(plugin);
  
  //  Input
  
  AliESDInputHandler* iH = new AliESDInputHandler("handler","handler for my analisys");
  mgr->SetInputEventHandler(iH);
  
  //--------------------------------------------------------------
  // Other tasks

  // Physics selection
  gROOT->LoadMacro("$ALICE_ROOT/ANALYSIS/macros/AddTaskPhysicsSelection.C");
  AliPhysicsSelectionTask *physSel = AddTaskPhysicsSelection(kFALSE); // useMC
  // Centrality selection
  gROOT->LoadMacro("$ALICE_ROOT/ANALYSIS/macros/AddTaskCentrality.C");
  AliCentralitySelectionTask *taskCentr = AddTaskCentrality();
  // PID response
  gROOT->LoadMacro("$ALICE_ROOT/ANALYSIS/macros/AddTaskPIDResponse.C");
  AliAnalysisTaskPIDResponse *pidTask = AddTaskPIDResponse(kFALSE); // useMC
  // PID QA
  gROOT->LoadMacro("$ALICE_ROOT/ANALYSIS/macros/AddTaskPIDqa.C");
  AliAnalysisTaskPIDqa *pidQATask = AddTaskPIDqa();
  
  gROOT->LoadMacro("./AliAnalysisTaskFlowd.cxx+g");//$ALICE_ROOT/PWGLF/STRANGENESS/Cascades/AliAnalysisTaskCheckCascadePbPb.cxx++g");
  gROOT->LoadMacro("./AddTaskFlowd.C");//$ALICE_ROOT/PWGLF/STRANGENESS/Cascades/macros/AddTaskCheckCascadePbPb.C");
  AliAnalysisTaskFlowd *task = AddTaskFlowd(kTRUE);
  

  
  //__________________________________________________________________________
  // Disable debug printouts
  mgr->SetDebugLevel(3);
  AliLog::SetGlobalLogLevel(AliLog::kFatal);
  AliLog::SetGlobalDebugLevel(0);
  
  //__________________________________________________________________________
  if (!mgr->InitAnalysis()) return;
  mgr->PrintStatus();
  // Start analysis in grid.
  if (runtype == "local")
//.........这里部分代码省略.........
开发者ID:mpuccio,项目名称:AnalysisDeuteronFlow,代码行数:101,代码来源:RunGrid.C

示例10: AODtrainsim

//______________________________________________________________________________
void AODtrainsim(Int_t merge=0)
{
  // Main analysis train macro.
  // merge = 0: production
  // merge = 1: intermediate merging
  // merge = 2: final merging + terminate
  // merge = 3: terminate only

  if (merge) {
    TGrid::Connect("alien://");
    if (!gGrid || !gGrid->IsConnected()) {
      ::Error("AODtrainsim.C", "No grid connection");
      return;
    }
  }
  // Set temporary merging directory to current one
  gSystem->Setenv("TMPDIR", gSystem->pwd());
  // Set temporary compilation directory to current one
  gSystem->SetBuildDir(gSystem->pwd(), kTRUE);
  printf("==================================================================\n");
  printf("===========    RUNNING FILTERING TRAIN   ==========\n");
  printf("==================================================================\n");
  printf("=  Configuring analysis train for:                               =\n");
  if (usePhysicsSelection)   printf("=  Physics selection                                                =\n");
  if (iESDfilter)   printf("=  ESD filter                                                    =\n");
  if (iMUONcopyAOD) printf("=  MUON copy AOD                                                 =\n");

  // Load common libraries and set include path
  gSystem->AddIncludePath("-I$ALICE_ROOT/include -I$ALICE_PHYSICS/include");

  // Make the analysis manager and connect event handlers
  AliAnalysisManager *mgr  = new AliAnalysisManager("Analysis Train", "Production train");
  if (useSysInfo) mgr->SetNSysInfo(100);

  // Load ParFiles
  if (!LoadAnalysisLibraries()) {
    ::Error("AODtrainsim.C", "Could not load analysis libraries");
    return;
  }
  
  // Create input handler (input container created automatically)
  // ESD input handler
  AliESDInputHandler *esdHandler = new AliESDInputHandler();
  mgr->SetInputEventHandler(esdHandler);
  // Monte Carlo handler
  if (useMC) {
    AliMCEventHandler* mcHandler = new AliMCEventHandler();
    mgr->SetMCtruthEventHandler(mcHandler);
    mcHandler->SetReadTR(useTR);
  }
  // AOD output container, created automatically when setting an AOD handler
  if (iAODhandler) {
    // AOD output handler
    AliAODHandler* aodHandler   = new AliAODHandler();
    aodHandler->SetOutputFileName("AliAOD.root");
    mgr->SetOutputEventHandler(aodHandler);
  }
  // Debugging if needed
  if (useDBG) mgr->SetDebugLevel(3);

  AddAnalysisTasks(merge);
  if (merge) {
    if (merge < 3) AODmerge();
    if (merge > 1) {
      mgr->InitAnalysis();
      mgr->SetGridHandler(new AliAnalysisAlien());
      mgr->StartAnalysis("grid terminate",0);
    }
    return;
  }
  // Run the analysis
  //
  TChain *chain = CreateChain();
  if (!chain) return;

  TStopwatch timer;
  timer.Start();
  mgr->SetSkipTerminate(kTRUE);
  if (mgr->InitAnalysis()) {
    mgr->PrintStatus();
    mgr->StartAnalysis("local", chain);
  }
  timer.Print();
}
开发者ID:ktf,项目名称:AliPhysics,代码行数:85,代码来源:AODtrainsim.C

示例11: runAAF


//.........这里部分代码省略.........
    //   printf("Unknown task\n");
    //   return;
    // }

    // Connect plugin to the analysis manager
    mgr->SetGridHandler(alienHandler); 
    break;
  case 0: // LOCAL
    // Process data - chain
    AliXRDPROOFtoolkit tool;
    TChain* chain = tool.MakeChain(textFileName,treeName, 0, 100);
    chain->Lookup();
    break;
  default:
    printf("Unknown mode");
    return;
  }
  
  // ESD input handler
  if(esdAna) {

    AliESDInputHandler *esdHandler = new AliESDInputHandler();
    mgr->SetInputEventHandler(esdHandler);
  } else {

    AliAODInputHandler* aodHandler = new AliAODInputHandler();
    mgr->SetInputEventHandler(aodHandler);
  }

  // Monte Carlo handler
  if (analysisMC) {
    AliMCEventHandler* mcHandler = new AliMCEventHandler();
    if(esdAna)
      mgr->SetMCtruthEventHandler(mcHandler);
    mcHandler->SetReadTR(readTR); 
  }

  // Debug if needed
  if (debug) 
    mgr->SetDebugLevel(3);


  // ######### Centrality task ###############  

  cout<<"%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%"<<endl;
  cout<<"esdAna="<<esdAna<<"  runtype="<<runtype<<endl;
    
  // ######### PHYSICS SELECTION ###############
  if (esdAna) { // PC: 17/8-15: this does not work for AODs..... 

    cout << "Adding task physics selection" << endl;
    gROOT->LoadMacro("$ALICE_ROOT/ANALYSIS/macros/AddTaskPhysicsSelection.C");
    AliPhysicsSelectionTask* physSelTask = AddTaskPhysicsSelection();
    if (analysisMC) {
      AliPhysicsSelection* physSel = physSelTask->GetPhysicsSelection();
      physSel->SetAnalyzeMC();
    }
  }

  if(esdAna && runtype==2) { // only for ESD and PbPb

    gROOT->LoadMacro("$ALICE_ROOT/ANALYSIS/macros/AddTaskCentrality.C");
    AliCentralitySelectionTask *taskCentrality = AddTaskCentrality(); 
    //taskCentrality->SetPass(2);
    if (analysisMC)
      taskCentrality->SetMCInput(); 
  }

  // ######### PID task ###############

  if(task == 2) {
    cout << "Loading macro in AliRoot!" << endl;
    gROOT->LoadMacro("$ALICE_PHYSICS/PWGLF/SPECTRA/IdentifiedHighPt/train/macros/AddTask.C");      
    cout << "Adding task!" << endl;
    AliAnalysisTask* taskPid = AddTask(analysisMC, taskname, runtype, kTriggerInt, minCent, maxCent);
  } else {
    cout << "Adding AliAnaTaskV0EffDecomposition" << endl;
    gROOT->LoadMacro("AddTask.C");  
    AliAnalysisTask* taskPid = AddTask(taskname);
  }
  
  // Run the analysis  
  if (mgr->InitAnalysis()){
    mgr->PrintStatus();
    switch(mode){
    case 1: // PROOF
      mgr->StartAnalysis("proof",chain);
      break;
    case 2: // GRID
      mgr->StartAnalysis("grid");
      break;
    case 0:
      mgr->StartAnalysis("local",chain);
      break;
    default:
      printf("Unknown mode\n");
      return;
    }
  } 
}  
开发者ID:ktf,项目名称:AliPhysics,代码行数:101,代码来源:runAAFDev.C

示例12: Embedding


//.........这里部分代码省略.........
    fprintf(stdout,"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n");
  }
  
// set the seed environment variable
  gSystem->Setenv("CONFIG_SEED",sseed);
  gSystem->Setenv("CONFIG_RUN_TYPE","kPythia6"); // kPythia6 or kPhojet^M
  gSystem->Setenv("CONFIG_FIELD","k5kG");      // kNoField or k5kG^M
  gSystem->Setenv("CONFIG_ENERGY","2760");    // 900 or 10000 (GeV)
  gSystem->Setenv("DC_RUN",runNum);    //run number 
  

  char nSimEvents[55] ;
  sprintf(nSimEvents,"%d",chain->GetEntries());
  gSystem->Setenv("SIM_EVENTS",nSimEvents); 
  gSystem->Exec("mv geometry.root geometry_PHOS.root") ;
  gSystem->Exec("aliroot -b -q simrun.C > simrun.log 2>&1");
  gSystem->Exec("mv geometry_PHOS.root geometry.root") ;

  // Make the analysis manager
  AliAnalysisManager *mgr = new AliAnalysisManager("Pi0EmbeddingManager");
  
  // ESD input handler
  AliESDInputHandler* esdH = new AliESDInputHandler();
  esdH->SetReadFriends(kFALSE);
  mgr->SetInputEventHandler(esdH);

  // Output
  AliAODHandler* aodHandler   = new AliAODHandler();
  aodHandler->SetOutputFileName("AliAODout.root");
  mgr->SetOutputEventHandler(aodHandler);

  
  // Debug level
  mgr->SetDebugLevel(0);


  // Add physics selection
  gROOT->LoadMacro("$ALICE_ROOT/OADB/macros/AddTaskPhysicsSelection.C");
  AliPhysicsSelectionTask* physSelTask = AddTaskPhysicsSelection(kFALSE);

  gROOT->LoadMacro("$ALICE_ROOT/OADB/macros/AddTaskCentrality.C");
  AliCentralitySelectionTask *taskCentrality = AddTaskCentrality() ;

  gROOT->LoadMacro("$ALICE_ROOT/ANALYSIS/macros/AddTaskEventplane.C");
  AliEPSelectionTask *taskEP = AddTaskEventplane() ;

  // Add my task
  AliPHOSEmbedding *task1 = new AliPHOSEmbedding("Embedding");

  TChain* chainAOD = new TChain("aodTree");
  chainAOD->AddFile("AliAOD.root") ;
  task1->SetSignalChain(chainAOD) ;
  task1->SelectCollisionCandidates();


  TFile *fOldCalib = TFile::Open("OldCalibration.root");
  if(fOldCalib->IsOpen()){
    printf("\n\n...Adding PHOS calibration used in ESD production \n") ;
    char key[55] ;
    TH2F * hCalib[5] ;
    for(Int_t mod=0;mod<5; mod++){
      sprintf(key,"calibrationMod%d",mod) ;
      hCalib[mod] = (TH2F*)fOldCalib->Get(key) ;
    }
    task1->SetOldCalibration(hCalib) ;
    fOldCalib->Close() ;
开发者ID:ktf,项目名称:AliPhysics,代码行数:67,代码来源:Embedding.C

示例13: runTask

void runTask(Float_t etamax=0.5,const char * incollection = 0, const char * outfile = "dndeta.root", Bool_t skipNorm = kFALSE)
{
  // for running with root only
  gSystem->Load("libTree");
  gSystem->Load("libGeom");
  gSystem->Load("libVMC");
  gSystem->Load("libSTEERBase");
  gSystem->Load("libESD");
  gSystem->Load("libAOD");

  // load analysis framework
  gSystem->Load("libANALYSIS");
  gSystem->Load("libANALYSISalice");


  TChain * chain = new TChain ("TE");
  if (incollection == 0) {
    chain->Add("galice.root");
  }
  else if (TString(incollection).Contains("xml")){
    TGrid::Connect("alien://");
    TAlienCollection * coll = TAlienCollection::Open (incollection);
    while(coll->Next()){
      chain->Add(TString("alien://")+coll->GetLFN());
    }
  } else {
    ifstream file_collect(incollection);
    TString line;
    while (line.ReadLine(file_collect) ) {
      chain->Add(line.Data());
    }
  }
  chain->GetListOfFiles()->Print();

  // for includes use either global setting in $HOME/.rootrc
  // ACLiC.IncludePaths: -I$(ALICE_ROOT)/include
  // or in each macro
  gSystem->AddIncludePath("-I$ALICE_ROOT/include");

  // Create the analysis manager
  AliAnalysisManager *mgr = new AliAnalysisManager("dNdeta");

  AliVEventHandler* esdH = new AliESDInputHandler;
  ((AliESDInputHandler*)esdH)->SetReadFriends(kFALSE);
  mgr->SetInputEventHandler(esdH);

  // Create tasks
  gROOT->LoadMacro("AliAnalysisTaskdNdetaMC.cxx++g");

  AliAnalysisTask *task1 = new AliAnalysisTaskdNdetaMC("TaskdNdeta");
  ((AliAnalysisTaskdNdetaMC*)task1)->SetEtaMax(etamax);
  if (skipNorm) ((AliAnalysisTaskdNdetaMC*)task1)->SkipNormalization();
  // Enable MC event handler

  AliMCEventHandler* handler = new AliMCEventHandler;
  handler->SetReadTR(kFALSE);
  mgr->SetMCtruthEventHandler(handler);

  // Add tasks
  mgr->AddTask(task1);

  // Create containers for input/output
  AliAnalysisDataContainer *cinput = mgr->GetCommonInputContainer();
  AliAnalysisDataContainer *coutput1 = mgr->CreateContainer("coutput", TList::Class(),    AliAnalysisManager::kOutputContainer, outfile);

  // Connect input/output
  mgr->ConnectInput(task1, 0, cinput);
  mgr->ConnectOutput(task1, 1, coutput1);

  // Enable debug printouts
  mgr->SetDebugLevel(0);

  if (!mgr->InitAnalysis()) return;

  mgr->PrintStatus();

  mgr->StartAnalysis("local", chain);
}
开发者ID:ktf,项目名称:AliPhysics,代码行数:78,代码来源:runTask.C

示例14: EmcalJetCDF


//.........这里部分代码省略.........

// kTPC, kTPCfid, kEMCAL, kEMCALfid, kDCAL, kDCALfid, kDCALonly, kDCALonlyfid, kPHOS, kPHOSfid, kUser
const AliEmcalJet::JetAcceptanceType acc_chgjets  = AliEmcalJet::kTPCfid;
const AliEmcalJet::JetAcceptanceType acc_fulljets = AliEmcalJet::kEMCALfid;
//############################################################

// data source name
TString kDataSource (cLocalFiles);

// label of dataset from InputData.C
TString kGridDataSet ("");
if ( ManagerMode == AnalysisType::grid ) { kGridDataSet = kDataSource;}

//############################################################
// SETUP OF TRIGGERS
const AliEmcalPhysicsSelection::EOfflineEmcalTypes mykEMCAL  = AliEmcalPhysicsSelection::kEmcalOk;
const AliVEvent::EOfflineTriggerTypes  mykEMC             = static_cast<AliVEvent::EOfflineTriggerTypes>(AliVEvent::kEMC1 | AliVEvent::kEMC7 | AliVEvent::kEMC8 | AliVEvent::kEMCEJE | AliVEvent::kEMCEGA);
const AliVEvent::EOfflineTriggerTypes  mykEMC_noGA        = static_cast<AliVEvent::EOfflineTriggerTypes>(AliVEvent::kEMC1 | AliVEvent::kEMC7 | AliVEvent::kEMC8 | AliVEvent::kEMCEJE);

const AliVEvent::EOfflineTriggerTypes  mykMB              = AliVEvent::kAnyINT;
const AliVEvent::EOfflineTriggerTypes  mykMB_central      = static_cast<AliVEvent::EOfflineTriggerTypes>(AliVEvent::kAnyINT | AliVEvent::kCentral);
const AliVEvent::EOfflineTriggerTypes  mykMB_semicentral  = static_cast<AliVEvent::EOfflineTriggerTypes>(AliVEvent::kAnyINT | AliVEvent::kSemiCentral);
const AliVEvent::EOfflineTriggerTypes  mykMB_mostcentral  = static_cast<AliVEvent::EOfflineTriggerTypes>(AliVEvent::kAnyINT | AliVEvent::kCentral | AliVEvent::kSemiCentral);

AliVEvent::EOfflineTriggerTypes kPhysSel   = mykMB; //AliVEvent::kAnyINT; // physics selection
// AliVEvent::EOfflineTriggerTypes kSel_tasks = mykMB;

AliVEvent::EOfflineTriggerTypes kSel_chg   = static_cast<AliVEvent::EOfflineTriggerTypes>(arg_sel_chg);
AliVEvent::EOfflineTriggerTypes kSel_full  = static_cast<AliVEvent::EOfflineTriggerTypes>(arg_sel_full);

//############################################################
// Analysis manager
  AliAnalysisManager* pMgr = new AliAnalysisManager(cTaskName);
  pMgr->SetDebugLevel(mgr_debug);
  if ( kUseSysInfo > 0 ) { pMgr->SetNSysInfo ( kUseSysInfo ); }

  // actual runName in the form of LHCXXX....
  TString sRunName;
  Bool_t kIsAOD = kTRUE;
  AliAnalysisTaskEmcal::EDataType_t iDataType = AliAnalysisTaskEmcal::kAOD; // assuming default is to process AOD
  TString file;
  AliAnalysisAlien* plugin = NULL;
  if ( ManagerMode == AnalysisType::grid ) {  // start grid analysis
    // ( const char* gridMode, const char* tag, unsigned int nr_test_files, unsigned int TTL, const char* outdir, const char subworkdir, const char* extradirlvl);
    plugin = CreateAlienHandler(cGridMode, kJobTag.Data(), kGridFilesPerJob, kTTL);
    if ( !plugin ) { ::Error ( "runEMCalJetSampleTask.C - StartGridAnalysis", "plugin invalid" ); return NULL; }
    pMgr->SetGridHandler(plugin);

    // use this command to run the macro
    plugin->SetExecutableCommand(kPluginExecutableCommand.Data());

    // AliPhysics version.
    plugin->SetAliPhysicsVersion ( kAliPhysicsVersion.Data() ); // Here you can set the (Ali)PHYSICS version you want to use

    gROOT->LoadMacro("InputData.C");
    InputData(kGridDataSet);
    sRunName = CDF::GetPeriod( plugin->GetGridDataDir() );

    file = CDF::GetFileFromPath(plugin->GetDataPattern());
    if (file.Contains("AliESD")) { iDataType = AliAnalysisTaskEmcal::kESD; kIsAOD = kFALSE; }

    plugin->SetMergeExcludes(kGridMergeExclude.Data());
    }

  if ( ManagerMode == AnalysisType::local ) { // start local analysis
    if ( kDataSource.IsNull() ) { Printf("You need to provide the list of local files!"); return NULL; }
开发者ID:adriansev,项目名称:jetfinder,代码行数:67,代码来源:EmcalJetCDF.C

示例15: AODtrain

//______________________________________________________________________________
void AODtrain(Int_t merge=0)
{
  // Main analysis train macro.
  ProcessEnvironment();

  UpdateFlags();

  PrintSettings();

  if (merge || doCDBconnect) {
    TGrid::Connect("alien://");
    if (!gGrid || !gGrid->IsConnected()) {
      ::Error("AODtrain", "No grid connection");
      return;
    }
  }
  // Set temporary merging directory to current one
  gSystem->Setenv("TMPDIR", gSystem->pwd());
  // Set temporary compilation directory to current one
  gSystem->SetBuildDir(gSystem->pwd(), kTRUE);
   printf("==================================================================\n");
   printf("===========    RUNNING FILTERING TRAIN   ==========\n");
   printf("===========    Collision System is %s    ==========\n",CollisionSystem[iCollision]);
   printf("==================================================================\n");
   printf("=  Configuring analysis train for:                               =\n");
   if (usePhysicsSelection)   printf("=  Physics selection                                                =\n");
   if (useTender)    printf("=  TENDER                                                        =\n");
   if (iESDfilter)   printf("=  ESD filter                                                    =\n");
   if (iMUONcopyAOD) printf("=  MUON copy AOD                                                 =\n");
   if (iJETAN)       printf("=  Jet analysis                                                  =\n");
   if (iJETANdelta)  printf("=     Jet delta AODs                                             =\n");
   if (iPWGHFvertexing) printf("=  PWGHF vertexing                                                =\n");
   if (iPWGDQJPSIfilter) printf("=  PWGDQ j/psi filter                                             =\n");
   if (iPWGHFd2h) printf("=  PWGHF D0->2 hadrons QA                                     =\n");

   // Make the analysis manager and connect event handlers
   AliAnalysisManager *mgr  = new AliAnalysisManager("Analysis Train", "Production train");
    mgr->SetCacheSize(0);
   if (useSysInfo) {
      //mgr->SetNSysInfo(100);
      AliSysInfo::SetVerbose(kTRUE);
   }   
   // Create input handler (input container created automatically)
   // ESD input handler
   AliESDInputHandler *esdHandler = new AliESDInputHandler();
   mgr->SetInputEventHandler(esdHandler);       
   // Monte Carlo handler
   if (useMC) {
      AliMCEventHandler* mcHandler = new AliMCEventHandler();
      mgr->SetMCtruthEventHandler(mcHandler);
      mcHandler->SetReadTR(useTR); 
   }   
   // AOD output container, created automatically when setting an AOD handler
   if (iAODhandler) {
      // AOD output handler
      AliAODHandler* aodHandler   = new AliAODHandler();
      aodHandler->SetOutputFileName("AliAOD.root");
      mgr->SetOutputEventHandler(aodHandler);
   }
   // Debugging if needed
   if (useDBG) mgr->SetDebugLevel(3);

   AddAnalysisTasks(cdbPath);
   if (merge) {
      AODmerge();
      mgr->InitAnalysis();
      mgr->SetGridHandler(new AliAnalysisAlien);
      mgr->StartAnalysis("gridterminate",0);
      return;
   }   
   // Run the analysis                                                                                                                     
   //
   TChain *chain = CreateChain();
   if (!chain) return;
                                                                                                                                                   
   TStopwatch timer;
   timer.Start();
   mgr->SetSkipTerminate(kTRUE);
   if (mgr->InitAnalysis()) {
      mgr->PrintStatus();
      mgr->StartAnalysis("local", chain);
   }
   timer.Print();
}                                                                                                                                          
开发者ID:preghenella,项目名称:AliDPG,代码行数:85,代码来源:AODtrain.C


注:本文中的AliAnalysisManager::SetDebugLevel方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。