<commit_before>void AliAnalysisTaskSEVertexingHFTest()
{
  //
  // Test macro for the AliAnalysisTaskSE for heavy-flavour vertexing
  // A.Dainese, <EMAIL>
  //

  Bool_t inputAOD=kTRUE; // otherwise, ESD
  Bool_t createAOD=kFALSE; // kTRUE: create AOD and use it as input to vertexing
                          // kFALSE: use ESD as input to vertexing
  Bool_t writeKineToAOD = kTRUE;
  TString mode="local"; // otherwise, "grid" 
  Bool_t useParFiles=kFALSE;

  gROOT->LoadMacro("$ALICE_ROOT/PWG3/vertexingHF/LoadLibraries.C");
  LoadLibraries(useParFiles);

  TChain *chain = 0;

  if(mode=="local") {
    // Local files 
    TString treeName,fileName;
    if(inputAOD) {
      treeName="aodTree"; 
      fileName="AliAOD.root";
    } else {
      treeName="esdTree"; 
      fileName="AliESDs.root";
    }
    chain = new TChain(treeName.Data());
    chain->Add(fileName.Data());

  } else if (mode=="grid") {
    //Fetch files with AliEn :
    const char *collectionfile = "Collection.xml";
    TGrid::Connect("alien://") ;
    TAlienCollection *coll   = TAlienCollection::Open(collectionfile);
    if(inputAOD) { // input AOD
      chain = new TChain("aodTree");
      while(coll->Next()) chain->Add(coll->GetTURL(""));
    } else { // input ESD
      //Create an AliRunTagCuts and an AliEventTagCuts Object and impose some selection criteria
      AliRunTagCuts      *runCuts   = new AliRunTagCuts();
      AliEventTagCuts    *eventCuts = new AliEventTagCuts();
      AliLHCTagCuts      *lhcCuts   = new AliLHCTagCuts();
      AliDetectorTagCuts *detCuts   = new AliDetectorTagCuts();
      eventCuts->SetMultiplicityRange(0,20000);
      //Create an AliTagAnalysis Object and chain the tags
      AliTagAnalysis   *tagAna = new AliTagAnalysis();
      tagAna->SetType("ESD");
      TGridResult      *tagResult = coll->GetGridResult("",0,0);
      tagResult->Print();
      tagAna->ChainGridTags(tagResult);
      //Create a new esd chain and assign the chain that is returned by querying the tags
      chain = tagAna->QueryTags(runCuts,lhcCuts,detCuts,eventCuts);
    }
  } else {
    printf("ERROR: mode has to be \"local\" or \"grid\" \n");
    return;
  }


  // Create the analysis manager
  AliAnalysisManager *mgr  = new AliAnalysisManager("My Manager","My Manager");
  mgr->SetDebugLevel(10);
  
  // Input Handler
  AliInputEventHandler *inputHandler = 0;
  if(inputAOD) {
    inputHandler = new AliAODInputHandler();
  } else {
    inputHandler = new AliESDInputHandler();
  }
  mgr->SetInputEventHandler(inputHandler);
  
  // Output 
  AliAODHandler *aodHandler = new AliAODHandler();
  if(createAOD) {
    aodHandler->SetOutputFileName("AliAOD.root");
  } else {
    aodHandler->SetOutputFileName("AliAOD.VertexingHF.root");
    aodHandler->SetCreateNonStandardAOD();
  }
  mgr->SetOutputEventHandler(aodHandler);
  
  if(!inputAOD && createAOD) {<commit_msg>Updates for creation of deltaAOD<commit_after>void AliAnalysisTaskSEVertexingHFTest()
{
  //
  // Test macro for the AliAnalysisTaskSE for heavy-flavour vertexing
  // A.Dainese, <EMAIL>
  //

  Bool_t inputAOD=kTRUE; // otherwise, ESD
  Bool_t createAOD=kFALSE; // kTRUE: create AOD and use it as input to vertexing
                          // kFALSE: use ESD as input to vertexing
  Bool_t writeKineToAOD = kTRUE;
  TString mode="local"; // otherwise, "grid" 
  Bool_t useParFiles=kFALSE;

  gROOT->LoadMacro("$ALICE_ROOT/PWG3/vertexingHF/LoadLibraries.C");
  LoadLibraries(useParFiles);

  TChain *chain = 0;

  if(mode=="local") {
    // Local files 
    TString treeName,fileName;
    if(inputAOD) {
      treeName="aodTree"; 
      fileName="AliAOD.root";
    } else {
      treeName="esdTree"; 
      fileName="AliESDs.root";
    }
    chain = new TChain(treeName.Data());
    chain->Add(fileName.Data());

  } else if (mode=="grid") {
    //Fetch files with AliEn :
    const char *collectionfile = "Collection.xml";
    TGrid::Connect("alien://") ;
    TAlienCollection *coll   = TAlienCollection::Open(collectionfile);
    if(inputAOD) { // input AOD
      chain = new TChain("aodTree");
      while(coll->Next()) chain->Add(coll->GetTURL(""));
    } else { // input ESD
      //Create an AliRunTagCuts and an AliEventTagCuts Object and impose some selection criteria
      AliRunTagCuts      *runCuts   = new AliRunTagCuts();
      AliEventTagCuts    *eventCuts = new AliEventTagCuts();
      AliLHCTagCuts      *lhcCuts   = new AliLHCTagCuts();
      AliDetectorTagCuts *detCuts   = new AliDetectorTagCuts();
      eventCuts->SetMultiplicityRange(0,20000);
      //Create an AliTagAnalysis Object and chain the tags
      AliTagAnalysis   *tagAna = new AliTagAnalysis();
      tagAna->SetType("ESD");
      TGridResult      *tagResult = coll->GetGridResult("",0,0);
      tagResult->Print();
      tagAna->ChainGridTags(tagResult);
      //Create a new esd chain and assign the chain that is returned by querying the tags
      chain = tagAna->QueryTags(runCuts,lhcCuts,detCuts,eventCuts);
    }
  } else {
    printf("ERROR: mode has to be \"local\" or \"grid\" \n");
    return;
  }


  // Create the analysis manager
  AliAnalysisManager *mgr  = new AliAnalysisManager("My Manager","My Manager");
  mgr->SetDebugLevel(10);
  
  // Input Handler
  AliInputEventHandler *inputHandler = 0;
  if(inputAOD) {
    inputHandler = new AliAODInputHandler();
  } else {
    inputHandler = new AliESDInputHandler();
  }
  mgr->SetInputEventHandler(inputHandler);
  
  // Output 
  AliAODHandler *aodHandler = new AliAODHandler();
  if(createAOD) {
    aodHandler->SetOutputFileName("AliAOD.root");
  } else {
    aodHandler->SetFillAOD(kFALSE);
    aodHandler->SetOutputFileName("AliAOD.VertexingHF.root");
    aodHandler->SetCreateNonStandardAOD();
  }
  mgr->SetOutputEventHandler(aodHandler);
  mgr->RegisterExtraFile("AliAOD.VertexingHF.root");  

  if(!inputAOD && createAOD) {
{'fraction_non_alphanumeric': 0.12512785543811797, 'fraction_numerical': 0.004432321854756222, 'mean_word_length': 3.260711692084241, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 41, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '6737617', 'n_tokens_mistral': 1994, 'n_tokens_neox': 1943, 'n_words': 414}