<commit_before>class AliAnalysisGrid;

void RunAnalysisITS(TString pluginmode,Int_t firstrun,Int_t lastrun,
		    Bool_t readMC=kFALSE,
		    Bool_t runAlign=kTRUE,
		    Bool_t runITS=kTRUE,
		    Bool_t runImpPar=kTRUE,
		    Bool_t runVtx=kFALSE,
		    Bool_t runSPD=kFALSE) 
{
  //
  // Macro to analyze ESDs from raw data reconstruction
  // A.Dainese, <EMAIL>
  //

  gSystem->SetIncludePath("-I. -I$ROOTSYS/include -I$ALICE_ROOT -I$ALICE_ROOT/include -I$ALICE_ROOT/ITS -I$ALICE_ROOT/TPC -I$ALICE_ROOT/CONTAINERS -I$ALICE_ROOT/STEER -I$ALICE_ROOT/TRD -I$ALICE_ROOT/macros -I$ALICE_ROOT/ANALYSIS -g"); 

  //
  TString analysisMode = "grid"; // "local", "grid", or "proof" (not yet)

  Long64_t nentries=1000000000000000,firstentry=0;
  Bool_t useAlienPlugin=kTRUE;
  Bool_t uselibPWG1=kFALSE;
  TString loadMacroPath="../../";
  Bool_t readHLT=kFALSE;
  //

  if(analysisMode=="grid") {
    // Connect to AliEn
    TGrid::Connect("alien://");
  } else if(analysisMode=="proof") {
    // Connect to the PROOF cluster
    printf("PROOF mode not yet functional..\n");
    return;
    TProof::Open("alicecaf");
    //TProof::Reset("alicecaf");
  }

  // Load analysis libraries
  gSystem->Load("libANALYSIS.so");
  gSystem->Load("libANALYSISalice.so");
  if(uselibPWG1) {gSystem->Load("libTENDER.so");gSystem->Load("libPWG1.so");}

  // Create Alien plugin, if requested
  if(useAlienPlugin) {  
    AliAnalysisGrid *alienHandler = CreateAlienHandler(pluginmode,uselibPWG1,firstrun,lastrun);
    if(!alienHandler) return;
  }

  TChain *chainESD = 0;
  if(!useAlienPlugin) {
    // Prepare input chain
    //    chainESD = CreateESDChain("/home/dainesea/alignData/RAWdata_CosmicsSum09/RecoSPD/chunk.",13,13);
    chainESD=new TChain("esdTree");
    //chainESD->Add("alien:///alice/cern.ch/user/s/sitta/output/000088361/ESDs/pass1/09000088361017.10/AliESDs.root");
    chainESD->Add("AliESDs.root");
  }

  // Create the analysis manager
  AliAnalysisManager *mgr  = new AliAnalysisManager("My Manager","My Manager");
  // Enable debug printouts
  mgr->SetDebugLevel(10);
  // Connect plug-in to the analysis manager
  if(useAlienPlugin) mgr->SetGridHandler(alienHandler);

  // Add ESD handler
  Bool_t readRP=kFALSE;
  AliESDInputHandler *esdH = 0;
  if(readRP) {
    esdH = new AliESDInputHandlerRP();
  } else {
    esdH = new AliESDInputHandler();
  }
  esdH->SetActiveBranches("ESDfriend");
  if(readHLT) esdH->SetReadHLT();
  mgr->SetInputEventHandler(esdH);
  if(readMC) {
    AliMCEventHandler  *mcH = new AliMCEventHandler();
    mgr->SetMCtruthEventHandler(mcH); 
  }
  //-------------------------------------------------------------------

  
  //-------------------------------------------------------------------
  // Analysis tasks (wagons of the train)   
  //
  TString taskName;
  
  if(runAlign) {
    if(!uselibPWG1) gROOT->LoadMacro("AliAlignmentDataFilterITS.cxx++g");
    taskName="AddTaskAlignmentDataFilterITS.C"; 
    taskName.Prepend(loadMacroPath.Data());
    gROOT->LoadMacro(taskName.Data());
    AliAlignmentDataFilterITS *alignTask = AddTaskAlignmentDataFilterITS();
  }
  if(runITS) {
    if(!uselibPWG1) gROOT->LoadMacro("AliAnalysisTaskITSTrackingCheck.cxx++g");
    taskName="AddTaskPerformanceITS.C"; 
    taskName.Prepend(loadMacroPath.Data());
    gROOT->LoadMacro(taskName.Data());
    AliAnalysisTaskITSTrackingCheck *itsTask = AddTaskPerformanceITS(readMC,kFALSE,kFALSE);  
  }
  if(runImpPar) {<commit_msg>Add setting to read friends<commit_after>class AliAnalysisGrid;

void RunAnalysisITS(TString pluginmode,Int_t firstrun,Int_t lastrun,
		    Bool_t readMC=kFALSE,
		    Bool_t runAlign=kTRUE,
		    Bool_t runITS=kTRUE,
		    Bool_t runImpPar=kTRUE,
		    Bool_t runVtx=kFALSE,
		    Bool_t runSPD=kFALSE) 
{
  //
  // Macro to analyze ESDs from raw data reconstruction
  // A.Dainese, <EMAIL>
  //

  gSystem->SetIncludePath("-I. -I$ROOTSYS/include -I$ALICE_ROOT -I$ALICE_ROOT/include -I$ALICE_ROOT/ITS -I$ALICE_ROOT/TPC -I$ALICE_ROOT/CONTAINERS -I$ALICE_ROOT/STEER -I$ALICE_ROOT/TRD -I$ALICE_ROOT/macros -I$ALICE_ROOT/ANALYSIS -g"); 

  //
  TString analysisMode = "grid"; // "local", "grid", or "proof" (not yet)

  Long64_t nentries=1000000000000000,firstentry=0;
  Bool_t useAlienPlugin=kTRUE;
  Bool_t uselibPWG1=kFALSE;
  TString loadMacroPath="../../";
  Bool_t readHLT=kFALSE;
  //

  if(analysisMode=="grid") {
    // Connect to AliEn
    TGrid::Connect("alien://");
  } else if(analysisMode=="proof") {
    // Connect to the PROOF cluster
    printf("PROOF mode not yet functional..\n");
    return;
    TProof::Open("alicecaf");
    //TProof::Reset("alicecaf");
  }

  // Load analysis libraries
  gSystem->Load("libANALYSIS.so");
  gSystem->Load("libANALYSISalice.so");
  if(uselibPWG1) {gSystem->Load("libTENDER.so");gSystem->Load("libPWG1.so");}

  // Create Alien plugin, if requested
  if(useAlienPlugin) {  
    AliAnalysisGrid *alienHandler = CreateAlienHandler(pluginmode,uselibPWG1,firstrun,lastrun);
    if(!alienHandler) return;
  }

  TChain *chainESD = 0;
  if(!useAlienPlugin) {
    // Prepare input chain
    //    chainESD = CreateESDChain("/home/dainesea/alignData/RAWdata_CosmicsSum09/RecoSPD/chunk.",13,13);
    chainESD=new TChain("esdTree");
    //chainESD->Add("alien:///alice/cern.ch/user/s/sitta/output/000088361/ESDs/pass1/09000088361017.10/AliESDs.root");
    chainESD->Add("AliESDs.root");
  }

  // Create the analysis manager
  AliAnalysisManager *mgr  = new AliAnalysisManager("My Manager","My Manager");
  // Enable debug printouts
  mgr->SetDebugLevel(10);
  // Connect plug-in to the analysis manager
  if(useAlienPlugin) mgr->SetGridHandler(alienHandler);

  // Add ESD handler
  Bool_t readRP=kFALSE;
  AliESDInputHandler *esdH = 0;
  if(readRP) {
    esdH = new AliESDInputHandlerRP();
  } else {
    esdH = new AliESDInputHandler();
  }
  esdH->SetActiveBranches("ESDfriend");
  esdH->SetReadFriends(1);
  if(readHLT) esdH->SetReadHLT();
  mgr->SetInputEventHandler(esdH);
  if(readMC) {
    AliMCEventHandler  *mcH = new AliMCEventHandler();
    mgr->SetMCtruthEventHandler(mcH); 
  }
  //-------------------------------------------------------------------

  
  //-------------------------------------------------------------------
  // Analysis tasks (wagons of the train)   
  //
  TString taskName;
  
  if(runAlign) {
    if(!uselibPWG1) gROOT->LoadMacro("AliAlignmentDataFilterITS.cxx++g");
    taskName="AddTaskAlignmentDataFilterITS.C"; 
    taskName.Prepend(loadMacroPath.Data());
    gROOT->LoadMacro(taskName.Data());
    AliAlignmentDataFilterITS *alignTask = AddTaskAlignmentDataFilterITS();
  }
  if(runITS) {
    if(!uselibPWG1) gROOT->LoadMacro("AliAnalysisTaskITSTrackingCheck.cxx++g");
    taskName="AddTaskPerformanceITS.C"; 
    taskName.Prepend(loadMacroPath.Data());
    gROOT->LoadMacro(taskName.Data());
    AliAnalysisTaskITSTrackingCheck *itsTask = AddTaskPerformanceITS(readMC,kFALSE,kFALSE);  
  }
  if(runImpPar) {
{'fraction_non_alphanumeric': 0.17591125198098256, 'fraction_numerical': 0.01772078951159775, 'mean_word_length': 3.341463414634146, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 40, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 2, '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': '2823739', 'n_tokens_mistral': 2678, 'n_tokens_neox': 2503, 'n_words': 377}