<commit_before>// <NAME> 2002

//Root
#include "TString.h"

//AliRoot
#include "PHOS/AliPHOSSDigitizer.h"
#include "PHOS/AliPHOSDigitizer.h"
#include "EMCAL/AliEMCALSDigitizer.h"
#include "EMCAL/AliEMCALDigitizer.h"

void Hits2SDigits( Bool_t split=kFALSE, TString fileName = "galice.root") {

  // usage : 
  // 1. write SDigits in the same file as Hits --------------- (OK)
  //root [0] .L Reconstruct.C++
  //root [1] SDigits2Digits()
  // 2. write SDigits in a separate file, one per detector, from Hits --------------- (OK)
  //root [0] .L Reconstruct.C++
  //root [1] SDigits2Digits(kTRUE) // SDigits saved in [DET}.SDigits.root (DET=PHOS, EMCAL)

  AliPHOSSDigitizer * sdp = new AliPHOSSDigitizer(fileName) ; 
  if (split) 
    sdp->SetSplitFile() ;
  sdp->ExecuteTask("deb") ; 

  AliEMCALSDigitizer * sde = new AliEMCALSDigitizer(fileName) ; 
  if (split) 
    sde->SetSplitFile() ;
  sde->ExecuteTask("deb") ; 
 
  delete sdp ;
  delete sde ; 

}

//________________________________________________________________________
void SDigits2Digits( Bool_t split=kFALSE, TString fileName = "galice.root") {
  
 // usage : 
  // 1. write SDigits in the same file as Hits --------------- (OK)
  //root [0] .L Reconstruct.C++
  //root [1] Hits2Digits()
  // 2. write SDigits in a separate file, one per detector, from Hits --------------- (OK)
  //root [0] .L Reconstruct.C++
  //root [1] Hits2Digits(kTRUE) // Digits saved in [DET}.Digits.root (DET=PHOS, EMCAL)

  AliPHOSDigitizer * dp ; 
  AliEMCALDigitizer * de ; 
  if (split) {
    dp = new AliPHOSDigitizer("PHOS.SDigits.root") ; 
    dp->SetSplitFile() ; } 
  else 
    dp = new AliPHOSDigitizer(fileName) ; 
  
  dp->ExecuteTask("deb") ; 
  
  if (split) {
    de = new AliEMCALDigitizer("EMCAL.SDigits.root") ;
    de->SetSplitFile() ;
  } else 
    de = new AliEMCALDigitizer(fileName) ; 

  de->ExecuteTask("deb") ; 

 delete dp ;
 delete de ; 
}

//________________________________________________________________________
void Hits2Digits (Bool_t split=kFALSE, TString fileName = "galice.root") {
  // usage : 
  // 1. write (S)Digits in the same file as Hits --------------- (OK)
  //root [0] .L Reconstruct.C++
  //root [1] Hits2Digits()
  // 2. write (S)Digits in a separate file, one per detector, from Hits --------------- (OK)
  //root [0] .L Reconstruct.C++
  //root [1] Hits2Digits(kTRUE) // SDigits saved in [DET}.SDigits.root (DET=PHOS, EMCAL)
                                // Digits  saved in [DET}.Digits.root  (DET=PHOS, EMCAL)

  Hits2SDigits(split, fileName) ; 
  SDigits2Digits(split, fileName) ;
}<commit_msg>Ordered things differently: first do everything for one detector then go to the next<commit_after>// YS <NAME> 2002

//Root
#include "TString.h"

//AliRoot
#include "PHOS/AliPHOSSDigitizer.h"
#include "PHOS/AliPHOSDigitizer.h"
#include "EMCAL/AliEMCALSDigitizer.h"
#include "EMCAL/AliEMCALDigitizer.h"

