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


C++ AliAnalysisAlien类代码示例

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


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

示例1: CreateAlienHandlerTrigger

AliAnalysisGrid* CreateAlienHandlerTrigger(const char * run,const char * recopass="pass1", Bool_t isMC=kFALSE)
{
  

// Check if user has a valid token, otherwise make one. This has limitations.
// One can always follow the standard procedure of calling alien-token-init then
//   source /tmp/gclient_env_$UID in the current shell.
  TGrid::Connect("alien:");
   AliAnalysisAlien *plugin = new AliAnalysisAlien();
// Set the run mode (can be "full", "test", "offline", "submit" or "terminate")
   plugin->SetRunMode("full");
   //plugin->SetRunMode("test");
// Set versions of used packages
   plugin->SetAPIVersion("V1.1x");
   plugin->SetROOTVersion("v5-27-06-2");
   plugin->SetAliROOTVersion("v4-21-03-AN");
// Declare input data to be processed.
// Method 1: Create automatically XML collections using alien 'find' command.
// Define production directory LFN
// LHC09d
// /alice/data/2009/LHC09d/000104892/ESDs/pass6/
   if (!isMC)
     plugin->SetGridDataDir(Form("/alice/data/2010/LHC10h/%s/ESDs/%s/", run,recopass));
   else 
     plugin->SetGridDataDir(Form("/alice/sim/%s",recopass));     
// Set data search pattern
   plugin->SetDataPattern("AliESDs.root");
// ...then add run numbers to be considered
//   plugin->AddRunNumber(104892);
//   plugin->AddRunNumber(300001);
// Method 2: Declare existing data files (raw collections, xml collections, root file)
// If no path mentioned data is supposed to be in the work directory (see SetGridWorkingDir())
// XML collections added via this method can be combined with the first method if
// the content is compatible (using or not tags)
   // plugin->AddDataFile("tag.xml");
   // plugin->AddDataFile("/alice/data/2008/LHC08c/000057657/raw/Run57657.Merged.RAW.tag.root");
// Define alien work directory where all files will be copied. Relative to alien $HOME.
   plugin->SetGridWorkingDir(Form("MultPb/Task_%s_%s",run,recopass));
// Declare alien output directory. Relative to working directory.
   plugin->SetGridOutputDir("out"); 
// Declare the analysis source files names separated by blancs. To be compiled runtime
// using ACLiC on the worker nodes.
   plugin->SetAnalysisSource("AliAnalysisTaskTriggerStudy.cxx AliHistoListWrapper.cxx");
// Declare all libraries (other than the default ones for the framework. These will be
// loaded by the generated analysis macro. Add all extra files (task .cxx/.h) here.
   plugin->SetAdditionalLibs("AliAnalysisTaskTriggerStudy.cxx AliHistoListWrapper.cxx AliAnalysisTaskTriggerStudy.h AliHistoListWrapper.h");
//   plugin->SetAdditionalLibs("AliCollisionsNormalization.cxx AliCollisionNormalizationTask.cxx AliPhysicsSelection.cxx AliCollisionsNormalization.h AliCollisionNormalizationTask.h AliPhysicsSelection.h");
   // I'm using a modified ANALYSISalice package, so I need to load par files for everything
   plugin->EnablePackage("STEERBase");
   plugin->EnablePackage("ESD");
   plugin->EnablePackage("AOD");
   plugin->EnablePackage("CORRFW");
   plugin->EnablePackage("ANALYSIS");
   plugin->EnablePackage("ANALYSISalice");

// Declare the output file names separated by blancs.
// (can be like: file.root or [email protected]::Niham::File)
   plugin->SetDefaultOutputs(kFALSE);
   //   plugin->SetOutputFiles(Form("EventStat_temp.root %s",outfilename);
   plugin->SetOutputFiles("Trig_Temp.root");
// Optionally define the files to be archived.
//   plugin->SetOutputArchive("log_archive.zip:stdout,[email protected]::NIHAM::File root_archive.zip:*[email protected]::NIHAM::File");
   plugin->SetOutputArchive("log_archive.zip:stdout,stderr");
// Optionally set a name for the generated analysis macro (default MyAnalysis.C)
   plugin->SetAnalysisMacro("AnalysisTrigger.C");
// Optionally set maximum number of input files/subjob (default 100, put 0 to ignore)
   plugin->SetSplitMaxInputFileNumber(100);
// Optionally set number of failed jobs that will trigger killing waiting sub-jobs.
   plugin->SetMaxInitFailed(5);
// Optionally resubmit threshold.
   plugin->SetMasterResubmitThreshold(90);
// Optionally set time to live (default 30000 sec)
   plugin->SetTTL(30000);
// Optionally set input format (default xml-single)
   plugin->SetInputFormat("xml-single");
// Optionally modify the name of the generated JDL (default analysis.jdl)
   plugin->SetJDLName("TaskNorm.jdl");
// Optionally modify job price (default 1)
   plugin->SetPrice(1);      
// Optionally modify split mode (default 'se')    
   plugin->SetSplitMode("se");
   return plugin;
}
开发者ID:ktf,项目名称:AliPhysics,代码行数:83,代码来源:CreateAlienHandlerTrigger.C

示例2: 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

示例3:

//___________________________________________________________
AliAnalysisAlien *CreateAlienHandler(Bool_t isProof){
  //if(!AliAnalysisGrid::CreateToken()) return NULL;
  if(!FindDependentPackages()) return NULL;
  AliAnalysisAlien *alienplugin = new AliAnalysisAlien;
   
  // common settings
  alienplugin->SetAliROOTVersion(aliroot_version);
  alienplugin->SetROOTVersion(root_version);
  alienplugin->SetAPIVersion(api_version);
  alienplugin->SetAdditionalLibs("libPWGHFhfe.so");
  alienplugin->SetDefaultOutputs(kTRUE);
  if(isProof){
    // proof mode
    if(analysis_mode.Contains("test")) alienplugin->SetRunMode("test");
    alienplugin->SetProofCluster("alice_caf.cern.ch");
    alienplugin->SetRootVersionForProof(root_version);
    alienplugin->SetAliRootMode("aliroot");
  } else {
    // grid mode
    alienplugin->SetRunMode(analysis_mode.Data());
    // default setting that need no deeper logic
    alienplugin->SetJDLName("hfeanalysis.jdl");
    alienplugin->SetExecutable("hfeanalysis.sh");
    alienplugin->SetAnalysisMacro("hfeanalysis.C");
    alienplugin->SetValidationScript("hfevalidate.sh");
    alienplugin->SetGridWorkingDir("hfeanalysis");
    /*alienplugin->SetOutputArchive();
    alienplugin->SetDefaultOutputs();*/
    alienplugin->SetOverwriteMode();
    alienplugin->SetFastReadOption();
    alienplugin->SetSplitMaxInputFileNumber(5);
    alienplugin->SetTTL(30000);
    alienplugin->SetInputFormat("xml-single");
    alienplugin->SetPrice(1);
    alienplugin->SetSplitMode("se");
    alienplugin->SetNtestFiles(1);

    // Merging setting, only needed in terminate or full mode
    if(analysis_mode.Contains("full") || analysis_mode.Contains("terminate")){
      alienplugin->SetMergeViaJDL();
      alienplugin->SetMaxMergeFiles(50);
      alienplugin->SetMaxMergeStages(5);
    }
  }
  return alienplugin;
}
开发者ID:ktf,项目名称:AliPhysics,代码行数:47,代码来源:runAlien.C

