<commit_before>void PrintProcStatus(int status) {
  fflush(stdout);
  printf("extraction of TPC SP calibration status: %d\n",status);
  fflush(stdout);
}

Bool_t ProcessOutputCheb(TString filesToProcess, Int_t startRun, Int_t endRun, const char* ocdbStorage, 
			 Bool_t corr=kTRUE, Bool_t dist=kTRUE) {

  // macro that process a list of files (xml or txt) to produce then the
  // OCDB entry for the TPC SP Distortion calibration; inspired by
  // AliAnalysisAlien::MergeOutput for simplicity

  enum {kStatusFail=1, kStatusOK=0, kStatusLowStatUpdate=-1};

  gROOT->LoadMacro("$ALICE_PHYSICS/PWGPP/TPC/CalibMacros/CreateCorrMapObj.C");
  //gROOT->LoadMacro("CreateCorrMapObj.C");
    
  Bool_t isGrid = kTRUE;
  TObjArray *listoffiles = new TObjArray();

  int ntrminUser = -1;
  int ntrminUserStop = -1;
  float stopDefFrac = 0.7;
  TString ntrminUserS = gSystem->Getenv("distMinTracks");
  if (!ntrminUserS.IsNull() && (ntrminUser=ntrminUserS.Atoi())>0) {
    ::Info("ProcessOutput","User provided min tracks to validate object as good: %d",ntrminUser);
  } 
  TString ntrminUserStopS = gSystem->Getenv("distMinTracksStop");
  if (!ntrminUserStopS.IsNull() && (ntrminUserStop=ntrminUserStopS.Atoi())>0) {
    ::Info("ProcessOutput","User provided min tracks to validate object as unusable: %d",ntrminUserStop);
  }
  
  if (filesToProcess.Contains(".xml")) {
    // Merge files pointed by the xml 
    TGridCollection *coll = (TGridCollection*)gROOT->ProcessLine(Form("TAlienCollection::Open(\"%s\");", filesToProcess.Data()));
    if (!coll) {
      ::Error("ProcessOutput", "Input XML collection empty.");
      PrintProcStatus(kStatusFail);
      return kFALSE;
    }
    coll->Print();
    // Iterate grid collection
    while (coll->Next()) {
      TString fname = coll->GetTURL();<commit_msg>first check the local ver. of CreateCorrMapObj.C then in ALICE_PHYSICS<commit_after>void PrintProcStatus(int status) {
  fflush(stdout);
  printf("extraction of TPC SP calibration status: %d\n",status);
  fflush(stdout);
}

Bool_t ProcessOutputCheb(TString filesToProcess, Int_t startRun, Int_t endRun, const char* ocdbStorage, 
			 Bool_t corr=kTRUE, Bool_t dist=kTRUE) {

  // macro that process a list of files (xml or txt) to produce then the
  // OCDB entry for the TPC SP Distortion calibration; inspired by
  // AliAnalysisAlien::MergeOutput for simplicity

  enum {kStatusFail=1, kStatusOK=0, kStatusLowStatUpdate=-1};
  if (!gSystem->AccessPathName("CreateCorrMapObj.C")) {
    gROOT->LoadMacro("CreateCorrMapObj.C");
    ::Info("ProcessOutputCheb","using local version of ProcessOutputCheb.C");
  }
  else {
    gROOT->LoadMacro("$ALICE_PHYSICS/PWGPP/TPC/CalibMacros/CreateCorrMapObj.C");
    ::Info("ProcessOutputCheb","using %s","$ALICE_PHYSICS/PWGPP/TPC/CalibMacros/CreateCorrMapObj.C");
  }
  //gROOT->LoadMacro("$ALICE_PHYSICS/PWGPP/TPC/CalibMacros/CreateCorrMapObj.C");
  //gROOT->LoadMacro("CreateCorrMapObj.C");
    
  Bool_t isGrid = kTRUE;
  TObjArray *listoffiles = new TObjArray();

  int ntrminUser = -1;
  int ntrminUserStop = -1;
  float stopDefFrac = 0.7;
  TString ntrminUserS = gSystem->Getenv("distMinTracks");
  if (!ntrminUserS.IsNull() && (ntrminUser=ntrminUserS.Atoi())>0) {
    ::Info("ProcessOutput","User provided min tracks to validate object as good: %d",ntrminUser);
  } 
  TString ntrminUserStopS = gSystem->Getenv("distMinTracksStop");
  if (!ntrminUserStopS.IsNull() && (ntrminUserStop=ntrminUserStopS.Atoi())>0) {
    ::Info("ProcessOutput","User provided min tracks to validate object as unusable: %d",ntrminUserStop);
  }
  
  if (filesToProcess.Contains(".xml")) {
    // Merge files pointed by the xml 
    TGridCollection *coll = (TGridCollection*)gROOT->ProcessLine(Form("TAlienCollection::Open(\"%s\");", filesToProcess.Data()));
    if (!coll) {
      ::Error("ProcessOutput", "Input XML collection empty.");
      PrintProcStatus(kStatusFail);
      return kFALSE;
    }
    coll->Print();
    // Iterate grid collection
    while (coll->Next()) {
      TString fname = coll->GetTURL();
{'fraction_non_alphanumeric': 0.13960396039603962, 'fraction_numerical': 0.004455445544554455, 'mean_word_length': 4.589211618257261, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 26, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 6}, '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': '1775566', 'n_tokens_mistral': 1425, 'n_tokens_neox': 1401, 'n_words': 296}