<commit_before>#if ! defined (__CINT__) || defined (__MAKECINT__)
#include "TTree.h"
#include "AliLog.h"
#include "AliAnalysisManager.h"
#include "AliAnalysisDataContainer.h"
#include "PWG1/TRD/macros/AliTRDperformanceTrain.h"
#include "PWG1/TRD/AliTRDcheckPID.h"
#include "PWG1/TRD/AliTRDpidRefMaker.h"
#include "PWG1/TRD/AliTRDpidRefMakerLQ.h"
#endif

#include "PWG1/TRD/macros/helper.C"
void AddTRDcheckPID(AliAnalysisManager *mgr, Char_t *trd, AliAnalysisDataContainer **ci/*, AliAnalysisDataContainer **co*/)
{
  Int_t map = ParseOptions(trd);

  AliTRDcheckPID *pid = 0x0;
  mgr->AddTask(pid = new AliTRDcheckPID());
  pid->SetDebugLevel(0);
  pid->SetMCdata(mgr->GetMCtruthEventHandler());
  mgr->ConnectInput(pid, 0, ci[0]);
  mgr->ConnectOutput(pid, 0, mgr->CreateContainer(pid->GetName(), TObjArray::Class(), AliAnalysisManager::kOutputContainer, "TRD.Performance.root"));
  // define PID exchange container
  AliAnalysisDataContainer *ce = mgr->CreateContainer("InfoPID", TObjArray::Class(), AliAnalysisManager::kExchangeContainer);
  mgr->ConnectOutput(pid, 1, ce);
  

  if(TSTBIT(map, kPIDRefMaker)){
    // TRD pid reference maker 
    AliTRDpidRefMaker *ref = new AliTRDpidRefMaker(); 
    mgr->AddTask(ref);
    ref->SetDebugLevel(3);
    AliLog::SetClassDebugLevel("AliTRDpidRefMaker", 3);
    ref->SetMCdata(mgr->GetMCtruthEventHandler());
    ref->SetFriends(kTRUE);

    // link basic ref maker
    mgr->ConnectInput( ref, 0, ci[0]);
    mgr->ConnectInput( ref, 1, ci[2]);
    mgr->ConnectInput( ref, 2, ce);
    mgr->ConnectOutput(ref, 0, mgr->CreateContainer(Form("Moni%s", ref->GetName()), TObjArray::Class(), AliAnalysisManager::kOutputContainer, Form("TRD.Calib%s.root", ref->GetName())));
    mgr->ConnectOutput(ref, 1, mgr->CreateContainer(ref->GetName(), TTree::Class(), AliAnalysisManager::kOutputContainer, Form("TRD.Calib%s.root", ref->GetName())));

    // TRD pid reference maker LQ 
    AliTRDpidRefMakerLQ *lq = new AliTRDpidRefMakerLQ(); 
    mgr->AddTask(lq);
    lq->SetDebugLevel(3);
    AliLog::SetClassDebugLevel("AliTRDpidRefMakerLQ", 3);
    lq->SetMCdata(mgr->GetMCtruthEventHandler());
    lq->SetFriends(kTRUE);
    mgr->ConnectInput(lq, 0, ci[0]);
    mgr->ConnectInput(lq, 1, ci[2]);
    mgr->ConnectInput(lq, 2, ce);
    mgr->ConnectOutput(lq, 0, mgr->CreateContainer(Form("Moni%s", lq->GetName()), TObjArray::Class(), AliAnalysisManager::kOutputContainer, Form("TRD.Calib%s.root", ref->GetName())));
    mgr->ConnectOutput(lq, 1, mgr->CreateContainer(lq->GetName(), TTree::Class(), AliAnalysisManager::kOutputContainer, Form("TRD.Calib%s.root", ref->GetName())));
    mgr->ConnectOutput(lq, 2, mgr->CreateContainer("PDF", TObjArray::Class(), AliAnalysisManager::kOutputContainer, Form("TRD.Calib%s.root", lq->GetName())));
  }
}
<commit_msg>correct usage of steering options for the PID task<commit_after>#if ! defined (__CINT__) || defined (__MAKECINT__)
#include "TTree.h"
#include "AliLog.h"
#include "AliAnalysisManager.h"
#include "AliAnalysisDataContainer.h"
#include "PWG1/TRD/macros/AliTRDperformanceTrain.h"
#include "PWG1/TRD/AliTRDcheckPID.h"
#include "PWG1/TRD/AliTRDpidRefMaker.h"
#include "PWG1/TRD/AliTRDpidRefMakerLQ.h"
#endif

