本文整理汇总了C++中AliAnalysisAlien::SetNumberOfReplicas方法的典型用法代码示例。如果您正苦于以下问题:C++ AliAnalysisAlien::SetNumberOfReplicas方法的具体用法?C++ AliAnalysisAlien::SetNumberOfReplicas怎么用?C++ AliAnalysisAlien::SetNumberOfReplicas使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AliAnalysisAlien
的用法示例。
在下文中一共展示了AliAnalysisAlien::SetNumberOfReplicas方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: 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);
//.........这里部分代码省略.........