ROOT logo
/**************************************************************************
 * 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$

#if !defined(__CINT__) || defined(__MAKECINT__)
// ROOT includes
#include <Riostream.h>
#include <TROOT.h>
#include <TSystem.h>
#include <TString.h>

// MUON includes
#include "AliMpBusPatch.h"

#endif

/// \ingroup macros
/// \file MUONGenerateBusPatch.C
/// \brief Generates buspatch id and DDL id for given detection element id
///
/// - station 1 & 2 assuming 24 buspatches per quadrant         
/// - station345, reading from DetElemIdToSlatType.dat file and calculates
///   the number of bus patches per slat (and also number of Translator and Bridge Boards).
/// Generates an output file DetElemIdToBusPatch.dat.out, preserve from overwriting
///
/// List of changes:
/// - July 05, first version
/// - Nov. 05, added DDL
/// - June 06, correction for St123
/// - Feb. 07, add 1st manu list for St12 (starting on NB !) and new ddl sharing for station 3)
/// - June. 07, new numbering of station 345, and buspatch starts at 1)
///
/// \author Ch. Finck, July 05


void MUONGenerateBusPatch()
{

  TString dirPath2 = gSystem->Getenv("ALICE_ROOT");
  dirPath2 += "/MUON/mapping/data/"; 

  TString dirPath1 = dirPath2 + "station345/";

  TString infile =  dirPath1 + "DetElemIdToSlatType.dat";
  TString outfile = dirPath2 + "DetElemIdToBusPatch.dat.out";

  ifstream in(infile, ios::in);
  ofstream out(outfile, ios::out);
  char line[80];
  char nameSlat[82];
  Int_t idDE;
  Int_t i;
  Int_t cursor = 0;
  Int_t begin[900];
  Int_t end[900];
  Int_t nbBusPatch;
  Int_t nbTB = 0;
  Int_t nbBB = 0;
  Int_t idSt12[] = {100, 101, 102, 103, 
		    200, 201, 202, 203, 
		    300, 301, 302, 303,
		    400, 401, 402, 403};

  Char_t manuListSt1[] 
      = " 1,27,53,79,105,131,157,183,201,214,224,232,1025,1051,1077,1103,1129,1155,1181,1207,1225,1238,1249,1257";

  Char_t manuListSt2[] 
      = " 1,27,53,79,105,131,157,183,201,214,226,246,1025,1051,1077,1103,1129,1155,1181,1207,1225,1238,1251,1269";



  Int_t iDDL = 0;
  // station 1 & 2
  nbBusPatch = 24;
  Int_t nbHalfBusPatch =  nbBusPatch/2;
  cout << "#DE BusPatch DDL SlatName" << endl;
  out << "#DE BusPatch DDL  1st manu in buspatch" << endl;

  for (Int_t j = 0; j < 16; j++) {

    idDE = idSt12[j];
    if (idDE % 100 == 0) {
      iDDL++;
      begin[cursor] = AliMpBusPatch::GetGlobalBusID(1, iDDL-1);
      cout << "# Chamber " << idDE/100 << endl;
      out  << "# Chamber " << idDE/100 << endl;
    }
    if (idDE % 100 == 1) { 
      iDDL++;
      begin[cursor] = AliMpBusPatch::GetGlobalBusID(1, iDDL-1);
    }
   
    if (idDE % 100 == 3) {
      iDDL--;
      begin[cursor] = AliMpBusPatch::GetGlobalBusID(1, iDDL-1) + nbBusPatch;
    }

    end[cursor]     = begin[cursor] + nbBusPatch - 1;
    ++cursor; // it seems that vec[++i] does not work in Cint
    begin[cursor] = end[cursor-1] + 1;

    cout << idDE << " " << begin[cursor-1] + nbHalfBusPatch << "-" <<end[cursor-1] << ";" <<
	begin[cursor-1]	<< "-" << end[cursor-1] - nbHalfBusPatch << " " << iDDL-1 << endl;

    if (idDE < 300 )
	out << idDE  << " " << begin[cursor-1] + nbHalfBusPatch << "-" <<end[cursor-1] << ";" <<
	    begin[cursor-1]	<< "-" << end[cursor-1] - nbHalfBusPatch << " " << iDDL-1 <<
	    manuListSt1 << endl;
    else
	out << idDE  << " " << begin[cursor-1] + nbHalfBusPatch << "-" <<end[cursor-1] << ";" <<
	    begin[cursor-1]	<< "-" << end[cursor-1] - nbHalfBusPatch << " " <<  iDDL-1 <<
	    manuListSt2  << endl;
    if (idDE % 100 == 3) iDDL++;

  }
  
  // station 345
  nbBusPatch = 0;
  Int_t idCh5swp1 = 501; // 1/4 chamber for DDL on horizontal
  Int_t idCh5swp2 = 505; // 1/4 chamber for DDL on horizontal
  Int_t idCh5swp3 = 510; // 1/4 chamber for DDL on horizontal
  Int_t idCh5swp4 = 514; // 1/4 chamber for DDL on horizontal

  Int_t idCh6swp1 = 600; // 1/4 chamber for DDL on horizontal
  Int_t idCh6swp2 = 605; // 1/4 chamber for DDL on horizontal
  Int_t idCh6swp3 = 609; // 1/4 chamber for DDL on horizontal
  Int_t idCh6swp4 = 614; // 1/4 chamber for DDL on horizontal

  Int_t idSt45swp1 = 7;  // half chamber for DDL in vertical cutting twice the official numbering
  Int_t idSt45swp2 = 20;

  Int_t offsetBusCh5swp1 = 13; // number of buspatches between DE 501-504
  Int_t offsetBusCh5swp2 = 17; // number of buspatches before DE 510

  Int_t offsetBusCh6swp1 = 17; // number of buspatches before DE 600-604
  Int_t offsetBusCh6swp2 = 13; // number of buspatches between DE 614-617

  Int_t offsetBusSt4 = 25;     // number of buspatches before DE 700-800
  Int_t offsetBusSt4swp = 46;  // number of buspatches between 801-806 (701-706)

  Int_t offsetBusSt5 = 27;     // number of buspatches before DE 900-1000
  Int_t offsetBusSt5swp = 50;  // number of buspatches between 901-906 (1001-1006)

  // reads from file
  while ( in.getline(line,80) ) {

    if ( line[0] == '#' || line[0] == '\0' ) continue;
    i = 0;
    sscanf(line, "%d %s", &idDE, nameSlat);

    // number of PCB's
    while(nameSlat[i] < '4' && nameSlat[i] !='0') i++;
    Int_t len = strlen(nameSlat);

    // number of buspatch 
    if (i == 2 || i == 3)
      nbBusPatch = 2;
    else
      nbBusPatch = 4;

    // calculate the number of TB & BB
    // R1: 2 bridges more per PCB
    // R2 & R3: 1 translator more per PCB
    if (i == 2) nbBB += 2; 
    if (i == 3) nbBB += 4; 
    if (i == 4) nbBB += 4; 
    if (i == 5) nbBB += 6;
    if (i == 6) nbBB += 8;

    nbTB += nbBusPatch;
    if (nameSlat[len-1] == '1') {
      nbTB += 2;
      nbBusPatch+=2;
    }
    if (nameSlat[len-1] == '2' || nameSlat[len-1] == '3') {
      nbTB += 1;
      nbBusPatch++;
    }

    // station 3
    // for buspatch length reasons, one ddl connects one 1/4 of two chambers
    // really messy isn't it ? 
    // much more with the new DDL sharing for station 3

    if (idDE < 700 ) {
  
      if (idDE % 100 == 0) {
	cout << "# Chamber " << idDE/100 << endl;
	out  << "# Chamber " << idDE/100 << endl;
      }

      // chamber 5
      if (idDE  == 500 ) {
	iDDL = (idDE/100)*2+2;
	begin[cursor] = AliMpBusPatch::GetGlobalBusID(1, iDDL-1);
	
	end[cursor]   = begin[cursor] + nbBusPatch - 1;
	++cursor;
	begin[cursor] = end[cursor-1] + 1;

	cout << idDE << " " << begin[cursor-1]<<"-"<<end[cursor-1] << " " << iDDL-1 << " " <<nameSlat <<endl;
	out << idDE << " " << begin[cursor-1]<<"-"<<end[cursor-1] <<" " << iDDL-1 <<endl;
      }

      if (idDE  >= idCh5swp1 && idDE < idCh5swp2) {
	
	if ( idDE ==  idCh5swp1) {
	  iDDL = (idDE/100)*2 ;
	  begin[cursor] = AliMpBusPatch::GetGlobalBusID(offsetBusCh5swp1, iDDL-1);
	}
	
	end[cursor]   = begin[cursor] - nbBusPatch + 1;
	++cursor;
	begin[cursor] = end[cursor-1] - 1;

	cout << idDE << " " << end[cursor-1]<<"-"<<begin[cursor-1] << " " << iDDL-1 << " " <<nameSlat <<endl;
	out << idDE << " " << end[cursor-1]<<"-"<<begin[cursor-1] <<" " << iDDL-1 <<endl;
      }

      if (idDE >=  idCh5swp2  && idDE  < idCh5swp3) {

	if (idDE ==  idCh5swp2) {
	  iDDL = (idDE/100)*2-1;
	      begin[cursor] = AliMpBusPatch::GetGlobalBusID(1, iDDL-1);	  
	}

	end[cursor]   = begin[cursor] + nbBusPatch - 1;
	++cursor;
	begin[cursor] = end[cursor-1] + 1;

	cout << idDE << " " << begin[cursor-1]<<"-"<<end[cursor-1] << " " << iDDL-1 << " " <<nameSlat <<endl;
	out << idDE << " " << begin[cursor-1]<<"-"<<end[cursor-1] <<" " << iDDL-1 <<endl;
      }

      if (idDE >=  idCh5swp3  && idDE  < idCh5swp4) {

	if (idDE ==  idCh5swp3) {
	  iDDL = (idDE/100)*2+1;
	      begin[cursor] = AliMpBusPatch::GetGlobalBusID(1, iDDL-1);	  
	}

	end[cursor]   = begin[cursor] + nbBusPatch - 1;
	++cursor;
	begin[cursor] = end[cursor-1] + 1;

	cout << idDE << " " << begin[cursor-1]<<"-"<<end[cursor-1] << " " << iDDL-1 << " " <<nameSlat <<endl;
	out << idDE << " " << begin[cursor-1]<<"-"<<end[cursor-1] <<" " << iDDL-1 <<endl;
      }

     if (idDE  >= idCh5swp4 && idDE < 600) {
	
	if ( idDE ==  idCh5swp4) {
	  iDDL = (idDE/100)*2+2 ;
	  begin[cursor] = AliMpBusPatch::GetGlobalBusID(offsetBusCh5swp2, iDDL-1);
	}
	
	end[cursor]   = begin[cursor] - nbBusPatch + 1;
	++cursor;
	begin[cursor] = end[cursor-1] - 1;

	cout << idDE << " " << end[cursor-1]<<"-"<<begin[cursor-1] << " " << iDDL-1 << " " <<nameSlat <<endl;
	out << idDE << " " << end[cursor-1]<<"-"<<begin[cursor-1] <<" " << iDDL-1 <<endl;
      }

     // chamber 6
      if (idDE  >= idCh6swp1 && idDE < idCh6swp2) {
	
	if ( idDE ==  idCh6swp1) {
	  iDDL = (idDE/100)*2-2 ;
	  begin[cursor] = AliMpBusPatch::GetGlobalBusID(offsetBusCh5swp1+offsetBusCh6swp1, iDDL-1);
	}
	
	end[cursor]   = begin[cursor] - nbBusPatch + 1;
	++cursor;
	begin[cursor] = end[cursor-1] - 1;

	cout << idDE << " " << end[cursor-1]<<"-"<<begin[cursor-1] << " " << iDDL-1 << " " <<nameSlat <<endl;
	out << idDE << " " << end[cursor-1]<<"-"<<begin[cursor-1] <<" " << iDDL-1 <<endl;
      }

      if (idDE >=  idCh6swp2  && idDE  < idCh6swp3) {

	if (idDE ==  idCh6swp2) {
	  iDDL = (idDE/100)*2-3;
	      begin[cursor] = AliMpBusPatch::GetGlobalBusID(offsetBusCh5swp2+1, iDDL-1);	  
	}

	end[cursor]   = begin[cursor] + nbBusPatch - 1;
	++cursor;
	begin[cursor] = end[cursor-1] + 1;

	cout << idDE << " " << begin[cursor-1]<<"-"<<end[cursor-1] << " " << iDDL-1 << " " <<nameSlat <<endl;
	out << idDE << " " << begin[cursor-1]<<"-"<<end[cursor-1] <<" " << iDDL-1 <<endl;
      }

      if (idDE >=  idCh6swp3  && idDE  < idCh6swp4) {

	if (idDE ==  idCh6swp3) {
	  iDDL = (idDE/100)*2-1;
	      begin[cursor] = AliMpBusPatch::GetGlobalBusID(offsetBusCh5swp1+1, iDDL-1);	  
	}

	end[cursor]   = begin[cursor] + nbBusPatch - 1;
	++cursor;
	begin[cursor] = end[cursor-1] + 1;

	cout << idDE << " " << begin[cursor-1]<<"-"<<end[cursor-1] << " " << iDDL-1 << " " <<nameSlat <<endl;
	out << idDE << " " << begin[cursor-1]<<"-"<<end[cursor-1] <<" " << iDDL-1 <<endl;
      }

     if (idDE  >= idCh6swp4 && idDE < 700) {
	
	if ( idDE ==  idCh6swp4) {
	  iDDL = (idDE/100)*2 ;
	  begin[cursor] = AliMpBusPatch::GetGlobalBusID(offsetBusCh5swp2+offsetBusCh6swp2, iDDL-1);
	}
	
	end[cursor]   = begin[cursor] - nbBusPatch + 1;
	++cursor;
	begin[cursor] = end[cursor-1] - 1;

	cout << idDE << " " << end[cursor-1]<<"-"<<begin[cursor-1] << " " << iDDL-1 << " " <<nameSlat <<endl;
	out << idDE << " " << end[cursor-1]<<"-"<<begin[cursor-1] <<" " << iDDL-1 <<endl;
      }

    }
 
    // station 4 & 5
    // back to normal one ddl connects one 1/2 chamber
    // finally !
 
    if (idDE >= 700) {

      if (idDE % 100 == 0) {
	cout << "# Chamber " << idDE/100 << endl;
	out  << "# Chamber " << idDE/100 << endl;
      }

      if ((idDE % 100) >= idSt45swp1 && (idDE % 100) < idSt45swp2) {
	if ((idDE % 100) == idSt45swp1) {
	  iDDL = (idDE/100)*2-1;
	  begin[cursor] = AliMpBusPatch::GetGlobalBusID(1, iDDL-1);
	}
	end[cursor]   = begin[cursor] + nbBusPatch - 1;
	++cursor;
	begin[cursor] = end[cursor-1] + 1;

	cout << idDE << " " << begin[cursor-1]<<"-"<<end[cursor-1] << " " << iDDL-1 << " " <<nameSlat <<endl;
	out << idDE << " " << begin[cursor-1]<<"-"<<end[cursor-1] <<" " << iDDL-1 <<endl;
      }

      if (idDE % 100 >= idSt45swp2) {

	if ((idDE % 100) == idSt45swp2 ) {
	  iDDL = (idDE/100)*2 ;
	  if (idDE/100 == 7 || idDE/100 == 8)
	      begin[cursor] = AliMpBusPatch::GetGlobalBusID(offsetBusSt4swp, iDDL-1);
	  else
	      begin[cursor] = AliMpBusPatch::GetGlobalBusID(offsetBusSt5swp, iDDL-1);

	}
	end[cursor]   = begin[cursor] - nbBusPatch + 1;
	++cursor;
	begin[cursor] = end[cursor-1] - 1;

	cout << idDE << " " << end[cursor-1]<<"-"<<begin[cursor-1] << " " << iDDL-1 << " " <<nameSlat <<endl;
	out << idDE << " " << end[cursor-1]<<"-"<<begin[cursor-1] <<" " << iDDL-1 <<endl;
      }

      if ((idDE % 100) >= 0 && (idDE % 100) < idSt45swp1) {

	if ((idDE % 100) == 0 ) {
	  iDDL = (idDE/100)*2;
	  if (idDE/100 == 7 || idDE/100 == 8)
	      begin[cursor] = AliMpBusPatch::GetGlobalBusID(offsetBusSt4, iDDL-1);
	  else 
	      begin[cursor] = AliMpBusPatch::GetGlobalBusID(offsetBusSt5, iDDL-1);
	  
	}
	end[cursor]   = begin[cursor] - nbBusPatch + 1;
	++cursor;
	begin[cursor] = end[cursor-1] - 1;

	cout << idDE << " " << end[cursor-1]<<"-"<<begin[cursor-1] << " " << iDDL-1 << " " <<nameSlat <<endl;
	out << idDE << " " << end[cursor-1]<<"-"<<begin[cursor-1] <<" " << iDDL-1 <<endl;
      }
 
    }

  }
  printf(" Slat: number of TB %d and BB %d\n", nbTB, nbBB);
  in.close();
  out.close();  
}
 MUONGenerateBusPatch.C:1
 MUONGenerateBusPatch.C:2
 MUONGenerateBusPatch.C:3
 MUONGenerateBusPatch.C:4
 MUONGenerateBusPatch.C:5
 MUONGenerateBusPatch.C:6
 MUONGenerateBusPatch.C:7
 MUONGenerateBusPatch.C:8
 MUONGenerateBusPatch.C:9
 MUONGenerateBusPatch.C:10
 MUONGenerateBusPatch.C:11
 MUONGenerateBusPatch.C:12
 MUONGenerateBusPatch.C:13
 MUONGenerateBusPatch.C:14
 MUONGenerateBusPatch.C:15
 MUONGenerateBusPatch.C:16
 MUONGenerateBusPatch.C:17
 MUONGenerateBusPatch.C:18
 MUONGenerateBusPatch.C:19
 MUONGenerateBusPatch.C:20
 MUONGenerateBusPatch.C:21
 MUONGenerateBusPatch.C:22
 MUONGenerateBusPatch.C:23
 MUONGenerateBusPatch.C:24
 MUONGenerateBusPatch.C:25
 MUONGenerateBusPatch.C:26
 MUONGenerateBusPatch.C:27
 MUONGenerateBusPatch.C:28
 MUONGenerateBusPatch.C:29
 MUONGenerateBusPatch.C:30
 MUONGenerateBusPatch.C:31
 MUONGenerateBusPatch.C:32
 MUONGenerateBusPatch.C:33
 MUONGenerateBusPatch.C:34
 MUONGenerateBusPatch.C:35
 MUONGenerateBusPatch.C:36
 MUONGenerateBusPatch.C:37
 MUONGenerateBusPatch.C:38
 MUONGenerateBusPatch.C:39
 MUONGenerateBusPatch.C:40
 MUONGenerateBusPatch.C:41
 MUONGenerateBusPatch.C:42
 MUONGenerateBusPatch.C:43
 MUONGenerateBusPatch.C:44
 MUONGenerateBusPatch.C:45
 MUONGenerateBusPatch.C:46
 MUONGenerateBusPatch.C:47
 MUONGenerateBusPatch.C:48
 MUONGenerateBusPatch.C:49
 MUONGenerateBusPatch.C:50
 MUONGenerateBusPatch.C:51
 MUONGenerateBusPatch.C:52
 MUONGenerateBusPatch.C:53
 MUONGenerateBusPatch.C:54
 MUONGenerateBusPatch.C:55
 MUONGenerateBusPatch.C:56
 MUONGenerateBusPatch.C:57
 MUONGenerateBusPatch.C:58
 MUONGenerateBusPatch.C:59
 MUONGenerateBusPatch.C:60
 MUONGenerateBusPatch.C:61
 MUONGenerateBusPatch.C:62
 MUONGenerateBusPatch.C:63
 MUONGenerateBusPatch.C:64
 MUONGenerateBusPatch.C:65
 MUONGenerateBusPatch.C:66
 MUONGenerateBusPatch.C:67
 MUONGenerateBusPatch.C:68
 MUONGenerateBusPatch.C:69
 MUONGenerateBusPatch.C:70
 MUONGenerateBusPatch.C:71
 MUONGenerateBusPatch.C:72
 MUONGenerateBusPatch.C:73
 MUONGenerateBusPatch.C:74
 MUONGenerateBusPatch.C:75
 MUONGenerateBusPatch.C:76
 MUONGenerateBusPatch.C:77
 MUONGenerateBusPatch.C:78
 MUONGenerateBusPatch.C:79
 MUONGenerateBusPatch.C:80
 MUONGenerateBusPatch.C:81
 MUONGenerateBusPatch.C:82
 MUONGenerateBusPatch.C:83
 MUONGenerateBusPatch.C:84
 MUONGenerateBusPatch.C:85
 MUONGenerateBusPatch.C:86
 MUONGenerateBusPatch.C:87
 MUONGenerateBusPatch.C:88
 MUONGenerateBusPatch.C:89
 MUONGenerateBusPatch.C:90
 MUONGenerateBusPatch.C:91
 MUONGenerateBusPatch.C:92
 MUONGenerateBusPatch.C:93
 MUONGenerateBusPatch.C:94
 MUONGenerateBusPatch.C:95
 MUONGenerateBusPatch.C:96
 MUONGenerateBusPatch.C:97
 MUONGenerateBusPatch.C:98
 MUONGenerateBusPatch.C:99
 MUONGenerateBusPatch.C:100
 MUONGenerateBusPatch.C:101
 MUONGenerateBusPatch.C:102
 MUONGenerateBusPatch.C:103
 MUONGenerateBusPatch.C:104
 MUONGenerateBusPatch.C:105
 MUONGenerateBusPatch.C:106
 MUONGenerateBusPatch.C:107
 MUONGenerateBusPatch.C:108
 MUONGenerateBusPatch.C:109
 MUONGenerateBusPatch.C:110
 MUONGenerateBusPatch.C:111
 MUONGenerateBusPatch.C:112
 MUONGenerateBusPatch.C:113
 MUONGenerateBusPatch.C:114
 MUONGenerateBusPatch.C:115
 MUONGenerateBusPatch.C:116
 MUONGenerateBusPatch.C:117
 MUONGenerateBusPatch.C:118
 MUONGenerateBusPatch.C:119
 MUONGenerateBusPatch.C:120
 MUONGenerateBusPatch.C:121
 MUONGenerateBusPatch.C:122
 MUONGenerateBusPatch.C:123
 MUONGenerateBusPatch.C:124
 MUONGenerateBusPatch.C:125
 MUONGenerateBusPatch.C:126
 MUONGenerateBusPatch.C:127
 MUONGenerateBusPatch.C:128
 MUONGenerateBusPatch.C:129
 MUONGenerateBusPatch.C:130
 MUONGenerateBusPatch.C:131
 MUONGenerateBusPatch.C:132
 MUONGenerateBusPatch.C:133
 MUONGenerateBusPatch.C:134
 MUONGenerateBusPatch.C:135
 MUONGenerateBusPatch.C:136
 MUONGenerateBusPatch.C:137
 MUONGenerateBusPatch.C:138
 MUONGenerateBusPatch.C:139
 MUONGenerateBusPatch.C:140
 MUONGenerateBusPatch.C:141
 MUONGenerateBusPatch.C:142
 MUONGenerateBusPatch.C:143
 MUONGenerateBusPatch.C:144
 MUONGenerateBusPatch.C:145
 MUONGenerateBusPatch.C:146
 MUONGenerateBusPatch.C:147
 MUONGenerateBusPatch.C:148
 MUONGenerateBusPatch.C:149
 MUONGenerateBusPatch.C:150
 MUONGenerateBusPatch.C:151
 MUONGenerateBusPatch.C:152
 MUONGenerateBusPatch.C:153
 MUONGenerateBusPatch.C:154
 MUONGenerateBusPatch.C:155
 MUONGenerateBusPatch.C:156
 MUONGenerateBusPatch.C:157
 MUONGenerateBusPatch.C:158
 MUONGenerateBusPatch.C:159
 MUONGenerateBusPatch.C:160
 MUONGenerateBusPatch.C:161
 MUONGenerateBusPatch.C:162
 MUONGenerateBusPatch.C:163
 MUONGenerateBusPatch.C:164
 MUONGenerateBusPatch.C:165
 MUONGenerateBusPatch.C:166
 MUONGenerateBusPatch.C:167
 MUONGenerateBusPatch.C:168
 MUONGenerateBusPatch.C:169
 MUONGenerateBusPatch.C:170
 MUONGenerateBusPatch.C:171
 MUONGenerateBusPatch.C:172
 MUONGenerateBusPatch.C:173
 MUONGenerateBusPatch.C:174
 MUONGenerateBusPatch.C:175
 MUONGenerateBusPatch.C:176
 MUONGenerateBusPatch.C:177
 MUONGenerateBusPatch.C:178
 MUONGenerateBusPatch.C:179
 MUONGenerateBusPatch.C:180
 MUONGenerateBusPatch.C:181
 MUONGenerateBusPatch.C:182
 MUONGenerateBusPatch.C:183
 MUONGenerateBusPatch.C:184
 MUONGenerateBusPatch.C:185
 MUONGenerateBusPatch.C:186
 MUONGenerateBusPatch.C:187
 MUONGenerateBusPatch.C:188
 MUONGenerateBusPatch.C:189
 MUONGenerateBusPatch.C:190
 MUONGenerateBusPatch.C:191
 MUONGenerateBusPatch.C:192
 MUONGenerateBusPatch.C:193
 MUONGenerateBusPatch.C:194
 MUONGenerateBusPatch.C:195
 MUONGenerateBusPatch.C:196
 MUONGenerateBusPatch.C:197
 MUONGenerateBusPatch.C:198
 MUONGenerateBusPatch.C:199
 MUONGenerateBusPatch.C:200
 MUONGenerateBusPatch.C:201
 MUONGenerateBusPatch.C:202
 MUONGenerateBusPatch.C:203
 MUONGenerateBusPatch.C:204
 MUONGenerateBusPatch.C:205
 MUONGenerateBusPatch.C:206
 MUONGenerateBusPatch.C:207
 MUONGenerateBusPatch.C:208
 MUONGenerateBusPatch.C:209
 MUONGenerateBusPatch.C:210
 MUONGenerateBusPatch.C:211
 MUONGenerateBusPatch.C:212
 MUONGenerateBusPatch.C:213
 MUONGenerateBusPatch.C:214
 MUONGenerateBusPatch.C:215
 MUONGenerateBusPatch.C:216
 MUONGenerateBusPatch.C:217
 MUONGenerateBusPatch.C:218
 MUONGenerateBusPatch.C:219
 MUONGenerateBusPatch.C:220
 MUONGenerateBusPatch.C:221
 MUONGenerateBusPatch.C:222
 MUONGenerateBusPatch.C:223
 MUONGenerateBusPatch.C:224
 MUONGenerateBusPatch.C:225
 MUONGenerateBusPatch.C:226
 MUONGenerateBusPatch.C:227
 MUONGenerateBusPatch.C:228
 MUONGenerateBusPatch.C:229
 MUONGenerateBusPatch.C:230
 MUONGenerateBusPatch.C:231
 MUONGenerateBusPatch.C:232
 MUONGenerateBusPatch.C:233
 MUONGenerateBusPatch.C:234
 MUONGenerateBusPatch.C:235
 MUONGenerateBusPatch.C:236
 MUONGenerateBusPatch.C:237
 MUONGenerateBusPatch.C:238
 MUONGenerateBusPatch.C:239
 MUONGenerateBusPatch.C:240
 MUONGenerateBusPatch.C:241
 MUONGenerateBusPatch.C:242
 MUONGenerateBusPatch.C:243
 MUONGenerateBusPatch.C:244
 MUONGenerateBusPatch.C:245
 MUONGenerateBusPatch.C:246
 MUONGenerateBusPatch.C:247
 MUONGenerateBusPatch.C:248
 MUONGenerateBusPatch.C:249
 MUONGenerateBusPatch.C:250
 MUONGenerateBusPatch.C:251
 MUONGenerateBusPatch.C:252
 MUONGenerateBusPatch.C:253
 MUONGenerateBusPatch.C:254
 MUONGenerateBusPatch.C:255
 MUONGenerateBusPatch.C:256
 MUONGenerateBusPatch.C:257
 MUONGenerateBusPatch.C:258
 MUONGenerateBusPatch.C:259
 MUONGenerateBusPatch.C:260
 MUONGenerateBusPatch.C:261
 MUONGenerateBusPatch.C:262
 MUONGenerateBusPatch.C:263
 MUONGenerateBusPatch.C:264
 MUONGenerateBusPatch.C:265
 MUONGenerateBusPatch.C:266
 MUONGenerateBusPatch.C:267
 MUONGenerateBusPatch.C:268
 MUONGenerateBusPatch.C:269
 MUONGenerateBusPatch.C:270
 MUONGenerateBusPatch.C:271
 MUONGenerateBusPatch.C:272
 MUONGenerateBusPatch.C:273
 MUONGenerateBusPatch.C:274
 MUONGenerateBusPatch.C:275
 MUONGenerateBusPatch.C:276
 MUONGenerateBusPatch.C:277
 MUONGenerateBusPatch.C:278
 MUONGenerateBusPatch.C:279
 MUONGenerateBusPatch.C:280
 MUONGenerateBusPatch.C:281
 MUONGenerateBusPatch.C:282
 MUONGenerateBusPatch.C:283
 MUONGenerateBusPatch.C:284
 MUONGenerateBusPatch.C:285
 MUONGenerateBusPatch.C:286
 MUONGenerateBusPatch.C:287
 MUONGenerateBusPatch.C:288
 MUONGenerateBusPatch.C:289
 MUONGenerateBusPatch.C:290
 MUONGenerateBusPatch.C:291
 MUONGenerateBusPatch.C:292
 MUONGenerateBusPatch.C:293
 MUONGenerateBusPatch.C:294
 MUONGenerateBusPatch.C:295
 MUONGenerateBusPatch.C:296
 MUONGenerateBusPatch.C:297
 MUONGenerateBusPatch.C:298
 MUONGenerateBusPatch.C:299
 MUONGenerateBusPatch.C:300
 MUONGenerateBusPatch.C:301
 MUONGenerateBusPatch.C:302
 MUONGenerateBusPatch.C:303
 MUONGenerateBusPatch.C:304
 MUONGenerateBusPatch.C:305
 MUONGenerateBusPatch.C:306
 MUONGenerateBusPatch.C:307
 MUONGenerateBusPatch.C:308
 MUONGenerateBusPatch.C:309
 MUONGenerateBusPatch.C:310
 MUONGenerateBusPatch.C:311
 MUONGenerateBusPatch.C:312
 MUONGenerateBusPatch.C:313
 MUONGenerateBusPatch.C:314
 MUONGenerateBusPatch.C:315
 MUONGenerateBusPatch.C:316
 MUONGenerateBusPatch.C:317
 MUONGenerateBusPatch.C:318
 MUONGenerateBusPatch.C:319
 MUONGenerateBusPatch.C:320
 MUONGenerateBusPatch.C:321
 MUONGenerateBusPatch.C:322
 MUONGenerateBusPatch.C:323
 MUONGenerateBusPatch.C:324
 MUONGenerateBusPatch.C:325
 MUONGenerateBusPatch.C:326
 MUONGenerateBusPatch.C:327
 MUONGenerateBusPatch.C:328
 MUONGenerateBusPatch.C:329
 MUONGenerateBusPatch.C:330
 MUONGenerateBusPatch.C:331
 MUONGenerateBusPatch.C:332
 MUONGenerateBusPatch.C:333
 MUONGenerateBusPatch.C:334
 MUONGenerateBusPatch.C:335
 MUONGenerateBusPatch.C:336
 MUONGenerateBusPatch.C:337
 MUONGenerateBusPatch.C:338
 MUONGenerateBusPatch.C:339
 MUONGenerateBusPatch.C:340
 MUONGenerateBusPatch.C:341
 MUONGenerateBusPatch.C:342
 MUONGenerateBusPatch.C:343
 MUONGenerateBusPatch.C:344
 MUONGenerateBusPatch.C:345
 MUONGenerateBusPatch.C:346
 MUONGenerateBusPatch.C:347
 MUONGenerateBusPatch.C:348
 MUONGenerateBusPatch.C:349
 MUONGenerateBusPatch.C:350
 MUONGenerateBusPatch.C:351
 MUONGenerateBusPatch.C:352
 MUONGenerateBusPatch.C:353
 MUONGenerateBusPatch.C:354
 MUONGenerateBusPatch.C:355
 MUONGenerateBusPatch.C:356
 MUONGenerateBusPatch.C:357
 MUONGenerateBusPatch.C:358
 MUONGenerateBusPatch.C:359
 MUONGenerateBusPatch.C:360
 MUONGenerateBusPatch.C:361
 MUONGenerateBusPatch.C:362
 MUONGenerateBusPatch.C:363
 MUONGenerateBusPatch.C:364
 MUONGenerateBusPatch.C:365
 MUONGenerateBusPatch.C:366
 MUONGenerateBusPatch.C:367
 MUONGenerateBusPatch.C:368
 MUONGenerateBusPatch.C:369
 MUONGenerateBusPatch.C:370
 MUONGenerateBusPatch.C:371
 MUONGenerateBusPatch.C:372
 MUONGenerateBusPatch.C:373
 MUONGenerateBusPatch.C:374
 MUONGenerateBusPatch.C:375
 MUONGenerateBusPatch.C:376
 MUONGenerateBusPatch.C:377
 MUONGenerateBusPatch.C:378
 MUONGenerateBusPatch.C:379
 MUONGenerateBusPatch.C:380
 MUONGenerateBusPatch.C:381
 MUONGenerateBusPatch.C:382
 MUONGenerateBusPatch.C:383
 MUONGenerateBusPatch.C:384
 MUONGenerateBusPatch.C:385
 MUONGenerateBusPatch.C:386
 MUONGenerateBusPatch.C:387
 MUONGenerateBusPatch.C:388
 MUONGenerateBusPatch.C:389
 MUONGenerateBusPatch.C:390
 MUONGenerateBusPatch.C:391
 MUONGenerateBusPatch.C:392
 MUONGenerateBusPatch.C:393
 MUONGenerateBusPatch.C:394
 MUONGenerateBusPatch.C:395
 MUONGenerateBusPatch.C:396
 MUONGenerateBusPatch.C:397
 MUONGenerateBusPatch.C:398
 MUONGenerateBusPatch.C:399
 MUONGenerateBusPatch.C:400
 MUONGenerateBusPatch.C:401
 MUONGenerateBusPatch.C:402
 MUONGenerateBusPatch.C:403
 MUONGenerateBusPatch.C:404
 MUONGenerateBusPatch.C:405
 MUONGenerateBusPatch.C:406
 MUONGenerateBusPatch.C:407
 MUONGenerateBusPatch.C:408