本文整理汇总了C++中AliAnalysisManager::AddClassDebug方法的典型用法代码示例。如果您正苦于以下问题:C++ AliAnalysisManager::AddClassDebug方法的具体用法?C++ AliAnalysisManager::AddClassDebug怎么用?C++ AliAnalysisManager::AddClassDebug使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AliAnalysisManager
的用法示例。
在下文中一共展示了AliAnalysisManager::AddClassDebug方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: configFile
AliAnalysisTask *AddTask_jpsi_JPsiME(TString prod="",
Bool_t gridconf=kFALSE,
ULong64_t triggers=AliVEvent::kCentral | AliVEvent::kSemiCentral | AliVEvent::kMB) {
//get the current analysis manager
AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
if (!mgr) {
Error("AddTask_jpsi_JPsiME", "No analysis manager found.");
return 0;
}
//Do we have an MC handler?
Bool_t hasMC = kFALSE;
TString list = gSystem->Getenv("LIST");
if( list.IsNull()) list=prod;
if( list.Contains("LHC10h") || list.Contains("LHC11h") ) hasMC=kFALSE;
if( list.Contains("LHC11a10") || list.Contains("LHC12a17") ) hasMC=kTRUE;
//Do we have an AOD handler?
Bool_t isAOD=(mgr->GetInputEventHandler()->IsA()==AliAODInputHandler::Class() ? kTRUE : kFALSE);
// set AOD debug levels
if(isAOD) {
mgr->AddClassDebug("AliAODTrack", AliLog::kFatal);
mgr->AddClassDebug("AliAODpidUtil", AliLog::kInfo);
}
//set config file name
TString configFile("");
printf("%s \n",gSystem->pwd());
TString trainRoot=gSystem->Getenv("TRAIN_ROOT");
if (!trainRoot.IsNull())
configFile="$TRAIN_ROOT/jbook_jpsi/ConfigJpsiME_jpsi_PbPb.C"; // gsi config
else if(!gSystem->Exec("alien_cp alien:///alice/cern.ch/user/j/jbook/PWGDQ/dielectron/macrosJPSI/ConfigJpsiME_jpsi_PbPb.C .")) {
gSystem->Exec(Form("ls -l %s",gSystem->pwd()));
configFile=Form("%s/ConfigJpsiME_jpsi_PbPb.C",gSystem->pwd()); // alien config
}
else {
printf("ERROR: couldn't copy file %s from grid \n",
"alien:///alice/cern.ch/user/j/jbook/PWGDQ/dielectron/macrosJPSI/ConfigJpsiME_jpsi_PbPb.C");
return;
}
// using aliroot config
if(!gridconf)
configFile="$ALICE_PHYSICS/PWGDQ/dielectron/macrosJPSI/ConfigJpsiME_jpsi_PbPb.C"; // aliroot config
//create task and add it to the manager
AliAnalysisTaskMultiDielectron *task;
// trigger selection
ULong64_t triggerSets[]={AliVEvent::kCentral , AliVEvent::kSemiCentral , AliVEvent::kMB,
AliVEvent::kCentral | AliVEvent::kSemiCentral | AliVEvent::kMB};
const char* triggerNames[]={"Central","SemiCentral","MB","MB+Cent+SemiCent"};
// find out the configured triggers
Int_t j=0;
for(j=0; j<4; j++) {
if(triggers!=triggerSets[j]) continue;
else break;
}
// print task configuration
printf("production: %s MC: %d \n", list.Data(),hasMC);
printf("triggers: %s \n", triggerNames[j] );
printf("config: %s Grid: %d \n",configFile.Data(),gridconf);
task = new AliAnalysisTaskMultiDielectron((Form("MultiDieJpsiME_%s",triggerNames[j])));
task->SetBeamEnergy(1380.);
task->SetTriggerMask(triggers);
if (!hasMC) task->UsePhysicsSelection();
mgr->AddTask(task);
//load dielectron configuration file
TString checkconfig="ConfigJpsiME_jpsi_PbPb";
if (!gROOT->GetListOfGlobalFunctions()->FindObject(checkconfig.Data()))
gROOT->LoadMacro(configFile.Data());
//add dielectron analysis with different cuts to the task
for (Int_t i=0; i<nDie; ++i) { //nDie defined in config file
AliDielectron *jpsi=ConfigJpsiME_jpsi_PbPb(i,list,triggers);
if (jpsi ) task->AddDielectron(jpsi);
if (jpsi ) printf(" %s added\n",jpsi->GetName());
}
//create output container
TString containerName = "JPSI.root";
AliAnalysisDataContainer *cOutputHist1 =
mgr->CreateContainer(Form("jpsiME_QA_%s",triggerNames[j]),
TList::Class(),
AliAnalysisManager::kOutputContainer,
containerName.Data());
AliAnalysisDataContainer *cOutputHist2 =
mgr->CreateContainer(Form("jpsiME_CF_%s",triggerNames[j]),
TList::Class(),
AliAnalysisManager::kOutputContainer,
containerName.Data());
AliAnalysisDataContainer *cOutputHist3 =
//.........这里部分代码省略.........
示例2: EmcalJetCDF
//.........这里部分代码省略.........
jetcont_full = anaTaskCDFfull->AddJetContainer(fulljet, antikt, recomb, 0.4, acc_fulljets, "Jet");
CDF::jetContSetParams (jetcont_full, 1., 500., 0, 2);
if (isMC) {
jetcont_full = AddJetContainerJetTask(dynamic_cast<AliAnalysisTaskEmcalJetCDF*>(anaTaskCDFfull_MC), pFuJet02Task_MC, acc_fulljets);
CDF::jetContSetParams (jetcont_full, 1., 500., 0, 0);
jetcont_full = AddJetContainerJetTask(dynamic_cast<AliAnalysisTaskEmcalJetCDF*>(anaTaskCDFfull_MC), pFuJet04Task_MC, acc_fulljets);
CDF::jetContSetParams (jetcont_full, 1., 500., 0, 0);
}
jetcont_full = NULL;
}
// add jet containers to sample task for charged jets
if (bDoChargedJets && bDoSample) {
AliJetContainer* jetCont02chg_sample = sampleTaskchg->AddJetContainer(chgjet, antikt, recomb, 0.2, acc_chgjets, "Jet");
AliJetContainer* jetCont04chg_sample = sampleTaskchg->AddJetContainer(chgjet, antikt, recomb, 0.4, acc_chgjets, "Jet");
if (iBeamType != AliAnalysisTaskEmcal::kpp) {
jetCont02chg_sample->SetRhoName(sRhoChName);
jetCont02chg_sample->SetPercAreaCut(0.6);
jetCont04chg_sample->SetRhoName(sRhoChName);
jetCont04chg_sample->SetPercAreaCut(0.6);
}
}
// add jet containers to sample task for full jets
if (bDoFullJets && bDoSample) {
AliJetContainer* jetCont02full_sample = sampleTaskfull->AddJetContainer(fulljet, antikt, recomb, 0.2, acc_fulljets, "Jet");
AliJetContainer* jetCont04full_sample = sampleTaskfull->AddJetContainer(fulljet, antikt, recomb, 0.4, acc_fulljets, "Jet");
if (iBeamType != AliAnalysisTaskEmcal::kpp) {
jetCont02full_sample->SetRhoName(sRhoFuName);
jetCont02full_sample->SetPercAreaCut(0.6);
jetCont04full_sample->SetRhoName(sRhoFuName);
jetCont04full_sample->SetPercAreaCut(0.6);
}
}
TObjArray* tasks_list = pMgr->GetTasks(); TIter task_iter (tasks_list); AliAnalysisTaskSE* task = NULL;
while (( task = dynamic_cast<AliAnalysisTaskSE*>(task_iter.Next()) )) {
if (task->InheritsFrom("AliAnalysisTaskEmcal")) {
Printf("Setting beam type %d for task %s", iBeamType, static_cast<AliAnalysisTaskEmcal*>(task)->GetName());
static_cast<AliAnalysisTaskEmcal*>(task)->SetForceBeamType(iBeamType);
}
}
// Let's start #########################################################################################################
if ( !pMgr->InitAnalysis() ) { std::cout << ">>>>>>>>>>>>>> AliAnalysisManager Initialising FAILED!!! " << std::endl; return NULL; }
std::cout << "##-->> Initialising Analysis :: Status :" << std::endl;
pMgr->PrintStatus();
pMgr->SetUseProgressBar(bUseProgBar, 100);
// task profiling
if ( kUseSysInfo > 0 ) {
for ( int i = 0; i < pMgr->GetTopTasks()->GetEntries(); i++ ) { pMgr->ProfileTask (i); }
}
CDF::SaveManager("train.root");
if ( ManagerMode == AnalysisType::local ) { // start local analysis
// enable class level debugging for these classes
if ( debug > 2 ) {
// pMgr->AddClassDebug("AliJetContainer", 100);
// pMgr->AddClassDebug("AliEmcalJetTask", 100);
if (bDoCDF) { pMgr->AddClassDebug("AliAnalysisTaskEmcalJetCDF", 100); }
if (bDoSample) { pMgr->AddClassDebug("AliAnalysisTaskEmcalJetSample", 100); }
}
TChain* pChain = CDF::CreateChain(kDataSource.Data(), "auto", "", iNumFiles);
if (!pChain) { std::cout << ">>>>>>>>>>>>>> CHAIN NOT CREATED <<<<<<<<<<<<<<" << std::endl; return NULL; }
// start analysis
Printf("Starting LOCAL Analysis...");
pMgr->StartAnalysis( cAnalysisType, pChain, iNumEvents );
}
if ( ManagerMode == AnalysisType::grid ) { // start grid analysis
// start analysis
Printf("Starting GRID Analysis...");
ListLibs += kGridExtraFiles;
if ( ListLibs.Length() ) { plugin->SetAdditionalLibs ( ListLibs.Data() ); }
if ( ListLibsExtra.Length() ) { plugin->SetAdditionalRootLibs ( ListLibsExtra.Data() ); }
if ( PluginMode == PluginType::test )
{ plugin->StartAnalysis(iNumEvents); }
else {
pMgr->SetDebugLevel(0);
plugin->StartAnalysis();
}
}
cout << "END of EmcalJetCDF.C" << std::endl;
return pMgr;
}