void Hits2SDigits( Bool_t split=kFALSE, TString fileName = "galice.root") {

  // usage : 
  // 1. write SDigits in the same file as Hits --------------- (OK)
  //root [0] .L Reconstruct.C++
  //root [1] SDigits2Digits()
  // 2. write SDigits in a separate file, one per detector, from Hits --------------- (OK)
  //root [0] .L Reconstruct.C++
  //root [1] SDigits2Digits(kTRUE) // SDigits saved in [DET}.SDigits.root (DET=PHOS, EMCAL)

  AliPHOSSDigitizer * sdp = new AliPHOSSDigitizer(fileName) ; 
  if (split) 
    sdp->SetSplitFile() ;
  sdp->ExecuteTask("deb") ; 

  delete sdp ;

  AliEMCALSDigitizer * sde = new AliEMCALSDigitizer(fileName) ; 
  if (split) 
    sde->SetSplitFile() ;
  sde->ExecuteTask("deb") ; 
 
  delete sde ; 

}

//________________________________________________________________________
void SDigits2Digits( Bool_t split=kFALSE, TString fileName = "galice.root") {
  
 // usage : 
  // 1. write SDigits in the same file as Hits --------------- (OK)
  //root [0] .L Reconstruct.C++
  //root [1] Hits2Digits()
  // 2. write SDigits in a separate file, one per detector, from Hits --------------- (OK)
  //root [0] .L Reconstruct.C++
  //root [1] Hits2Digits(kTRUE) // Digits saved in [DET}.Digits.root (DET=PHOS, EMCAL)

  // PHOS
  AliPHOSDigitizer * dp ; 
 
  if (split) {
    dp = new AliPHOSDigitizer("PHOS.SDigits.root") ; 
    dp->SetSplitFile() ; } 
  else 
    dp = new AliPHOSDigitizer(fileName) ; 
  
  dp->ExecuteTask("deb") ; 
  
  delete dp ;

  //EMCAL
  AliEMCALDigitizer * de ; 

  if (split) {
    de = new AliEMCALDigitizer("EMCAL.SDigits.root") ;
    de->SetSplitFile() ;
  } else 
    de = new AliEMCALDigitizer(fileName) ; 
  
  de->ExecuteTask("deb") ; 
  
  delete de ; 
}

//________________________________________________________________________
void Hits2Digits (Bool_t split=kFALSE, TString fileName = "galice.root") {
  // usage : 
  // 1. write (S)Digits in the same file as Hits --------------- (OK)
  //root [0] .L Reconstruct.C++
  //root [1] Hits2Digits()
  // 2. write (S)Digits in a separate file, one per detector, from Hits --------------- (OK)
  //root [0] .L Reconstruct.C++
  //root [1] Hits2Digits(kTRUE) // SDigits saved in [DET}.SDigits.root (DET=PHOS, EMCAL)
                                // Digits  saved in [DET}.Digits.root  (DET=PHOS, EMCAL)

  //PHOS
  AliPHOSSDigitizer * sdp = new AliPHOSSDigitizer(fileName) ; 
  if (split) 
    sdp->SetSplitFile() ;
  sdp->ExecuteTask("deb") ; 

  delete sdp ;

  AliPHOSDigitizer * dp ; 
 
  if (split) {
    dp = new AliPHOSDigitizer("PHOS.SDigits.root") ; 
    dp->SetSplitFile() ; } 
  else 
    dp = new AliPHOSDigitizer(fileName) ; 
  
  dp->ExecuteTask("deb") ; 
  
  delete dp ;

  //EMCAL
  AliEMCALSDigitizer * sde = new AliEMCALSDigitizer(fileName) ; 
  if (split) 
    sde->SetSplitFile() ;
  sde->ExecuteTask("deb") ; 
  
  delete sde ; 
  
  AliEMCALDigitizer * de ; 
  if (split) {
    de = new AliEMCALDigitizer("EMCAL.SDigits.root") ;
    de->SetSplitFile() ;
  } else 
    de = new AliEMCALDigitizer(fileName) ; 
  
  de->ExecuteTask("deb") ; 
  
  delete de ; 
}

 
{'fraction_non_alphanumeric': 0.1645822911455728, 'fraction_numerical': 0.010672002668000667, 'mean_word_length': 2.707045735475896, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 29, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5171799', 'n_tokens_mistral': 2348, 'n_tokens_neox': 2202, 'n_words': 520}