<commit_before>AliAnalysisTaskSEHFQA* AddTaskHFQA(AliAnalysisTaskSEHFQA::DecChannel ch,TString filecutsname="D0toKpiCuts.root",Bool_t readMC=kFALSE, Bool_t simplemode=kFALSE){
  //
  // Test macro for the AliAnalysisTaskSE for HF mesons quality assurance
  //Author: C.Bianchin <EMAIL>

  AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
  if (!mgr) {
    ::Error("AddTaskHFQA", "No analysis manager to connect to.");
    return NULL;
  }

  Bool_t stdcuts=kFALSE;
  TFile* filecuts=new TFile(filecutsname.Data());
  if(!filecuts->IsOpen()){
    cout<<"Input file not found: using std cut object"<<endl;
    stdcuts=kTRUE;
  }

  Bool_t onoff[4]={kTRUE,kTRUE,kFALSE,kTRUE};

  AliRDHFCuts *analysiscuts=0x0;

  TString filename="",out1name="nEntriesQA",out2name="outputPid",out3name="outputTrack",out4name="cuts",out5name="countersCentrality",out6name="outputCentrCheck",out7name="outputEvSel",inname="input",suffix="",cutsobjname="",centr="";
  filename = AliAnalysisManager::GetCommonFileName();
  filename += ":PWG3_D2H_QA";

  switch (ch){
  case 0:
    cutsobjname="AnalysisCuts";
    if(stdcuts) {
      analysiscuts = new AliRDHFCutsDplustoKpipi();
      analysiscuts->SetStandardCutsPP2010();
    }
    else analysiscuts = (AliRDHFCutsDplustoKpipi*)filecuts->Get(cutsobjname);
    suffix="Dplus";
    break;
  case 1:
    cutsobjname="D0toKpiCuts";
    if(stdcuts) {
      analysiscuts = new AliRDHFCutsD0toKpi();
      analysiscuts->SetStandardCutsPP2010();
    }
    else analysiscuts = (AliRDHFCutsD0toKpi*)filecuts->Get(cutsobjname);
    suffix="D0";
    break;
  case 2:
    cutsobjname="DStartoKpipiCuts";
    if(stdcuts) {
      analysiscuts = new AliRDHFCutsDStartoKpipi();
      analysiscuts->SetStandardCutsPP2010();
    }
    else analysiscuts = (AliRDHFCutsDstartoKpipi*)filecuts->Get(cutsobjname);
    suffix="Dstar";
    break;
  case 3:
    cutsobjname="DstoKKpiCuts";
    if(stdcuts) {
      analysiscuts = new AliRDHFCutsDstoKKpi();
      analysiscuts->SetStandardCutsPP2010();
    }
    else analysiscuts = (AliRDHFCutsDstoKKpi*)filecuts->Get(cutsobjname);
    suffix="Ds";
    break;
  case 4:
    cutsobjname="D0toKpipipiCuts";
    if(stdcuts) {
      analysiscuts = new AliRDHFCutsD0toKpipipi();
      analysiscuts->SetStandardCutsPP2010();<commit_msg>fix (Alessandro)<commit_after>AliAnalysisTaskSEHFQA* AddTaskHFQA(AliAnalysisTaskSEHFQA::DecChannel ch,TString filecutsname="D0toKpiCuts.root",Bool_t readMC=kFALSE, Bool_t simplemode=kFALSE){
  //
  // Test macro for the AliAnalysisTaskSE for HF mesons quality assurance
  //Author: C.Bianchin <EMAIL>

  AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
  if (!mgr) {
    ::Error("AddTaskHFQA", "No analysis manager to connect to.");
    return NULL;
  }

  Bool_t stdcuts=kFALSE;
  TFile* filecuts=new TFile(filecutsname.Data());
  if(!filecuts->IsOpen()){
    cout<<"Input file not found: using std cut object"<<endl;
    stdcuts=kTRUE;
  }

  Bool_t onoff[4]={kTRUE,kTRUE,kFALSE,kTRUE};

  AliRDHFCuts *analysiscuts=0x0;

  TString filename="",out1name="nEntriesQA",out2name="outputPid",out3name="outputTrack",out4name="cuts",out5name="countersCentrality",out6name="outputCentrCheck",out7name="outputEvSel",inname="input",suffix="",cutsobjname="",centr="";
  filename = AliAnalysisManager::GetCommonFileName();
  filename += ":PWG3_D2H_QA";

  switch (ch){
  case 0:
    cutsobjname="AnalysisCuts";
    if(stdcuts) {
      analysiscuts = new AliRDHFCutsDplustoKpipi();
      analysiscuts->SetStandardCutsPP2010();
    }
    else analysiscuts = (AliRDHFCutsDplustoKpipi*)filecuts->Get(cutsobjname);
    suffix="Dplus";
    break;
  case 1:
    cutsobjname="D0toKpiCuts";
    if(stdcuts) {
      analysiscuts = new AliRDHFCutsD0toKpi();
      analysiscuts->SetStandardCutsPP2010();
    }
    else analysiscuts = (AliRDHFCutsD0toKpi*)filecuts->Get(cutsobjname);
    suffix="D0";
    break;
  case 2:
    cutsobjname="DStartoKpipiCuts";
    if(stdcuts) {
      analysiscuts = new AliRDHFCutsDStartoKpipi();
      analysiscuts->SetStandardCutsPP2010();
    }
    else analysiscuts = (AliRDHFCutsDStartoKpipi*)filecuts->Get(cutsobjname);
    suffix="Dstar";
    break;
  case 3:
    cutsobjname="DstoKKpiCuts";
    if(stdcuts) {
      analysiscuts = new AliRDHFCutsDstoKKpi();
      analysiscuts->SetStandardCutsPP2010();
    }
    else analysiscuts = (AliRDHFCutsDstoKKpi*)filecuts->Get(cutsobjname);
    suffix="Ds";
    break;
  case 4:
    cutsobjname="D0toKpipipiCuts";
    if(stdcuts) {
      analysiscuts = new AliRDHFCutsD0toKpipipi();
      analysiscuts->SetStandardCutsPP2010();
{'fraction_non_alphanumeric': 0.13121877036715185, 'fraction_numerical': 0.01911796654355855, 'mean_word_length': 4.827848101265823, 'pattern_counts': {'":': 2, '<': 13, '<?xml version=': 0, '>': 25, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6422357', 'n_tokens_mistral': 1814, 'n_tokens_neox': 1658, 'n_words': 242}