示例4: RsnGridPlugin

void RsnGridPlugin(TString analysisMode) {

   Bool_t valid = kTRUE;
   TString dsConfig = AliAnalysisManager::GetGlobalStr("rsnTrainDSConfig",valid);
   Int_t globalTrainID = AliAnalysisManager::GetGlobalInt("rsnGlobalTrainID",valid);

   Int_t numRuns = AliAnalysisManager::GetGlobalInt("rsnGridNumRuns",valid);
   Int_t numRunsSkip = AliAnalysisManager::GetGlobalInt("rsnGridNumRunsSkip",valid);

   AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
   if (!mgr) {
      Printf("Error[RsnGridPlugin] mgr is null !!!");
      return;
   }

   AliAnalysisAlien *plugin = (AliAnalysisAlien *) mgr->GetGridHandler();
   if (!plugin) {
      Printf("Error[RsnGridPlugin] : plugin is null !!!");
      return;
   }

   // getting latest train id
   TString rsnTrainName = gSystem->BaseName(dsConfig.Data());
   rsnTrainName.ReplaceAll(".txt","");
   rsnTrainName.Append(TString::Format("/%03d/%d_%d",globalTrainID,numRunsSkip,numRuns).Data());

   if (!gGrid) TGrid::Connect("alien://");
   if (!gGrid) return;
   TGridResult *r = gGrid->Query(TString::Format("%s/RsnTrain/%s",gGrid->GetHomeDirectory(),rsnTrainName.Data()).Data(),"*/analysis.root");
   Int_t idRsnTrain = 0;
   if (r) {
      TString s = r->GetKey(r->GetSize()-1,"lfn");
      s.ReplaceAll("/analysis.root","");
      s = gSystem->BaseName(s);
      if (!s.IsNull()) idRsnTrain = s.Atoi();
      if (!analysisMode.CompareTo("full")) idRsnTrain++;
   }
   rsnTrainName.Append(Form("/%03d",idRsnTrain));

   TString rsnTrainWkDir = TString::Format("RsnTrain/%s",rsnTrainName.Data()).Data();
   Info("RsnGridPlugin()",TString::Format("RSN Train directory : %s%s",gGrid->GetHomeDirectory(),rsnTrainWkDir.Data()).Data());

   plugin->SetGridWorkingDir(rsnTrainWkDir.Data());
   plugin->SetGridOutputDir("output"); // In this case will be $HOME/work/output

   plugin->SetAPIVersion("V1.1x");

   TString rootver = AliAnalysisManager::GetGlobalStr("rsnLegoTrainROOTversion",valid);
   plugin->SetROOTVersion(rootver.Data());

   TString alirootVersion = AliAnalysisManager::GetGlobalStr("rsnLegoTrainAliROOTversion",valid);
   if (alirootVersion.IsNull()) {
      if (gSystem->Getenv("ALICE_ROOT")) alirootVersion = gSystem->GetFromPipe("aliroot --version | awk '{print $3}'");
   }
   plugin->SetAliROOTVersion(alirootVersion.Data());

   plugin->SetExecutableCommand("aliroot -b -q");

   plugin->SetAnalysisMacro("RsnTrain.C");
   plugin->SetMasterResubmitThreshold(90);
   plugin->SetTTL(84600);
   plugin->SetInputFormat("xml-single");
   plugin->SetJDLName("RsnTrain.jdl");
   plugin->SetPrice(1);
   plugin->SetSplitMode("se");
   plugin->SetNtestFiles(2);
   plugin->SetMergeViaJDL();
   plugin->SetOverwriteMode(kFALSE);
   //    plugin->SetKeepLogs(kTRUE);

   RsnSetData(plugin,dsConfig,numRuns,numRunsSkip,1000);

   plugin->SetSplitMaxInputFileNumber(25);

   //   Fatal("RsnDataSet","No dataset found !!!");
}
开发者ID:fbellini,项目名称:AliRsn,代码行数:76,代码来源:RsnGridPlugin.C

示例5: InputData

