本文整理汇总了C++中AliAnalysisAlien::SetPrice方法的典型用法代码示例。如果您正苦于以下问题:C++ AliAnalysisAlien::SetPrice方法的具体用法?C++ AliAnalysisAlien::SetPrice怎么用?C++ AliAnalysisAlien::SetPrice使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AliAnalysisAlien
的用法示例。
在下文中一共展示了AliAnalysisAlien::SetPrice方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: AliAnalysisAlien
AliAnalysisAlien *CreateGridHandler(){
//
// Setup main settings of the Alien plugin
//
AliAnalysisAlien *plugin = new AliAnalysisAlien();
plugin->SetRunMode(g_plugin_mode.Data());
if(!g_plugin_mode.CompareTo("Terminate"))
plugin->SetMergeViaJDL(kFALSE);
else
plugin->SetMergeViaJDL(kTRUE);
plugin->SetOverwriteMode();
plugin->SetNtestFiles(1);
plugin->SetAPIVersion("V1.1x");
plugin->SetROOTVersion(g_root_version.Data());
plugin->SetAliROOTVersion(g_aliroot_version.Data());
plugin->SetOutputToRunNo();
plugin->AddIncludePath("-I. .I$ALIEN_ROOT/api/lib -I$ROOTSYS/lib -I$ROOTSYS/include -I$ALICE_ROOT/include -I$ALICE_ROOT/PWGHF/ -I$ALICE_ROOT/PWGHF/hfe/macros -I$ALICE_ROOT/PWGHF/hfe -I$ALICE_ROOT/ANALYSIS -I$ALICE_ROOT/TENDER/Tender -I$ALICE_ROOT/TENDER/TenderSupplies -I$ALICE_ROOT/PWG/ -I$ALICE_ROOT/PWG/FLOW -I$ALICE_ROOT/PWG/Base -I$ALICE_ROOT/PWG/Tasks");
plugin->SetAdditionalLibs("libGui.so libXMLParser.so libSTEERBase.so libESD.so libAOD.so libCDB.so libANALYSIS.so libANALYSISalice.so libCORRFW.so libPWGflowBase.so libPWGflowTasks.so libPWGHFhfe.so libTender.so libProof.so libRAWDatabase.so libSTEER.so libTOFbase.so libPWGTRD.so");
plugin->SetDefaultOutputs(kFALSE);
plugin->SetOutputFiles("AnalysisResults.root");
plugin->SetExecutableCommand("aliroot -b -q");
plugin->SetTTL(30000);
plugin->SetInputFormat("xml-single");
plugin->SetPrice(1);
plugin->SetSplitMode("se");
return plugin;
}
示例2: 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;
}
示例3: 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;
}
示例4: 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;
}
示例5:
//___________________________________________________________
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;
}
示例6: RunMacro
void RunMacro(){
// check the function for asymmetric TPC cut in ConfigHFEemcalMod....the rest is still necessary????
// Firstly, set some variables
const char* launch = "grid"; // grid, local (if your data is on your local machine, doesn't connect at all)
const char* mode = "test"; //test, full, terminate (test= connect to grid but run locally, full= run on grid, terminate= merge output on grid)
Bool_t pre_final_stage = kTRUE; //TRUE = merging done on grid, FALSE = merge happens locally
Int_t cyclenumber = 1;
Bool_t debug = kTRUE;
char* work_dir = "PhiCorrelations_LHC16q_0_20_noveto";
char* output_dir = "output_2018_10_22_FAST";
Int_t ttl = 50000;
Int_t noffiles = 40;
Int_t runcycle[]={0,1,31};
//Int_t runcycle[]={0,16,31};
Bool_t UseParfiles = kFALSE;
// load libraries
LoadLibraries();
// create and customize the alien handler
AliAnalysisAlien *alienHandler = new AliAnalysisAlien();
alienHandler->AddIncludePath("-I. -I$ROOTSYS/include -I$ALICE_ROOT -I$ALICE_ROOT/EMCAL -I$ALICE_ROOT/PYTHIA6 -I$ALICE_ROOT/ANALYSIS -I$ALICE_PHYSICS/PWGGA -I$ALICE_PHYSICS/PWGHF -I$ALICE_PHYSICS/PWGHF/hfe -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_PHYSICS/OADB -I$ALICE_PHYSICS/PWGHF/base -I$ALICE_ROOT/include -I$ALICE_ROOT/ITS -I$ALICE_ROOT/TPC -I$ALICE_ROOT/CONTAINERS -I$ALICE_ROOT/STEER -I$ALICE_ROOT/TRD -I$ALICE_ROOT/macros -I$ALICE_ROOT/ANALYSIS -I$ALICE_PHYSICS/OADB/macros -I$ALICE_PHYSICS/PWGCF/Correlations -I$ALICE_PHYSICS/PWGCF -I$ALICE_PHYSICS/PWGCF/Correlations/Base -I$ALICE_PHYSICS/include -g");
alienHandler->SetAdditionalLibs("AliAnalysisTaskHadronPhiCorr_current.cxx AliAnalysisTaskHadronPhiCorr_current.h AddTaskHadronPhiCorr_current.C libpythia6.so libEGPythia6.so libAliPythia6.so libPWGHFhfe.so libCDB.so libSTEER.so libCORRFW.so libPWGflowBase.so libPWGflowTasks.so libGui.so libProof.so libMinuit.so libXMLParser.so libRAWDatabase.so libRAWDatarec.so libCDB.so libSTEERBase.so libSTEER.so libTPCbase.so libTOFbase.so libTOFrec.so libTRDbase.so libVZERObase.so libVZEROrec.so libT0base.so libT0rec.so libPWGTools.so libPWGCFCorrelationsBase.so");
alienHandler->SetAnalysisSource("AliAnalysisTaskHadronPhiCorr_current.cxx");
//alienHandler->SetOverwriteMode();
alienHandler->SetRunMode(mode);
alienHandler->SetNtestFiles(2);
//alienHandler->SetAPIVersion("V1.1x");
alienHandler->SetAliPhysicsVersion("vAN-20170731-1");
//alienHandler->SetFileForTestMode("File_LHC12dPass1.txt"); //txt file that tells where to look for local files if launch=local
//alienHandler->SetGridDataDir("/alice/sim/LHC10d4/");
//alienHandler->SetDataPattern("*ESDs.root");
alienHandler->SetGridDataDir("//alice/data/2016/LHC16q/");
alienHandler->SetDataPattern("*/pass1_FAST/AOD/*/*AOD.root");
//alienHandler->SetDataPattern("*/pass4/AOD/*AOD.root");
alienHandler->SetRunPrefix("000"); // IMPORTANT! Only need for real data, comment this line out for MC data
//LHC12d
//Int_t runArray[] = {186320, 186319, 186318, 186229, 186208, 186205, 186200, 186167, 186165, 186164, 186163, 185912, 185909, 185784, 185778, 185776, 185775, 185768, 185765, 185764, 185757, 185756, 185738, 185735, 185734, 185701, 185699, 185698, 185697, 185695, 185687, 185680, 185589, 185588, 185583, 185582, 185581, 185580, 185578};
//Int_t runArray[] = {186320, 186319, 186318, 186229, 186208, 186205, 186200, 186167, 186165, 186164, 186163, 185912, 185909, 185784, 185778, 185776, 185775, 185768, 185765, 185764, 185757, 185756, 185738, 185735, 185734, 185701, 185699, 185698, 185697, 185695, 185687, 185680, 185589, 185588, 185583, 185582, 185581, 185580, 185578, 185575, 185574, 185565, 185563, 185474, 185465, 185461, 185457, 185375, 185371, 185363, 185362, 185361, 185360, 185359, 185356, 185351, 185350, 185349, 185303, 185302, 185300, 185299, 185296, 185293, 185292, 185291, 185289, 185288, 185284, 185282, 185221, 185217, 185208, 185206, 185203, 185198, 185196, 185189};
//LHC13b
//Int_t runArray[] = {195483, 195482, 195481, 195480, 195479, 195478, 195391, 195389, 195351, 195346, 195344};
//LHC13c
//Int_t runArray[] = {195529, 195531, 195566, 195567, 195568, 195592, 195593, 195596, 195633, 195635, 195644, 195673, 195675, 195677};
//LHC10d4 - MC Data
//Int_t runArray[] = {119159, 119161, 119163, 119841, 119842, 119844, 119845, 119846, 119849, 119853, 119856, 119859, 119862, 120067, 120069, 120072, 120073, 120076, 120079, 120244, 120503, 120504, 120505, 120616, 120617, 120671, 120741, 120750, 120758, 120820, 120821, 120822, 120823, 120824, 120825, 120829};
// Int_t runArray[] = {120073}; //for testing why files were being opened but not closed
//LHC16r - 8 TeV pPb data
//Int_t runArray[] = {266318, 266317, 266316, 266305, 266304, 266300, 266299, 266296, 266208, 266197, 266196, 266193, 266190, 266189, 266187, 266117, 266086, 266085, 266084, 266083, 266081, 266076, 266074, 266034, 265797, 265795, 265789, 265788, 265756, 265754, 265746, 265744, 265742, 265741, 265714, 265713,265709, 265705, 265701, 265700, 265698, 265697, 265696, 265607, 265596, 265594};
//Int_t runArray[] = {266318, 266317, 266316, 266208, 266197, 266196, 266187, 265754, 265744, 265607, 265596, 265594};
//LHC16q - 5 TeV pPb data
Int_t runArray[] = {265525, 265521, 265501, 265500, 265499, 265435, 265427, 265426, 265425, 265424, 265422, 265421, 265420, 265419, 265388, 265387, 265385, 265384, 265383, 265381, 265378, 265377, 265344, 265343, 265342, 265339, 265338, 265336, 265334, 265332, 265309};
for (Int_t i = runcycle[cyclenumber - 1]; i < runcycle[cyclenumber] ; i++)
{
if (i == sizeof(runArray) / sizeof(runArray[1])) break;
alienHandler->AddRunNumber(runArray[i]);
}
printf("\n\nSetting Up alienHandler.\n\n");
alienHandler->SetGridWorkingDir(work_dir);
alienHandler->SetGridOutputDir(output_dir);
alienHandler->SetDefaultOutputs(kTRUE);
alienHandler->SetAnalysisMacro("PhiInvMass.C");
alienHandler->SetSplitMaxInputFileNumber(noffiles);
alienHandler->SetExecutable("PhiInvMass.sh");
alienHandler->SetExecutableCommand("aliroot -b -q");
alienHandler->SetTTL(ttl); //10000
alienHandler->SetInputFormat("xml-single");
alienHandler->SetJDLName("PhiInvMass.jdl");
alienHandler->SetPrice(1);
alienHandler->SetSplitMode("se");
alienHandler->SetMasterResubmitThreshold(10);
alienHandler->SetMergeExcludes("EventStat_temp.root");
alienHandler->SetOutputToRunNo(kTRUE);
alienHandler->SetKeepLogs(kTRUE);
alienHandler->SetMaxMergeFiles(15);
alienHandler->SetMaxMergeStages(7);
alienHandler->SetMergeViaJDL(pre_final_stage);
// alienHandler->SetOneStageMerging(kFALSE); //???????????????????????????????-------------------
if (!alienHandler) return;
// load the necessary macros
//gROOT->LoadMacro("$ALICE_ROOT/ANALYSIS/macros/AddTaskPhysicsSelection.C");
//gROOT->LoadMacro("$ALICE_ROOT/ANALYSIS/macros/AddTaskPIDResponse.C");
// Use AliRoot includes to compile our task
gROOT->ProcessLine(".include $ALICE_ROOT/include");
gROOT->ProcessLine(".include $ALICE_ROOT/EMCAL");
//.........这里部分代码省略.........
示例7: runWithHandler
AliAnalysisGrid* runWithHandler()
{
// Check if user has a valid token, otherwise make one. This has limitations.
if (!AliAnalysisGrid::CreateToken()) return NULL;
AliAnalysisAlien *plugin = new AliAnalysisAlien();
// Set the run mode (can be "full", "test", "offline", "submit" or "terminate")
plugin->SetRunMode("full");
// Set versions of used packages
plugin->SetAPIVersion("V1.1x");
plugin->SetROOTVersion("v5-26-00b-2");
plugin->SetAliROOTVersion("v4-19-10-AN");
// Declare input data to be processed.
// Method 1: Create automatically XML collections using alien 'find' command.
// Define production directory LFN
//plugin->SetGridDataDir("/alice/sim/LHC10a6");
// On real reconstructed data:
plugin->SetGridDataDir("/alice/data/2009/LHC09d");
// Set data search pattern
//plugin->SetDataPattern("*ESDs.root");
// Data pattern for reconstructed data
plugin->SetDataPattern("*ESDs/pass4/*ESDs.root");
plugin->SetRunPrefix("000"); // real data
// ...then add run numbers to be considered
plugin->AddRunNumber(104824);
// plugin->AddRunNumber(104065); // real data
// 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("TrackletsTask");
// 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("AliTrackletsTask.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("AliTrackletsTask.h AliTrackletsTask.cxx");
// Declare the output file names separated by blancs.
// (can be like: file.root or [email protected]::Niham::File)
//plugin->SetOutputFiles("Pt.ESD.1.root");
plugin->SetDefaultOutputs();
// 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("MacroTrackletsTask.C");
// Optionally set maximum number of input files/subjob (default 100, put 0 to ignore)
plugin->SetSplitMaxInputFileNumber(50);
// Optionally modify the executable name (default analysis.sh)
plugin->SetExecutable("ExecutableTrackletsTask.sh");
// 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(28000);
// Optionally set input format (default xml-single)
plugin->SetInputFormat("xml-single");
// Optionally modify the name of the generated JDL (default analysis.jdl)
plugin->SetJDLName("JdlTrackletsTask.jdl");
// Optionally modify job price (default 1)
plugin->SetPrice(1);
// Optionally modify split mode (default 'se')
plugin->SetSplitMode("se");
return plugin;
}
示例8: 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;
}
示例9: 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 !!!");
}
示例10: CreateAlienHandler
//.........这里部分代码省略.........
cout<<"-->>>>>>>>>>>>>>>>>>>>>>>>> 2"<<endl;
// plugin->SetAdditionalLibs("libTree.so libGeom.so libPhysics.so libVMC.so libMinuit.so libSTEERBase.so libESD.so libAOD.so libANALYSIS.so libOADB.so libANALYSISalice.so libCORRFW.so libPWGHFbase.so libPWGflowBase.so libPWGflowTasks.so libPWGHFvertexingHF.so");
// plugin->SetAnalysisSource("AliAnalysisTaskESDMuonFilterO.cxx");
//plugin->SetAnalysisSource("AliAODMuonReplicator0.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("AliAODMuonReplicator0_cxx.so");
// plugin->SetAdditionalLibs("AliAnalysisTaskESDMuonFilterO_cxx.so");
//questo
plugin->SetAdditionalLibs("libSTEERBase.so libESD.so AliAnalysisTaskFlowd.h AliAnalysisTaskFlowd.cxx libPWGflowBase.so libPWGflowTasks.so libPWGHFbase.so libPWGHFvertexingHF.so");
plugin->AddIncludePath("-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");
// plugin->SetAdditionalLibs("AliAODMuonReplicator0.h AliAODMuonReplicator0.cxx");
// plugin->SetAdditionalLibs("AliAnalysisTaskESDMuonFilterO.h AliAnalysisTaskESDMuonFilterO.cxx");
//plugin->SetAdditionalLibs("AliAODMuonReplicator0.h AliAODMuonReplicator0.cxx AliAnalysisTaskESDMuonFilterO.h AliAnalysisTaskESDMuonFilterO.cxx");
cout<<"-->>>>>>>>>>>>>>>>>>>>>>>>> 3"<<endl;
// plugin->SetAdditionalLibs("AliAODMuonReplicator0.h AliAODMuonReplicator0.cxx");
// plugin->SetAdditionalLibs("AliAnalysisTaskESDMuonFilterO.h AliAnalysisTaskESDMuonFilterO.cxx");
// 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",taskname));
// Optionally set maximum number of input files/subjob (default 100, put 0 to ignore)
plugin->SetSplitMaxInputFileNumber(10);
// Optionally modify the executable name (default analysis.sh)
plugin->SetExecutable(Form("%s.sh",taskname));
// set number of test files to use in "test" mode
plugin->SetNtestFiles(1);
// file containing a list of chuncks to be used for testin
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",taskname));
// Optionally modify job price (default 1)
plugin->SetPrice(1);
// Optionally modify split mode (default 'se')
plugin->SetSplitMode("se");
//----------------------------------------------------------
//--- PROOF MODE SPECIFIC SETTINGS ------------
//----------------------------------------------------------
// Proof cluster
plugin->SetProofCluster(proofcluster);
// Dataset to be used
plugin->SetProofDataSet(proofdataset);
// May need to reset proof. Supported modes: 0-no reset, 1-soft, 2-hard
plugin->SetProofReset(0);
// May limit number of workers
plugin->SetNproofWorkers(0);
// May limit the number of workers per slave
plugin->SetNproofWorkersPerSlave(1);
// May use a specific version of root installed in proof
plugin->SetRootVersionForProof("current");
// May set the aliroot mode. Check http://aaf.cern.ch/node/83
plugin->SetAliRootMode("default"); // Loads AF libs by default
// May request ClearPackages (individual ClearPackage not supported)
plugin->SetClearPackages(kFALSE);
// Plugin test mode works only providing a file containing test file locations, used in "local" mode also
plugin->SetFileForTestMode("files.txt"); // file should contain path name to a local directory containg *ESDs.root etc
// Request connection to alien upon connection to grid
plugin->SetProofConnectGrid(kFALSE);
cout<<"-->>>>>>>>>>>>>>>>>>>>>>>>> 4"<<endl;
return plugin;
cout<<"-->>>>>>>>>>>>>>>>>>>>>>>>> 5"<<endl;
}
示例11: CreateAlienHandlerHadEt
//.........这里部分代码省略.........
if(altV0Scale) plugin->SetGridWorkingDir("etpp276TeVSimAlt");
else{
// plugin->SetGridWorkingDir("etpp276TeVSim");
if(simflag==0) plugin->SetGridWorkingDir("etpp276TeVSim");//
if(simflag==1) plugin->SetGridWorkingDir("etpp276TeVSimPYTHIA");//PYTHIA
if(simflag==2) plugin->SetGridWorkingDir("etpp276TeVSimPHOJET");//PHOJET
if(simflag==3) plugin->SetGridWorkingDir("etpp276TeVSimPYTHIAFLAT");//PYTHIA Flat
}
}
}
if(dataset==2010){//pp 7 TeV
if(data){
plugin->SetGridWorkingDir("etpp7TeVData");
}
else{
if(simflag==0) plugin->SetGridWorkingDir("etpp7TeVSim");//
if(simflag==1) plugin->SetGridWorkingDir("etpp7TeVSimPYTHIA");//PYTHIA
if(simflag==2) plugin->SetGridWorkingDir("etpp7TeVSimPHOJET");//PHOJET
if(simflag==3) plugin->SetGridWorkingDir("etpp7TeVSimPYTHIAFLAT");//PYTHIA Flat
}
}
if(dataset==2012){//pp 8 TeV
if(data){
plugin->SetGridWorkingDir("etpp8TeVData");
}
else{
plugin->SetGridWorkingDir("etpp8TeVSim");
}
}
if(dataset==2013){//pPb
if(data){
plugin->SetGridWorkingDir("etpPb5TeVData");
}
else{
plugin->SetGridWorkingDir("etpPb5TeVSim");
}
}
}
cout<<"writing to "<<outputdir.Data()<<endl;
// Define alien work directory where all files will be copied. Relative to alien $HOME.
//plugin->SetGridWorkingDir("et");
// 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 IN THE SAME ORDER THEY ARE LISTED
// using ACLiC on the worker nodes.
//plugin->SetAnalysisSource("AliAnalysisTaskHadEt.cxx");
//plugin->SetAnalysisSource("AliAnalysisEt.cxx AliAnalysisEtMonteCarlo.cxx AliAnalysisEtMonteCarloPhos.cxx AliAnalysisEtReconstructed.cxx AliAnalysisEtReconstructedPhos.cxx AliAnalysisHadEt.cxx AliAnalysisHadEtMonteCarlo.cxx AliAnalysisHadEtReconstructed.cxx AliAnalysisTaskHadEt.cxx AliAnalysisTaskTotEt.cxx");
//TString sourcefiles = "AliAnalysisEtCuts.cxx AliAnalysisHadEtCorrections.cxx AliAnalysisEtCommon.cxx AliAnalysisHadEt.cxx AliAnalysisHadEtMonteCarlo.cxx AliAnalysisHadEtReconstructed.cxx AliAnalysisEtSelectionContainer.cxx AliAnalysisEtSelectionHandler.cxx AliAnalysisTaskTransverseEnergy.cxx AliAnalysisTaskHadEt.cxx";
//plugin->SetAnalysisSource(sourcefiles.Data());
if(!runCompiledVersion){
plugin->SetAnalysisSource("AliAnalysisEtCuts.cxx AliAnalysisHadEtCorrections.cxx AliAnalysisEtCommon.cxx AliAnalysisHadEt.cxx AliAnalysisHadEtMonteCarlo.cxx AliAnalysisHadEtReconstructed.cxx AliAnalysisTaskTransverseEnergy.cxx AliAnalysisTaskHadEt.cxx");
}
//cout<<"Setting source files "<<sourcefiles<<endl;
// 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.
//TString additionallibs = "AliAnalysisEtCuts.h AliAnalysisEtCuts.cxx AliAnalysisHadEtCorrections.h AliAnalysisHadEtCorrections.cxx AliAnalysisEtSelectionContainer.cxx AliAnalysisEtSelectionHandler.cxx AliAnalysisTaskTransverseEnergy.cxx AliAnalysisEtCommon.h AliAnalysisEtCommon.cxx AliAnalysisHadEt.cxx AliAnalysisHadEtMonteCarlo.cxx AliAnalysisHadEtReconstructed.cxx AliAnalysisTaskHadEt.cxx AliAnalysisHadEt.h AliAnalysisHadEtMonteCarlo.h AliAnalysisHadEtReconstructed.h AliAnalysisTaskHadEt.h AliAnalysisEtSelectionContainer.h AliAnalysisEtSelectionHandler.h AliAnalysisTaskTransverseEnergy.h corrections.root ConfigHadEtAnalysis.C ConfigHadEtMonteCarlo.C ConfigHadEtReconstructed.C physicsSelections.root";
//TString additionallibs = "AliAnalysisEtCuts.h AliAnalysisEtCuts.cxx AliAnalysisHadEtCorrections.h AliAnalysisHadEtCorrections.cxx AliAnalysisEtSelectionContainer.cxx AliAnalysisEtSelectionHandler.cxx AliAnalysisTaskTransverseEnergy.cxx AliAnalysisEtCommon.h AliAnalysisEtCommon.cxx AliAnalysisHadEt.cxx AliAnalysisHadEtMonteCarlo.cxx AliAnalysisHadEtReconstructed.cxx AliAnalysisTaskHadEt.cxx AliAnalysisHadEt.h AliAnalysisHadEtMonteCarlo.h AliAnalysisHadEtReconstructed.h AliAnalysisTaskHadEt.h AliAnalysisEtSelectionContainer.h AliAnalysisEtSelectionHandler.h AliAnalysisTaskTransverseEnergy.h physicsSelections.root ConfigHadEtMonteCarlo.C ConfigHadEtReconstructed.C corrections.root";
//plugin->SetAdditionalLibs(additionallibs.Data());
if(!runCompiledVersion){//
plugin->SetAdditionalLibs( "libPWGUDbase.so AliAnalysisEtCuts.h AliAnalysisEtCuts.cxx AliAnalysisHadEtCorrections.h AliAnalysisHadEtCorrections.cxx AliAnalysisTaskTransverseEnergy.cxx AliAnalysisEtCommon.h AliAnalysisEtCommon.cxx AliAnalysisHadEt.cxx AliAnalysisHadEtMonteCarlo.cxx AliAnalysisHadEtReconstructed.cxx AliAnalysisTaskHadEt.cxx AliAnalysisHadEt.h AliAnalysisHadEtMonteCarlo.h AliAnalysisHadEtReconstructed.h AliAnalysisTaskHadEt.h AliAnalysisTaskTransverseEnergy.h ConfigHadEtMonteCarlo.C ConfigHadEtReconstructed.C corrections.root");
}
else{
plugin->SetAdditionalLibs( "ConfigHadEtMonteCarlo.C ConfigHadEtReconstructed.C corrections.root libPWGUDbase.so libPWGLFtotEt.so");
}
// No need for output file names. Procedure is automatic. <-- not true
//plugin->SetDefaultOutputs(kFALSE);
//plugin->SetOutputFiles("Et.ESD.new.sim.root");
// No need define the files to be archived. Note that this is handled automatically by the plugin.
// plugin->SetOutputArchive("log_archive.zip:stdout,stderr");
// Set a name for the generated analysis macro (default MyAnalysis.C) Make this unique !
plugin->SetAnalysisMacro("ChristinesEtAnalysis.C");
// Optionally set maximum number of input files/subjob (default 100, put 0 to ignore). The optimum for an analysis
// is correlated with the run time - count few hours TTL per job, not minutes !
plugin->SetSplitMaxInputFileNumber(50);
if(dataset==2013){//pPb
plugin->SetSplitMaxInputFileNumber(20);
}
// 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(20000);
// Optionally set input format (default xml-single)
plugin->SetInputFormat("xml-single");
// Optionally modify the name of the generated JDL (default analysis.jdl)
plugin->SetJDLName("TaskEt.jdl");
// Optionally modify job price (default 1)
plugin->SetPrice(1);
// Optionally modify split mode (default 'se')
plugin->SetSplitMode("se");
plugin->SetTerminateFiles("event_stat.root") ;
plugin->SetKeepLogs();
plugin->SetMergeViaJDL();
return plugin;
}
示例12: 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);
//.........这里部分代码省略.........
示例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;
}
示例14: CreateAlienHandler
//.........这里部分代码省略.........
plugin->SetNrunsPerMaster(1);
plugin->SetOutputToRunNo();
// comment out the next line when using the "terminate" option, unless
// you want separate merged files for each run
plugin->SetMergeViaJDL();
// 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(taskname);
// Declare alien output directory. Relative to working directory.
plugin->SetGridOutputDir("out"); // In this case will be $HOME/taskname/out
// Declare the analysis source files names separated by blancs. To be compiled runtime
// using ACLiC on the worker nodes.
plugin->SetAnalysisSource("AliBalance.cxx AliAnalysisTaskBF.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->AddIncludePath("-I.");
//plugin->SetAdditionalLibs("libPWGCFebye.so");
plugin->SetAdditionalLibs("AliBalance.cxx AliBalance.h AliAnalysisTaskBF.cxx AliAnalysisTaskBF.h");
// 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",taskname));
// Optionally set maximum number of input files/subjob (default 100, put 0 to ignore)
plugin->SetSplitMaxInputFileNumber(100);
// Optionally modify the executable name (default analysis.sh)
plugin->SetExecutable(Form("%s.sh",taskname));
// set number of test files to use in "test" mode
plugin->SetNtestFiles(1);
// Optionally resubmit threshold.
plugin->SetMasterResubmitThreshold(90);
// Optionally set time to live (default 30000 sec)
plugin->SetTTL(90000);
// 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",taskname));
// Optionally modify job price (default 1)
plugin->SetPrice(1);
// Optionally modify split mode (default 'se')
plugin->SetSplitMode("se");
//plugin->SetUseSubmitPolicy();
//plugin->SetKeepLogs();
//----------------------------------------------------------
//--- PROOF MODE SPECIFIC SETTINGS ------------
//----------------------------------------------------------
// Proof cluster
plugin->SetProofCluster(proofcluster);
// Dataset to be used
plugin->SetProofDataSet(proofdataset);
// May need to reset proof. Supported modes: 0-no reset, 1-soft, 2-hard
plugin->SetProofReset(0);
// May limit number of workers
plugin->SetNproofWorkers(0);
// May limit the number of workers per slave
plugin->SetNproofWorkersPerSlave(1);
// May use a specific version of root installed in proof
plugin->SetRootVersionForProof("current");
// May set the aliroot mode. Check http://aaf.cern.ch/node/83
plugin->SetAliRootMode("default"); // Loads AF libs by default
// May request ClearPackages (individual ClearPackage not supported)
plugin->SetClearPackages(kFALSE);
// Plugin test mode works only providing a file containing test file locations, used in "local" mode also
plugin->SetFileForTestMode("files.txt"); // file should contain path name to a local directory containg *ESDs.root etc
// Request connection to alien upon connection to grid
plugin->SetProofConnectGrid(kFALSE);
plugin->Print();
return plugin;
}
示例15: CreateAlienHandler
AliAnalysisGrid* CreateAlienHandler(const char* mode = "offline")
{
//if (!AliAnalysisGrid::CreateToken()) return NULL;
AliAnalysisAlien *plugin = new AliAnalysisAlien();
plugin->SetRunMode(mode); // "full", "test", "offline", "submit" or "terminate"
plugin->SetMergeViaJDL(kTRUE);
plugin->SetOneStageMerging(kFALSE);
plugin->SetMaxMergeStages(2);
plugin->SetAPIVersion("V1.1x");
plugin->SetROOTVersion("v5-30-03");
plugin->SetAliROOTVersion("v5-02-16-AN");
// add data through aliensh find procedure.
//plugin->SetGridDataDir("/alice/sim/LHC11d2/");
plugin->SetGridDataDir("/alice/data/2011/LHC11e");
//plugin->SetDataPattern("*pass1/*ESDs.root");
//plugin->SetDataPattern("*tag.root");
//plugin->SetDataPattern("*pass1/*tag.root");
plugin->SetDataPattern("*AOD.root");
//plugin->AddRunNumber(119161);
//plugin->AddRunNumber("000162740");
//plugin->AddRunNumber("000161585");
plugin->AddRunNumber("000162644");
// Method 2: Declare existing data files
//plugin->AddDataFile("tag.xml");
// plugin->AddDataFile("/alice/data/2008/LHC08c/000057657/raw/Run57657.Merged.RAW.tag.root");
plugin->SetGridWorkingDir("eta");
plugin->SetGridOutputDir("output"); // In this case will be $HOME/work/output
// TString source = "";
// source += "EtaCandidate.cxx ";
// source += "EtaPriCandidate.cxx ";
// source += "EtaConfig.cxx ";
// source += "EtaOutput.cxx ";
// source += "EtaAnalysis.cxx ";
// source += "EtaTask.cxx ";
// plugin->SetAnalysisSource(source);
plugin->SetAnalysisSource("EtaCandidate.cxx EtaPriCandidate.cxx EtaConfig.cxx EtaOutput.cxx EtaAnalysis.cxx EtaTask.cxx");
// TString libs = source;
// libs += "EtaCandidate.h ";
// libs += " EtaPriCandidate.h";
// libs += " EtaConfig.h";
// libs += " EtaOutput.h";
// libs += " EtaAnalysis.h";
// libs += " EtaTask.h";
// plugin->SetAdditionalLibs(libs);
plugin->SetAdditionalLibs("EtaCandidate.h EtaCandidate.cxx EtaPriCandidate.h EtaPriCandidate.cxx EtaConfig.h EtaConfig.cxx EtaOutput.h EtaOutput.cxx EtaAnalysis.h EtaAnalysis.cxx EtaTask.h EtaTask.cxx");
plugin->SetDefaultOutputs(kTRUE);
//plugin->SetDefaultOutputs(kFALSE);
//plugin->SetOutputFiles("eta.output.ESD.root EventStat_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("EtaAnalysis.C");
plugin->SetExecutable("runEtaAnalysis.sh");
plugin->SetJDLName("EtaAnalysis.jdl");
plugin->SetSplitMaxInputFileNumber(100);
plugin->SetMaxInitFailed(5);
plugin->SetMasterResubmitThreshold(90);
plugin->SetTTL(43200);
plugin->SetInputFormat("xml-single");
plugin->SetPrice(1);
plugin->SetSplitMode("se");
return plugin;
}