<commit_before>/**************************************************************************
 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
 *                                                                        *
 * Author: The ALICE Off-line Project.                                    *
 * Contributors are mentioned in the code where appropriate.              *
 *                                                                        *
 * Permission to use, copy, modify and distribute this software and its   *
 * documentation strictly for non-commercial purposes is hereby granted   *
 * without fee, provided that the above copyright notice appears in all   *
 * copies and that both the copyright notice and this permission notice   *
 * appear in the supporting documentation. The authors make no claims     *
 * about the suitability of this software for any purpose. It is          *
 * provided "as is" without express or implied warranty.                  *
 **************************************************************************/

// $Id$
//
// Macro for generating the geometry data files:
// volpath.dat, transform.dat, svmap.dat.
// To be run from aliroot:
// .x MUONGenerateGeometryData.C
//
// The generated files do not replace the existing ones
// but have different names (with extension ".out").
//
//  Author: <NAME>, <NAME>

void MUONGenerateGeometryData(Bool_t volpaths = true,
                              Bool_t transforms = true, 
                              Bool_t svmaps = true)
{
  // Initialize
  gAlice->Init("$ALICE_ROOT/MUON/Config.C");
  cout << "Init done " << endl;

  // Get MUON detector
  AliMUON* muon = (AliMUON*)gAlice->GetModule("MUON");
  if (!muon) {
    AliFatal("MUON detector not defined.");
    return 0;
  }  

  // Get geometry builder
  AliMUONGeometryBuilder* builder = muon ->GetGeometryBuilder();
  
  if (volpaths) {
    cout << "Generating volpath file ..." << endl;
    builder->GetTransformer()->WriteVolumePaths("volpath.dat.out");
  }  

  if (transforms) {
    cout << "Generating transformation file ..." << endl;
    builder->GetTransformer()->WriteTransformations("transform.dat.out");
  }  

  if (svmaps) {
    cout << "Generating svmaps file ..." << endl;
    builder->WriteSVMaps();
  }  
}  <commit_msg>Added argument writeEnvelopes; this makes possible to choose this option from outside (needed for running with Geant4 geometry)<commit_after>/**************************************************************************
 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
 *                                                                        *
 * Author: The ALICE Off-line Project.                                    *
 * Contributors are mentioned in the code where appropriate.              *
 *                                                                        *
 * Permission to use, copy, modify and distribute this software and its   *
 * documentation strictly for non-commercial purposes is hereby granted   *
 * without fee, provided that the above copyright notice appears in all   *
 * copies and that both the copyright notice and this permission notice   *
 * appear in the supporting documentation. The authors make no claims     *
 * about the suitability of this software for any purpose. It is          *
 * provided "as is" without express or implied warranty.                  *
 **************************************************************************/

// $Id$
//
// Macro for generating the geometry data files:
// volpath.dat, transform.dat, svmap.dat.
// To be run from aliroot:
// .x MUONGenerateGeometryData.C
//
// The generated files do not replace the existing ones
// but have different names (with extension ".out").
//
//  Author: <NAME>, <NAME>

void MUONGenerateGeometryData(Bool_t volpaths = true,
                              Bool_t transforms = true, 
                              Bool_t svmaps = true,
                              Bool_t writeEnvelopes = true)
{
  // Initialize
  gAlice->Init("$ALICE_ROOT/MUON/Config.C");
  cout << "Init done " << endl;

  // Get MUON detector
  AliMUON* muon = (AliMUON*)gAlice->GetModule("MUON");
  if (!muon) {
    AliFatal("MUON detector not defined.");
    return 0;
  }  

  // Get geometry builder
  AliMUONGeometryBuilder* builder = muon ->GetGeometryBuilder();
  
  if (volpaths) {
    cout << "Generating volpath file ..." << endl;
    builder->GetTransformer()->WriteVolumePaths("volpath.dat.out");
  }  

  if (transforms) {
    cout << "Generating transformation file ..." << endl;
    builder->GetTransformer()->WriteTransformations("transform.dat.out");
  }  

  if (svmaps) {
    cout << "Generating svmaps file ..." << endl;
    builder->WriteSVMaps("svmap.dat.out", true, writeEnvelopes);
  }  
}  
{'fraction_non_alphanumeric': 0.15885147696756868, 'fraction_numerical': 0.003924808923776079, 'mean_word_length': 2.2716216216216214, 'pattern_counts': {'":': 0, '<': 39, '<?xml version=': 0, '>': 23, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 14, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7565038', 'n_tokens_mistral': 1265, 'n_tokens_neox': 1175, 'n_words': 404}