本文整理汇总了C++中AliAnalysisManager::SetCacheSize方法的典型用法代码示例。如果您正苦于以下问题:C++ AliAnalysisManager::SetCacheSize方法的具体用法?C++ AliAnalysisManager::SetCacheSize怎么用?C++ AliAnalysisManager::SetCacheSize使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AliAnalysisManager
的用法示例。
在下文中一共展示了AliAnalysisManager::SetCacheSize方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: QAtrainAOD
void QAtrainAOD(Bool_t isMC=kFALSE, Int_t iCollisionType=0){
if(gSystem->Getenv("ALIEN_JDL_LPMINTERACTIONTYPE")){
for (Int_t icoll = 0; icoll < kNSystem; icoll++)
if (strcmp(gSystem->Getenv("ALIEN_JDL_LPMINTERACTIONTYPE"), CollisionSystem[icoll]) == 0){
iCollisionType = icoll;
break;
}
}
printf("--------------------------------------\n");
if(isMC) printf("Run the AOD QA train for Monte Carlo\n");
else printf("Run the AOD QA train for data\n");
printf("Collision System is %s\n",CollisionSystem[iCollisionType]);
printf("--------------------------------------\n");
UInt_t kTriggerMask = AliVEvent::kINT7 | AliVEvent::kINT8;
if(gSystem->Getenv("ALIEN_JDL_LPMANCHORYEAR"))
{
Int_t year = atoi(gSystem->Getenv("ALIEN_JDL_LPMANCHORYEAR"));
if(year <= 2015)
kTriggerMask = AliVEvent::kAnyINT;
}
// Create manager
AliAnalysisManager *mgr = new AliAnalysisManager("QAtrainAOD", "AOD QA train");
mgr->SetCacheSize(0);
mgr->SetCommonFileName("QAresults_AOD.root");
// Input handler
AliESDInputHandlerRP *esdHandler = new AliESDInputHandlerRP();
AliAODInputHandler* aodHandler = new AliAODInputHandler();
mgr->SetInputEventHandler(aodHandler);
if(isMC){
AliMCEventHandler* MChandler = new AliMCEventHandler;
MChandler->SetReadTR(kFALSE);
mgr->SetMCtruthEventHandler(MChandler);
}
TString macroName="";
// Physics selection
gROOT->LoadMacro("$ALICE_PHYSICS/OADB/macros/AddTaskPhysicsSelection.C");
AliPhysicsSelectionTask* physSelTask = AddTaskPhysicsSelection(isMC);
mgr->AddStatisticsTask(kTriggerMask);
AliAnalysisDataContainer *cstatsout = (AliAnalysisDataContainer*)mgr->GetOutputs()->FindObject("cstatsout");
cstatsout->SetFileName("EventStat_temp_AOD.root");
// PID response
gROOT->LoadMacro("$ALICE_ROOT/ANALYSIS/macros/AddTaskPIDResponse.C");
AliAnalysisTaskSE *setupTask = AddTaskPIDResponse(isMC);
// PIDqa
gROOT->LoadMacro("$ALICE_ROOT/ANALYSIS/macros/AddTaskPIDqa.C");
AliAnalysisTaskPIDqa *PIDQA = AddTaskPIDqa();
PIDQA->SelectCollisionCandidates(AliVEvent::kAny);
// MultSelection
gROOT->LoadMacro("$ALICE_PHYSICS/OADB/COMMON/MULTIPLICITY/macros/AddTaskMultSelection.C");
AliMultSelectionTask *taskMult = AddTaskMultSelection();
if(isMC){
if (gSystem->Getenv("CONFIG_PERIOD")){
TString periodName = gSystem->Getenv("CONFIG_PERIOD");
taskMult->SetAlternateOADBforEstimators(periodName);
}
}
// Vertex QA
macroName="$ALICE_PHYSICS/PWGPP/macros/AddTaskCheckVertexAOD.C";
if(gSystem->Exec(Form("ls %s > /dev/null 2>&1",macroName.Data()))==0){
gROOT->LoadMacro(macroName.Data());
Double_t maxMult=500.;
if(iCollisionType==kPbPb || iCollisionType==kXeXe) maxMult=10000.;
AliAnalysisTaskCheckVertexAOD *taskVert = AddTaskCheckVertexAOD("QA",maxMult,AliVEvent::kAnyINT,isMC);
}else{
printf("Macro %s not found -> task will not be executed\n",macroName.Data());
}
// Track QA
macroName="$ALICE_PHYSICS/PWGPP/macros/AddTaskCheckAODTracks.C";
if(gSystem->Exec(Form("ls %s > /dev/null 2>&1",macroName.Data()))==0){
gROOT->LoadMacro(macroName.Data());
Bool_t usMCtruthForPID=isMC;
AliAnalysisTaskCheckAODTracks* taskAODtr = AddTaskCheckAODTracks("QA",isMC,usMCtruthForPID);
if(iCollisionType==kPbPb || iCollisionType==kXeXe) taskAODtr->SetUpperMultiplicity(10000.);
}else{
printf("Macro %s not found -> task will not be executed\n",macroName.Data());
}
// HF deltaAOD QA
macroName="$ALICE_PHYSICS/PWGHF/vertexingHF/macros/AddTaskBasicHFQA.C";
if(gSystem->Exec(Form("ls %s > /dev/null 2>&1",macroName.Data()))==0){
gROOT->LoadMacro(macroName.Data());
AliAnalysisTaskSEHFQA* dqaHF = AddTaskBasicHFQA(AliAnalysisTaskSEHFQA::kD0toKpi,isMC,"QA");
}else{
printf("Macro %s not found -> task will not be executed\n",macroName.Data());
}
if(isMC){
macroName="$ALICE_PHYSICS/PWGHF/vertexingHF/macros/AddTaskDmesonMCPerform.C";
if(gSystem->Exec(Form("ls %s > /dev/null 2>&1",macroName.Data()))==0){
//.........这里部分代码省略.........
示例2: AODtrain
//______________________________________________________________________________
void AODtrain(Int_t merge=0)
{
// Main analysis train macro.
ProcessEnvironment();
UpdateFlags();
PrintSettings();
if (merge || doCDBconnect) {
TGrid::Connect("alien://");
if (!gGrid || !gGrid->IsConnected()) {
::Error("AODtrain", "No grid connection");
return;
}
}
// Set temporary merging directory to current one
gSystem->Setenv("TMPDIR", gSystem->pwd());
// Set temporary compilation directory to current one
gSystem->SetBuildDir(gSystem->pwd(), kTRUE);
printf("==================================================================\n");
printf("=========== RUNNING FILTERING TRAIN ==========\n");
printf("=========== Collision System is %s ==========\n",CollisionSystem[iCollision]);
printf("==================================================================\n");
printf("= Configuring analysis train for: =\n");
if (usePhysicsSelection) printf("= Physics selection =\n");
if (useTender) printf("= TENDER =\n");
if (iESDfilter) printf("= ESD filter =\n");
if (iMUONcopyAOD) printf("= MUON copy AOD =\n");
if (iJETAN) printf("= Jet analysis =\n");
if (iJETANdelta) printf("= Jet delta AODs =\n");
if (iPWGHFvertexing) printf("= PWGHF vertexing =\n");
if (iPWGDQJPSIfilter) printf("= PWGDQ j/psi filter =\n");
if (iPWGHFd2h) printf("= PWGHF D0->2 hadrons QA =\n");
// Make the analysis manager and connect event handlers
AliAnalysisManager *mgr = new AliAnalysisManager("Analysis Train", "Production train");
mgr->SetCacheSize(0);
if (useSysInfo) {
//mgr->SetNSysInfo(100);
AliSysInfo::SetVerbose(kTRUE);
}
// Create input handler (input container created automatically)
// ESD input handler
AliESDInputHandler *esdHandler = new AliESDInputHandler();
mgr->SetInputEventHandler(esdHandler);
// Monte Carlo handler
if (useMC) {
AliMCEventHandler* mcHandler = new AliMCEventHandler();
mgr->SetMCtruthEventHandler(mcHandler);
mcHandler->SetReadTR(useTR);
}
// AOD output container, created automatically when setting an AOD handler
if (iAODhandler) {
// AOD output handler
AliAODHandler* aodHandler = new AliAODHandler();
aodHandler->SetOutputFileName("AliAOD.root");
mgr->SetOutputEventHandler(aodHandler);
}
// Debugging if needed
if (useDBG) mgr->SetDebugLevel(3);
AddAnalysisTasks(cdbPath);
if (merge) {
AODmerge();
mgr->InitAnalysis();
mgr->SetGridHandler(new AliAnalysisAlien);
mgr->StartAnalysis("gridterminate",0);
return;
}
// Run the analysis
//
TChain *chain = CreateChain();
if (!chain) return;
TStopwatch timer;
timer.Start();
mgr->SetSkipTerminate(kTRUE);
if (mgr->InitAnalysis()) {
mgr->PrintStatus();
mgr->StartAnalysis("local", chain);
}
timer.Print();
}