//______________________________________________________________________________
// function to add specific data to be processed
Bool_t InputData ( const char* label ) {
TString datarun (label);

//______________________________________________________________________________
//  DEFINED INPUT DATA
if ( datarun.IsNull() ) { printf ( "InputData :: no data input" ); return kFALSE; }

// Get the pointer to the existing analysis manager via the static access method.
//==============================================================================
AliAnalysisManager* mgr = AliAnalysisManager::GetAnalysisManager();
if ( !mgr ) { ::Error ( "InputData.C", "No analysis manager to connect to." ); return kFALSE; }

// Check the analysis type using the event handlers connected to the analysis manager.
//==============================================================================
AliAnalysisAlien* plugin =  dynamic_cast <AliAnalysisAlien*> ( mgr->GetGridHandler() );
if ( !plugin ) { ::Error ( "InputData.C", "InputData :: plugin invalid" ); return kFALSE; }

TString     kGridRunPattern = "000"; // important for leading zeroes!!
Printf ( "data = %s" , datarun.Data() );

// ##################################################################################

// FILTER_p-p_113_LHC11a: Standard AODs + deltas  pp 2.76 GeV
// runlist for lego dataset LHC11a_pass4_AOD (pass4_wSDD) ; Jets_EMC_pp train
// MC anchored lhc11a : http://alimonitor.cern.ch/job_details.jsp?jt_description=LHC11a
if ( datarun.EqualTo ( "pp_lhc11a_aod" ) ) {
    plugin->SetRunPrefix ( kGridRunPattern.Data() );

    // AliEn data production directory
    plugin->SetGridDataDir ( "/alice/data/2011/LHC11a" );

    // Can be like: *AliESDs.root, */pass1/*AliESDs.root, ...
    plugin->SetDataPattern ( "*ESDs/pass4_with_SDD/AOD113/*AliAOD.root" );

    plugin->AddRunList ("146860 146859 146858 146856 146824 146817 146807 146806 146805 146804 146803 146802 146801 146748 146747 146746");
    return kTRUE;
    }

// ##################################################################################

// AOD LHC10d; 7 TeV
// MC anchored 10d :http://alimonitor.cern.ch/job_details.jsp?jt_description=LHC10d
// runlist for lego dataset LHC10d_pass4_AOD ; Jets_EMC_pp train
else if ( datarun.EqualTo ( "pp_lhc10d_aod" ) ) {
    plugin->SetRunPrefix ( kGridRunPattern.Data() );

    // AliEn data production directory
    plugin->SetGridDataDir ( "/alice/data/2010/LHC10d" );

    // Can be like: *AliESDs.root, */pass1/*AliESDs.root, ...
    plugin->SetDataPattern ( "*pass4/AOD172/*AliAOD.root" );

    TString list_lhc10d_AN_1 = "126432 126425 126424 126422 126409 126408 126407 126406 126405 126404 126403 126359 126352 126351 126350 126285 126284";
    TString list_lhc10d_AN_2 = "126283 126168 126167 126160 126158 126097 126090 126088 126082 126081 126078 126073 126008 126007 126004 125855 125851";
    TString list_lhc10d_AN_3 = "125850 125849 125848 125847 125844 125843 125842 125633 125632 125630 125628 125296 125295 125186 125156 125140 125139";
    TString list_lhc10d_AN_4 = "125134 125133 125101 125100 125097 125085 125083 125023 124751 122375 122374";

    plugin->AddRunList ( list_lhc10d_AN_1.Data() );
    plugin->AddRunList ( list_lhc10d_AN_2.Data() );
    plugin->AddRunList ( list_lhc10d_AN_3.Data() );
    plugin->AddRunList ( list_lhc10d_AN_4.Data() );
    return kTRUE;
    }

// ##################################################################################

// AOD LHC10e; 7 TeV
// MC anchored 10e : http://alimonitor.cern.ch/job_details.jsp?jt_description=LHC10e
// runlist for lego dataset LHC10e_pass4_AOD ; Jets_EMC_pp train
else if ( datarun.EqualTo ( "pp_lhc10e_aod" ) ) {
    plugin->SetRunPrefix ( kGridRunPattern.Data() );

    // AliEn data production directory
    plugin->SetGridDataDir ( "/alice/data/2010/LHC10e" );

    // Can be like: *AliESDs.root, */pass1/*AliESDs.root, ...
    plugin->SetDataPattern ( "*pass4/AOD172/*AliAOD.root" );

    TString list_lhc10e_AN_1 = "130850 130848 130847 130844 130842 130840 130834 130799 130798 130795 130793 130704 130696 130628 130623 130621 130620 130609 130608 130526";
    TString list_lhc10e_AN_2 = "130524 130520 130519 130517 130481 130480 130479 130375 130360 130358 130356 130354 130342 130178 130172 130168 130158 130157 130149 129983";
    TString list_lhc10e_AN_3 = "129966 129962 129961 129960 129744 129742 129738 129736 129735 129734 129729 129726 129725 129723 129666 129659 129653 129652 129651 129650";
    TString list_lhc10e_AN_4 = "129647 129641 129639 129599 129587 129586 129540 129536 129528 129527 129525 129524 129523 129521 129520 129519 129516 129515 129514 129513";
    TString list_lhc10e_AN_5 = "129512 129042 128913 128855 128853 128850 128843 128836 128835 128834 128833 128824 128823 128820 128819 128778 128777 128678 128677 128621";
    TString list_lhc10e_AN_6 = "128615 128611 128609 128605 128596 128594 128592 128582 128506 128505 128504 128503 128498 128495 128494 128486 128452 128366";

    plugin->AddRunList ( list_lhc10e_AN_1.Data() );
    plugin->AddRunList ( list_lhc10e_AN_2.Data() );
    plugin->AddRunList ( list_lhc10e_AN_3.Data() );
    plugin->AddRunList ( list_lhc10e_AN_4.Data() );
    plugin->AddRunList ( list_lhc10e_AN_5.Data() );
    plugin->AddRunList ( list_lhc10e_AN_6.Data() );
    return kTRUE;
    }

// ##################################################################################
// MC anchored lhc13g : http://alimonitor.cern.ch/job_details.jsp?jt_description=LHC13g
// AOD LHC13g; 2.76 TeV
// LHC13g_AOD155 Jets_EMC_pp train
//.........这里部分代码省略.........
开发者ID:adriansev,项目名称:jetfinder,代码行数:101,代码来源:InputData.C

示例6: CreateAlienHandler

//______________________________________________________________________________
AliAnalysisGrid* CreateAlienHandler(Bool_t bAOD, Int_t bunchN, const char *taskname, const char *gridmode, const char *proofcluster, const char *proofdataset)
{
    AliAnalysisAlien *plugin = new AliAnalysisAlien();
    // Set the run mode (can be "full", "test", "offline", "submit" or "terminate")
    plugin->SetRunMode(gridmode);

    // Set versions of used packages
    plugin->SetAPIVersion("V1.1x");
    plugin->SetROOTVersion("v5-34-08");
    plugin->SetAliROOTVersion("v5-05-19-AN");

    // Declare input data to be processed.

    // Method 1: Create automatically XML collections using alien 'find' command.
    // Define production directory LFN
    plugin->SetGridDataDir("/alice/data/2010/LHC10h/");
    // On real reconstructed data:
    // plugin->SetGridDataDir("/alice/data/2009/LHC09d");

    // Set data search pattern
    //plugin->SetDataPattern("*ESDs.root"); // THIS CHOOSES ALL PASSES
    // Data pattern for reconstructed data
    if(!bAOD){
      plugin->SetDataPattern("*ESDs/pass2/*ESDs.root"); // CHECK LATEST PASS OF DATA SET IN ALIENSH
    } 
    else{
      plugin->SetDataPattern("*ESDs/pass2/AOD086/*/AliAOD.root");
    }

    plugin->SetRunPrefix("000");   // real data
    // ...then add run numbers to be considered
    //plugin->SetRunRange(114917,115322);

    if(bunchN==0){
      plugin->AddRunNumber(137366);
    }
    
    //bunch1
    else if(bunchN == 1){
      plugin->AddRunNumber(139510);
      plugin->AddRunNumber(139507);
      plugin->AddRunNumber(139505);
      plugin->AddRunNumber(139503); 
      plugin->AddRunNumber(139465); 
      plugin->AddRunNumber(139438);
      plugin->AddRunNumber(139437);
      plugin->AddRunNumber(139360); 
      plugin->AddRunNumber(139329);
      plugin->AddRunNumber(139328); 
    }

    //bunch2
    else if(bunchN == 2){
      plugin->AddRunNumber(139314); 
      plugin->AddRunNumber(139310);
      plugin->AddRunNumber(139309); 
      plugin->AddRunNumber(139173); 
      plugin->AddRunNumber(139107); 
      plugin->AddRunNumber(139105); 
      plugin->AddRunNumber(139038); 
      plugin->AddRunNumber(139037); 
      plugin->AddRunNumber(139036); 
      plugin->AddRunNumber(139029); 
      plugin->AddRunNumber(139028); 
      plugin->AddRunNumber(138872); 
      plugin->AddRunNumber(138871); 
      plugin->AddRunNumber(138870); 
      plugin->AddRunNumber(138837); 
      plugin->AddRunNumber(138732); 
      plugin->AddRunNumber(138730);
      plugin->AddRunNumber(138666);
      plugin->AddRunNumber(138662); 
      plugin->AddRunNumber(138653); 
    }

    else if(bunchN == 3){
      plugin->AddRunNumber(138652);
      plugin->AddRunNumber(138638);
      plugin->AddRunNumber(138624); 
      plugin->AddRunNumber(138621); 
      plugin->AddRunNumber(138583); 
      plugin->AddRunNumber(138582); 
      plugin->AddRunNumber(138579); 
      plugin->AddRunNumber(138578);
      plugin->AddRunNumber(138534);
      plugin->AddRunNumber(138469); 
    }

    else if(bunchN == 4){
      
      plugin->AddRunNumber(138442);
      plugin->AddRunNumber(138439);
      plugin->AddRunNumber(138438);
      plugin->AddRunNumber(138396); 
      plugin->AddRunNumber(138364); 
      plugin->AddRunNumber(138275); 
      plugin->AddRunNumber(138225); 
      plugin->AddRunNumber(138201);
      plugin->AddRunNumber(138197); 
//.........这里部分代码省略.........
开发者ID:ktf,项目名称:AliPhysics,代码行数:101,代码来源:runTaskFlowHigherOrdersAllPID.C

示例7:

// ======================================
// ===== ALIEN PLUGIN CONFIGURATION =====
// ======================================
//
// This macro configures an AliEn plugin in order to launch a job
// which runs a task from the resonance package on a list of runs
// which are processed separately.
//
// All the possible configuration parameters are arguments
// of the macro function, even if most of them have default
// values which the user will rarely change.
//
// The macro tries to synchronize some output names, using
// a unique name ('analysisName') to define all files that
// describe the output, the analysis macros/executables/JDL.
//
// Since the run mode can be more variable than the config
// it is not set here, but it is required in the run macro
// which uses the plugin.
//
// Considered that the arguments are many, they are explained
// inside the list of arguments in the macro definition.
// In ALL cases where a list of strings must be provided, its
// elements must be separated by a blank character.
//
AliAnalysisAlien* PluginByRunProof
(
   // all parameters which could often be customized
   // are placed at the beginning of the macro, while
   // all others can stay there with their default values:
   // -- analysisName   --> common name used for naming all analysis related files
   // -- dataset        --> dataset to be processed
   // -- testFile       --> used for test mode only
   // -- clusterName    --> PROOF cluster to be used
   const char *dataSet,
   const char *testFile,
   const char *clusterName,
   
   // -- proofReset     --> require or not the PROOF reset
   // -- alirootMode    --> the way AliROOT library are loaded
   // -- clearPack      --> to clear or not the PAR libraries
   Bool_t      proofReset  = kFALSE,
   const char *alirootMode = "default",
   Bool_t      clearPack   = kFALSE,

   // standard package versions
   const char *rootVersion    = "v5-28-00a",
   const char *aliVersion     = "v4-21-17a-AN"
)
{
   // create plugin object
   // with specifications which apply to a run-by-run execution
   // this creates by default also the job structure for merging
   AliAnalysisAlien *plugin = new AliAnalysisAlien;

   // package versions
   plugin->SetROOTVersion(rootVersion);
   plugin->SetAliROOTVersion(aliVersion);

   // additional libraries/includes
   //plugin->SetAdditionalLibs("libTENDER.so TENDERSupplies.par libEventMixing.so libPWG2resonances.so");
   plugin->SetAdditionalLibs("libEventMixing.so PWG2resonances.par");
   
   // PROOF-specific settings
   plugin->SetProofCluster(clusterName);
   plugin->SetProofDataSet(dataSet);
   plugin->SetProofReset(proofReset);
   plugin->SetProofConnectGrid(kTRUE);
   plugin->SetAliRootMode(alirootMode);
   plugin->SetClearPackages(clearPack);
   plugin->SetFileForTestMode(testFile);

   // the end!
   return plugin;
}
开发者ID:fbellini,项目名称:AliRsn,代码行数:75,代码来源:PluginByRunProof.C

示例8: CreateAlienHandler

AliAnalysisGrid* CreateAlienHandler(TString mode="test",TString fname="testName"){
  AliAnalysisAlien *plugin = new AliAnalysisAlien();
  plugin->SetOverwriteMode();
  plugin->SetExecutableCommand("aliroot -q -b");  
  plugin->SetRunMode(mode.Data());
  plugin->SetNtestFiles(20);
  // Set versions of used packages
  plugin->SetAPIVersion("V1.1x");
  //plugin->SetROOTVersion("v5-34-26");
  plugin->SetAliROOTVersion("v5-07-20");
  plugin->SetAliPhysicsVersion("vAN-20160203");
  // Declare input data to be processed.
  plugin->SetNrunsPerMaster(100);
  plugin->SetSplitMaxInputFileNumber(15); // 3 in the LEGO trains

    plugin->SetGridDataDir("/alice/data/2013/LHC13c/");
    plugin->SetGridWorkingDir(Form("%s/",fname.Data()));
    plugin->SetRunPrefix("000"); 
    plugin->SetDataPattern("/ESDs/pass2/*/AliESDs.root");
    plugin->SetAnalysisMacro("TaskDeuteronTreeTest.C");
    plugin->SetExecutable("TaskDeuteronTreeTest.sh");
    plugin->SetJDLName("TaskDeuteronTreeTest.jdl");
    Int_t runnumbers[]={195596,195592};

    for(Int_t irun=0;irun<2;irun++){
      Printf("%d %d",irun,runnumbers[irun]);
      plugin->AddRunNumber(runnumbers[irun]);
    }

 

    TString extraLibs;
  plugin->AddIncludePath("-I. -I$ROOTSYS/include -I$ALICE_ROOT/include -I$ALICE_PHYSICS/include");
  
  //plugin->SetAdditionalLibs("libCORRFW.so libPWGTools.so libPWGCFCorrelationsBase.so libPWGCFCorrelationsDPhi.so AliAnalysisTaskPhiCorrelations.cxx AliAnalysisTaskPhiCorrelations.h");
  //plugin->SetAnalysisSource("AliAnalysisTaskPhiCorrelations.cxx");

  plugin->SetGridOutputDir("output"); // In this case will be $HOME/work/output
  
  // Declare the output file names separated by blancs.
  // (can be like: file.root or [email protected]::Niham::File)
  //plugin->SetDefaultOutputs(0);
  //plugin->SetOutputFiles("AnalysisResults.root.root");
  plugin->SetMergeViaJDL(kTRUE);
  plugin->SetOneStageMerging(kFALSE);
  //plugin->SetMaxMergeFiles(40);
  //plugin->SetMaxMergeStages(4);
  
  plugin->SetTTL(50000);
  // Optionally set input format (default xml-single)
  plugin->SetInputFormat("xml-single");
  // Optionally modify job price (default 1)
  plugin->SetPrice(1);      
  // Optionally modify split mode (default 'se')    
  //plugin->SetSplitMaxInputFileNumber();
  plugin->SetSplitMode("se");
  return plugin;
}
开发者ID:ktf,项目名称:AliPhysics,代码行数:58,代码来源:runGridDeuteronTree.C

示例9: EmcalJetCDF


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

// 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; }
    TChain* pChain = CDF::CreateChain(kDataSource.Data(), "auto", "", iNumFiles);
    if (!pChain) { std::cout << ">>>>>>>>>>>>>>   CHAIN NOT CREATED   <<<<<<<<<<<<<<" << std::endl; return NULL; }
    Printf("Setting local analysis for %d files from list %s, max events = %d", iNumFiles, kDataSource.Data(), iNumEvents);

    // get the path of first file
    file = pChain->GetFile()->GetEndpointUrl()->GetUrl();
    sRunName = CDF::GetPeriod(file.Data()); // get the run name : first token beggining with lhc
    if ( CDF::GetFileFromPath(file).Contains("AliESD") ) { iDataType = AliAnalysisTaskEmcal::kESD; kIsAOD = kFALSE; }
开发者ID:adriansev,项目名称:jetfinder,代码行数:67,代码来源:EmcalJetCDF.C

示例10: CreateAlienHandler

//######################################################################################################################################
AliAnalysisAlien* CreateAlienHandler ( const char* gridMode, const char* tag, unsigned int nr_test_files, unsigned int TTL,
                                       const char* outdir, const char subworkdir, const char* extradirlvl ) {

  AliAnalysisAlien* plugin = new AliAnalysisAlien();
  if ( !plugin ) { std::cout << "!!! -->> alien handler could not be created <<-- !!!" << std::endl; return NULL;}

  plugin->AddIncludePath("-I.");
  plugin->AddIncludePath("-I$ALICE_PHYSICS/include");
  plugin->AddIncludePath("-I$ALICE_ROOT/include");
  plugin->AddIncludePath("-I$FASTJET/include");
  plugin->AddIncludePath("-I/usr/include");

//   unsigned int       kGridMaxMergeFiles       = 100;            // Number of files merged in a chunk grid run range
//   unsigned int       kMaxInitFailed           = 10 ;            // Optionally set number of failed jobs that will trigger killing waiting sub-jobs.

  TString     kGridOutdir              = outdir ;       // AliEn output directory. If blank will become output_<kTrainName>
  TString     kGridSubWorkDir          = subworkdir ;   // sub working directory not to confuse different run xmls
  TString     kGridExtraAliendirLevel  = extradirlvl ;  // sub working directory not to confuse different run xmls
  TString     kWorkDir                 = tag;           // AliEn work dir; relative to AliEn $HOME
  TString     kTrainName               = "cdfjets";     // *CHANGE ME* (no blancs or special characters)

  TString macroName("");  macroName = Form("%s.C", kTrainName.Data());
  TString execName("");   execName  = Form("%s.sh", kTrainName.Data());
  TString jdlName("");    jdlName   = Form("%s.jdl", kTrainName.Data());

  // Set run mode.  Can be "full", "test", "offline", "submit" or "merge"
  plugin->SetRunMode(gridMode);
  if (std::strcmp(gridMode, "test")) { plugin->SetCheckCopy(kFALSE); }

  // Set the number of test files; set to kGridFilesPerJob as to evaluate the memory consumption and ttl on grid
  plugin->SetNtestFiles ( nr_test_files );

  // Job tag
  plugin->SetJobTag(tag);

  // AliEn directory containing the input packages
  plugin->SetGridWorkingDir(tag);

  // Declare alien output directory. Relative to working directory.
  plugin->SetGridOutputDir( kGridOutdir.Data() ); // In this case will be $HOME/work/output

  // Optionally modify the executable name (default analysis.sh)
  plugin->SetExecutable(execName.Data());

  // Optionally set a name for the generated analysis macro (default MyAnalysis.C)
  plugin->SetAnalysisMacro(macroName.Data());

  // Optionally modify the name of the generated JDL (default analysis.jdl)
  plugin->SetJDLName(jdlName.Data());

  // Use the output files connected to output containers from the analysis manager
  // rather than the files defined by SetOutputFiles
  plugin->SetDefaultOutputs(kTRUE);

  //********************   PLUGIN OPTIONS   ************************
  // min (nr,4) replicas in grid storage
  plugin->SetNumberOfReplicas(2);

  // Optionally set time to live
  plugin->SetTTL(TTL);

  // Optionally set maximum number of input files/subjob (default 100, put 0 to ignore)
  plugin->SetSplitMaxInputFileNumber ( nr_test_files );

  // Use xrootd tweaks to reduce timeouts in file access
  plugin->SetFastReadOption ( kFALSE );

  // Maximum initial consecutive subjobs accepted to fail.
  // plugin->SetMaxInitFailed ( kMaxInitFailed );

  // Optionally resubmit threshold.
  // plugin->SetMasterResubmitThreshold(90);

  // Number of runs per masterjob
  // plugin->SetNrunsPerMaster(1);

  // exit from aliensh after submmiting job
  plugin->SetDropToShell ( kTRUE );

  // Overwrite existing files if any
  plugin->SetOverwriteMode();

  // write the output to subdirs named after run number
  // plugin->SetOutputToRunNo(1);

  // Optionally set input format (default xml-single)
  plugin->SetInputFormat("xml-single");

  // Optionally modify job price (default 1)
  plugin->SetPrice(1);

  // We split per SE or file
  plugin->SetSplitMode("se");

  // MERGING - Enable merging via automatic JDL
  plugin->SetMergeViaJDL(kTRUE);

  // Maximum number of files to be merged in one chunk
  plugin->SetOneStageMerging(kFALSE);
//.........这里部分代码省略.........
开发者ID:adriansev,项目名称:jetfinder,代码行数:101,代码来源:EmcalJetCDF.C

示例11: AliAnalysisAlien

AliAnalysisGrid *CreateAlienHandler()
{

  AliAnalysisAlien *plugin = new AliAnalysisAlien();
  //plugin->SetOverwriteMode();

  // Set the run mode (can be "full", "test", "offline", "submit" or "terminate")
  //plugin->SetRunMode("test");
  plugin->SetRunMode("full");
  //plugin->SetRunMode("terminate");

  // Set versions of used packages
  plugin->SetAPIVersion("V1.1x");
  plugin->SetROOTVersion("v5-34-08-6");
  plugin->SetAliROOTVersion("vAN-20141031");

  // Set the path for finding the data
  plugin->SetGridDataDir("/alice/data/2010/LHC10h/");
  plugin->SetDataPattern("ESDs/pass2/AOD086/*/AliAOD.root"); // for testing over multiple files
  //plugin->SetDataPattern("ESDs/pass2/AOD086/0001/AliAOD.root"); // for testing over a single file
  plugin->SetRunPrefix("000");
  //plugin->AddRunNumber(137161);
  gROOT->ProcessLine(".L AddRunNumbers.C");
  int added = AddRunNumbers(plugin,0,95,"lhc10h");
  if(added<0) return NULL;

  // Set the path for the output
  plugin->SetGridWorkingDir("TaskExample"); // $HOME/TaskExample
  plugin->SetGridOutputDir("OutputTesting_X005"); // $HOME/TaskExample/OutputTesting

  // Specify the source code for the analysis
  plugin->SetAnalysisSource("AliAnalysisTaskExample.cxx"); // class file
  plugin->SetAdditionalLibs("AliAnalysisTaskExample.h AliAnalysisTaskExample.cxx"); // header space class

  // Default outputs (?)
  plugin->SetDefaultOutputs(); // ALWAYS use default outputs, code warns then crashes if not
  // The rest of these are optional, though some are very useful
  plugin->SetSplitMaxInputFileNumber(100); // default 100 input files/subjob
  plugin->SetMaxInitFailed(5); // default (?) jobs fail to kill waiting subjobs
  plugin->SetMasterResubmitThreshold(90); // default (?) resubmit threshold
  plugin->SetTTL(50000); // default 30000 sec time to live
  plugin->SetAnalysisMacro("TaskExample.C"); // default "MyAnalysis.C"
  plugin->SetExecutable("TaskExample.sh"); // default "analysis.sh"
  plugin->SetJDLName("TaskExample.jdl"); // default "analysis.jdl"
  plugin->SetInputFormat("xml-single"); // default "xml-single"
  plugin->SetPrice(1); // default 1 price to modify job
  plugin->SetSplitMode("se"); // default "se"

  return plugin;

}
开发者ID:belmonrj,项目名称:BalanceFunction,代码行数:51,代码来源:CreateAlienHandler.C

示例12: AliAnalysisAlien

AliAnalysisGrid *CreateAlienHandler()
{
    AliAnalysisAlien *plugin = new AliAnalysisAlien();

    plugin->SetRunMode("test"); // generate files and make local test on my PC
    //plugin->SetRunMode("offline"); // generate files that can be modified; no submission
    //plugin->SetRunMode("submit"); // submit files generated with offline mode
    //plugin->SetRunMode("full"); // generate files and submit
    //plugin->SetRunMode("terminate"); // do merging only in one job

    plugin->SetAPIVersion("V1.1x");
    plugin->SetAliPhysicsVersion("vAN-20151115-1");
    plugin->SetNtestFiles(1);
    //plugin->SetROOTVersion("v5-34-08-6");
    //plugin->SetAliROOTVersion("vAN-20141031");
    plugin->SetGridDataDir("/alice/data/2010/LHC10h/");
    plugin->SetDataPattern("ESDs/pass2/AOD160/0008/AliAOD.root");
    plugin->SetRunPrefix("000");

    int runNumber[] = {139510, 139507};
    int size = sizeof(runNumber)/sizeof(runNumber[0]);
    for(int i=0; i<size; i++) {
        plugin->AddRunNumber(runNumber[i]);
    }

    //plugin->AddRunNumber(139510);
    plugin->SetGridWorkingDir("TaskFlow"); // $HOME/TaskFlow
    plugin->SetGridOutputDir("OutputFlow"); // TaskFlow/OutputFlow
//  plugin->AddIncludePath("-I$ROOTSYS/include -I$ALICE_ROOT/include");
    plugin->SetAnalysisSource("AliAnalysisTaskFlow.cxx");
    plugin->SetAdditionalLibs("AliAnalysisTaskFlow.h AliAnalysisTaskFlow.cxx");
    plugin->SetDefaultOutputs();
    plugin->SetOutputToRunNo();
    plugin->SetAnalysisMacro("Flow.C");
    plugin->SetSplitMaxInputFileNumber(400);
    plugin->SetMasterResubmitThreshold(90);
    plugin->SetTTL(20000);
    plugin->SetJDLName("Flow.jdl");
    plugin->SetExecutable("Flow.sh");
//	plugin->SetExecutableCommand("aliroot -b -q");

    return plugin;
}
开发者ID:Katka19,项目名称:FlowTask,代码行数:43,代码来源:CreateAlienHandler.C

示例13: CreateAlienHandlerPbPb

AliAnalysisGrid* CreateAlienHandlerPbPb()
{
// Check if user has a valid token, otherwise make one. This has limitations.
// One can always follow the standard procedure of calling alien-token-init then
//   source /tmp/gclient_env_$UID in the current shell.
//   if (!AliAnalysisGrid::CreateToken()) return NULL;
   AliAnalysisAlien *plugin = new AliAnalysisAlien();
   plugin->SetOverwriteMode();
// Set the run mode (can be "full", "test", "offline", "submit" or "terminate")
   plugin->SetRunMode("test");
//   plugin->SetRunMode("offline");
//   plugin->SetRunMode("full");
//   plugin->SetRunMode("terminate");
   plugin->SetNtestFiles(1);
// Set versions of used packages

   plugin->SetAPIVersion("V1.1x");
   plugin->SetROOTVersion("v5-33-02a");
   plugin->SetAliROOTVersion("v5-03-19-AN");
// Declare input data to be processed.
// Method 1: Create automatically XML collections using alien 'find' command.
// Define production directory LFN
// On real reconstructed data:
 plugin->SetGridDataDir("/alice/data/2011/LHC11h_2");
// Set data search pattern
plugin->SetDataPattern("*/pass2/*/AliESDs.root");

//same for pp MC:
//   plugin->SetGridDataDir("/alice/sim/LHC10f6a");
//  plugin->SetDataPattern("*/*/AliESDs.root");
// Data pattern for reconstructed data
//   plugin->SetDataPattern("*AliAOD.root"); //esta linea sirve para pruebas

   plugin->SetRunPrefix("000");   // real data

// ...then add run numbers to be considered
//   plugin->SetRunRange(122374,126437); //sim data
//10d
// plugin->AddRunNumber(126437); //sim data
//11h.pass2
plugin->AddRunNumber(170040); 
//   plugin->SetOutputSingleFolder("output");
   plugin->SetOutputToRunNo();
// Method 2: Declare existing data files (raw collections, xml collections, root file)
// If no path mentioned data is supposed to be in the work directory (see SetGridWorkingDir())
// XML collections added via this method can be combined with the first method if
// the content is compatible (using or not tags)
//   plugin->AddDataFile("tag.xml");
//   plugin->AddDataFile("/alice/data/2008/LHC08c/000057657/raw/Run57657.Merged.RAW.tag.root");
// Define alien work directory where all files will be copied. Relative to alien $HOME.
   plugin->SetGridWorkingDir("work");
// Declare alien output directory. Relative to working directory.
   plugin->SetGridOutputDir("output"); // In this case will be $HOME/work/output
// Declare the analysis source files names separated by blancs. To be compiled runtime
// using ACLiC on the worker nodes.
//   plugin->SetAnalysisSource("AliAnalysisHelperJetTasks.cxx AliAnalysisTaskPartonDisc.cxx");
   plugin->AddIncludePath("-I. .I$ALIEN_ROOT/api/lib -I$ROOTSYS/lib -I$ROOTSYS/include -I$ALICE_ROOT/include -I$ALICE_ROOT/PWGDQ/ -I$ALICE_ROOT/PWGDQ/dielectron/macrosLMEE -I$ALICE_ROOT/PWGDQ/dielectron -I$ALICE_ROOT/ANALYSIS -I$ALICE_ROOT/TENDER/Tender -I$ALICE_ROOT/TENDER/TenderSupplies");
 //  plugin->SetAdditionalLibs("libGui.so libXMLParser.so libSTEERBase.so libESD.so libAOD.so libCDB.so libANALYSIS.so libANALYSISalice.so libCORRFW.so libTender.so libProof.so libRAWDatabase.so libSTEER.so libTOFbase.so libPWGDQdielectron.so");// ConfigLowMassDiE.C")
   plugin->SetAdditionalLibs("libGui.so libXMLParser.so libSTEERBase.so libESD.so libAOD.so libCDB.so libANALYSIS.so libANALYSISalice.so libCORRFW.so libTender.so libProof.so libRAWDatabase.so libSTEER.so libTOFbase.so libPWGDQdielectron.so ConfigLowMassDiE.C");
   
// Declare all libraries (other than the default ones for the framework. These will be
// loaded by the generated analysis macro. Add all extra files (task .cxx/.h) here.
//   plugin->SetAdditionalLibs("AliAnalysisHelperJetTasks.h AliAnalysisHelperJetTasks.cxx AliAnalysisTaskPartonDisc.h AliAnalysisTaskPartonDisc.cxx");
// Declare the output file names separated by blancs.
// (can be like: file.root or [email protected]::Niham::File)
//   plugin->SetOutputFiles("Output.root");
   plugin->SetDefaultOutputs(); 
   //or specify files:
   //plugin->SetDefaultOutputs(kFALSE);
     //plugin->SetOutputFiles("cbaumann_LMEEpp2010_out.root"); 
     
//   plugin->SetOutputFiles("cbaumann_lowmass_out.root cbaumann_lowmass_CF.root");
// Optionally define the files to be archived.
//   plugin->SetOutputArchive("log_archive.zip:stdout,[email protected]=2 root_archive.zip:*[email protected]=2");
//   plugin->SetOutputArchive("log_archive.zip:stdout,stderr");
// Optionally set a name for the generated analysis macro (default MyAnalysis.C)
   plugin->SetAnalysisMacro("DielAnalysis.C");
// Optionally set maximum number of input files/subjob (default 100, put 0 to ignore)
//   plugin->SetSplitMaxInputFileNumber(2);
// Optionally modify the executable name (default analysis.sh)
   plugin->SetExecutable("DielAnalysis.sh");
   plugin->SetExecutableCommand("aliroot -b -q");
// Optionally set number of failed jobs that will trigger killing waiting sub-jobs.
//   plugin->SetMaxInitFailed(5);
// Optionally resubmit threshold.
//   plugin->SetMasterResubmitThreshold(90);
// Optionally set time to live (default 30000 sec)
   plugin->SetTTL(30000);
// Optionally set input format (default xml-single)
   plugin->SetInputFormat("xml-single");
// Optionally modify the name of the generated JDL (default analysis.jdl)
   plugin->SetJDLName("DielAnalysis.jdl");
// Optionally modify job price (default 1)
   plugin->SetPrice(1);      
// Optionally modify split mode (default 'se')    
   plugin->SetSplitMode("se");
   return plugin;
}
开发者ID:ktf,项目名称:AliPhysics,代码行数:98,代码来源:CreateAlienHandlerPbPb.C

示例14: CreateAlienHandler

AliAnalysisGrid* CreateAlienHandler(const char* mode, bool isMC){
  AliAnalysisAlien *plugin = new AliAnalysisAlien();
  // Set the run mode (can be "full", "test", "offline", "submit" or "terminate")
  plugin->SetRunMode(gridmode.Data());
  // Set versions of used packages
  plugin->SetAPIVersion("V1.1x");
  plugin->SetAliPhysicsVersion("vAN-20170425-1");
  plugin->SetExecutableCommand("aliroot -b -q");
  // Declare the analysis source files names separated by blancs. To be compiled runtime
  // using ACLiC on the worker nodes.
  //plugin->SetAdditionalLibs("libPWGLFnuclex.so");
  plugin->AddIncludePath("-I. -I$ROOTSYS/include -I$ALICE_ROOT/include -I$ALICE_PHYSICS/include");

  // Declare all libraries (other than the default ones for the framework. These will benloaded by the generated analysis macro. Add all extra files (task .cxx/.h) here.

  // Declare the output file names separated by blancs.
  // (can be like: file.root or [email protected]::Niham::File)
  // To only save certain files, use SetDefaultOutputs(kFALSE), and then
  // SetOutputFiles("list.root other.filename") to choose which files to save
  plugin->SetDefaultOutputs();
  //plugin->SetOutputFiles("list.root");

  // Optionally set a name for the generated analysis macro (default MyAnalysis.C)
  plugin->SetAnalysisMacro(Form("%s.C",kTaskName.Data()));

  // Optionally set maximum number of input files/subjob (default 100, put 0 to ignore)
  plugin->SetSplitMaxInputFileNumber(kJobSplitting);

  // Optionally modify the executable name (default analysis.sh)
  plugin->SetExecutable(Form("%s.sh",kTaskName.Data()));

  // set number of test files to use in "test" mode
  plugin->SetNtestFiles(2);

  // file containing a list of chuncks to be used for testing
  plugin->SetFileForTestMode("testdata");

  // Optionally resubmit threshold.
  plugin->SetMasterResubmitThreshold(90);

  // Optionally set time to live (default 30000 sec)
  plugin->SetTTL(30000);

  // Optionally set input format (default xml-single)
  plugin->SetInputFormat("xml-single");

  // Optionally modify the name of the generated JDL (default analysis.jdl)
  plugin->SetJDLName(Form("%s.jdl",kTaskName.Data()));

  // Optionally modify job price (default 1)
  plugin->SetPrice(1);

  // Optionally modify split mode (default 'se')
  plugin->SetSplitMode("se");

  return plugin;
}
开发者ID:ktf,项目名称:AliPhysics,代码行数:57,代码来源:rundStarTask.C

示例15: CreateAlienHandlerHadEt

AliAnalysisGrid* CreateAlienHandlerHadEt(Int_t dataset, Bool_t data, Int_t test, Int_t material, Bool_t altV0Scale = kFALSE, bool runCompiledVersion = kFALSE, int simflag = 0)
{
  // Check if user has a valid token, otherwise make one. This has limitations.
  // One can always follow the standard procedure of calling alien-token-init then
  //   source /tmp/gclient_env_$UID in the current shell.
  //if (!AliAnalysisGrid::CreateToken()) return NULL;
  AliAnalysisAlien *plugin = new AliAnalysisAlien();

  // Overwrite all generated files, datasets and output results from a previous session
  plugin->SetOverwriteMode();
  // Set the run mode (can be "full", "test", "offline", "submit" or "terminate")
  if(test==1){
    plugin->SetRunMode("test");  // VERY IMPORTANT - DECRIBED BELOW
  }
  else{
    if(test==0){
      plugin->SetRunMode("full");  // VERY IMPORTANT - DECRIBED BELOW
    }
    else{
      plugin->SetRunMode("terminate");  // VERY IMPORTANT - DECRIBED BELOW
    }
  }
  //needed for local testing?
  //plugin->SetFileForTestMode("files.txt"); // file should contain path name to a local directory containg *ESDs.root etc
  // Set versions of used packages 
   plugin->SetAPIVersion("V1.1x");
   plugin->SetROOTVersion("v5-34-08-6");
   plugin->SetAliROOTVersion("vAN-20140624");
  // Declare input data to be processed.

   plugin->AddIncludePath("-I$ALICE_ROOT/PWGUD/base  -I$ALICE_ROOT/ANALYSIS -I$ALICE_ROOT/PWGPP -I$ALICE_ROOT/PWGPP/ITS");
  // Method 1: Create automatically XML collections using alien 'find' command.
  // Define production directory LFN
  //   plugin->SetGridDataDir("/alice/sim/LHC10a18");
  // Set data search pattern
  //   plugin->SetDataPattern("*ESDs.root");  // simulated, tags not used
  //   plugin->SetDataPattern("*ESDs/pass4/*ESDs.root"); // real data check reco pass and data base directory
  //   plugin->SetRunPrefix("000");   // real data
  //   plugin->SetDataPattern("*tag.root");  // Use ESD tags (same applies for AOD's)
  // ...then add run numbers to be considered
  //   plugin->AddRunNumber(125020);    // simulated
  //   plugin->AddRunNumber(104065);  // real data

  // Method 2: Declare existing data files (raw collections, xml collections, root file)
  // If no path mentioned data is supposed to be in the work directory (see SetGridWorkingDir())
  // XML collections added via this method can be combined with the first method if
  // the content is compatible (using or not tags)
  //plugin->AddDataFile("tag.xml");
  //   plugin->AddDataFile("/alice/data/2008/LHC08c/000057657/raw/Run57657.Merged.RAW.tag.root");
   TString outputdir = "etPbPbSim";
   if(data)outputdir = "etPbPbData";
  if(dataset==20100){//PbPb 2.76 TeV
    if(data){//185 jobs
      cout<<"Running over data"<<endl;
      plugin->SetGridDataDir("/alice/data/2010/LHC10h");//PbPb data
      plugin->SetDataPattern("*ESDs/pass2/*ESDs.root");
      plugin->SetRunPrefix("000");   // real data

    }
    else{
      cout<<"Running over MC"<<endl;
      if(material==0){
	  plugin->SetGridDataDir("/alice/sim/LHC11a10a_bis");
	//plugin->SetGridDataDir("/alice/sim/LHC11a4_bis");//PbPb simulation
      }
      if(material==1){//7% more material
	plugin->SetGridDataDir("/alice/sim/LHC10h9");//PbPb simulation
      }
      if(material==-1){//7% less material
	plugin->SetGridDataDir("/alice/sim/LHC10h10");//PbPb simulation
      }
      if(material==10){//OK it's a cheat but this runs on DPM jet
	plugin->SetGridDataDir("/alice/sim/LHC10h2");//PbPb simulation
      }
      if(material==11){//OK it's a cheat but this runs on AMPT
	plugin->SetGridDataDir(" /alice/sim/LHC11a9a");//PbPb simulation
	plugin->AddRunNumber(137366);
      }
      plugin->SetDataPattern("*ESDs.root");
      //plugin->SetGridWorkingDir("etPbPbSim");
    }
    if(simflag==0){//not really using it as a simflag but that way I don't need a new argument...
      plugin->AddRunNumber(139465);
      outputdir += "139465";
    }
    if(simflag==1){//not really using it as a simflag but that way I don't need a new argument...
      outputdir += "138442";
      plugin->AddRunNumber(138442);
    }
    if(simflag==2){//not really using it as a simflag but that way I don't need a new argument...
      outputdir += "138364";
      plugin->AddRunNumber(138364);
    }
    if(simflag==3){//not really using it as a simflag but that way I don't need a new argument...
      outputdir += "138396";
      plugin->AddRunNumber(138396);
    }
    if(simflag==4){//not really using it as a simflag but that way I don't need a new argument...
      outputdir += "137722";
      plugin->AddRunNumber(137722);
//.........这里部分代码省略.........
开发者ID:ktf,项目名称:AliPhysics,代码行数:101,代码来源:CreateAlienHandlerHadEt.C


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