#include "PWG1/TRD/macros/helper.C"
void AddTRDcheckPID(AliAnalysisManager *mgr, Char_t *trd, AliAnalysisDataContainer **ci/*, AliAnalysisDataContainer **co*/)
{
  Int_t map = ParseOptions(trd);
  AliAnalysisDataContainer *ce(NULL);
  if(TSTBIT(map, kPIDRefMaker)){
    AliTRDcheckPID *pid = 0x0;
    mgr->AddTask(pid = new AliTRDcheckPID());
    pid->SetDebugLevel(0);
    pid->SetMCdata(mgr->GetMCtruthEventHandler());
    mgr->ConnectInput(pid, 0, ci[0]);
    mgr->ConnectOutput(pid, 0, mgr->CreateContainer(pid->GetName(), TObjArray::Class(), AliAnalysisManager::kOutputContainer, "TRD.Performance.root"));

    // define PID exchange container
    ce = mgr->CreateContainer("InfoPID", TObjArray::Class(), AliAnalysisManager::kExchangeContainer);
    mgr->ConnectOutput(pid, 1, ce);
  }  

  if(TSTBIT(map, kPIDRefMaker)){
    // TRD pid reference maker 
    AliTRDpidRefMaker *ref = new AliTRDpidRefMaker(); 
    mgr->AddTask(ref);
    ref->SetDebugLevel(3);
    AliLog::SetClassDebugLevel("AliTRDpidRefMaker", 3);
    ref->SetMCdata(mgr->GetMCtruthEventHandler());
    ref->SetFriends(kTRUE);

    // link basic ref maker
    mgr->ConnectInput( ref, 0, ci[0]);
    mgr->ConnectInput( ref, 1, ci[2]);
    if(ce) mgr->ConnectInput( ref, 2, ce);
    mgr->ConnectOutput(ref, 0, mgr->CreateContainer(Form("Moni%s", ref->GetName()), TObjArray::Class(), AliAnalysisManager::kOutputContainer, Form("TRD.Calib%s.root", ref->GetName())));
    mgr->ConnectOutput(ref, 1, mgr->CreateContainer(ref->GetName(), TTree::Class(), AliAnalysisManager::kOutputContainer, Form("TRD.Calib%s.root", ref->GetName())));

    // TRD pid reference maker LQ 
    AliTRDpidRefMakerLQ *lq = new AliTRDpidRefMakerLQ(); 
    mgr->AddTask(lq);
    lq->SetDebugLevel(3);
    AliLog::SetClassDebugLevel("AliTRDpidRefMakerLQ", 3);
    lq->SetMCdata(mgr->GetMCtruthEventHandler());
    lq->SetFriends(kTRUE);
    mgr->ConnectInput(lq, 0, ci[0]);
    mgr->ConnectInput(lq, 1, ci[2]);
    if(ce) mgr->ConnectInput(lq, 2, ce);
    mgr->ConnectOutput(lq, 0, mgr->CreateContainer(Form("Moni%s", lq->GetName()), TObjArray::Class(), AliAnalysisManager::kOutputContainer, Form("TRD.Calib%s.root", ref->GetName())));
    mgr->ConnectOutput(lq, 1, mgr->CreateContainer(lq->GetName(), TTree::Class(), AliAnalysisManager::kOutputContainer, Form("TRD.Calib%s.root", ref->GetName())));
    mgr->ConnectOutput(lq, 2, mgr->CreateContainer("PDF", TObjArray::Class(), AliAnalysisManager::kOutputContainer, Form("TRD.Calib%s.root", lq->GetName())));
  }
}

{'fraction_non_alphanumeric': 0.1764602701280477, 'fraction_numerical': 0.010875285037712682, 'mean_word_length': 5.788095238095238, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 93, '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': '2624438', 'n_tokens_mistral': 2154, 'n_tokens_neox': 2071, 'n_words': 329}