2929// the global section
3030// outfile2 (const char*) Output file for the part to be inserted in
3131// the ddAlgorithm part
32- // laymin (int) First layer number of the HE part
32+ // laymin (int) First layer number of the HE part
3333// (28 for versions: V14, V15; 26 for V16)
3434// debug (int) Two digit integer to set debug for each
3535// of the outputs
@@ -99,7 +99,8 @@ class ConvertSiliconV1 {
9999 int debug = 0 );
100100
101101private:
102- void writeSilicon (const char *, const std::vector<int >&, const std::map<int , wafer>&, const std::string&, const bool &, const bool &);
102+ void writeSilicon (
103+ const char *, const std::vector<int >&, const std::map<int , wafer>&, const std::string&, const bool &, const bool &);
103104
104105 const int layMax1_, layMax2_;
105106};
@@ -266,10 +267,10 @@ void ConvertSiliconV0::convert(
266267}
267268
268269void ConvertSiliconV0::writeSilicon (const char * outfile,
269- const std::map<int , wafer>& module ,
270- const std::string& tag,
271- const bool & mode,
272- const bool & debug) {
270+ const std::map<int , wafer>& module ,
271+ const std::string& tag,
272+ const bool & mode,
273+ const bool & debug) {
273274 char apost (' "' );
274275 unsigned int k1 (0 ), k2 (0 );
275276 std::map<int , wafer>::const_iterator itr;
@@ -363,23 +364,23 @@ void ConvertSiliconV1::convert(
363364 } else {
364365 ++others;
365366 std::vector<std::string> items = splitString (std::string (buffer));
366- if (others == 1 ) {
367- layers = std::atoi (items[0 ].c_str ());
368- } else if (others == 2 ) {
369- if (items.size () == static_cast <unsigned int >(layers)) {
370- for (int k = 0 ; k < layers; ++k) {
371- int ltype = std::atoi (items[k].c_str ());
372- if (k < layMax1_) {
373- layer1.emplace_back (ltype);
374- } else if ((k < layMax2_) || global) {
375- layer2.emplace_back (ltype);
376- } else {
377- layer3.emplace_back (ltype);
378- }
379- }
380- } else {
381- ++bad;
382- }
367+ if (others == 1 ) {
368+ layers = std::atoi (items[0 ].c_str ());
369+ } else if (others == 2 ) {
370+ if (items.size () == static_cast <unsigned int >(layers)) {
371+ for (int k = 0 ; k < layers; ++k) {
372+ int ltype = std::atoi (items[k].c_str ());
373+ if (k < layMax1_) {
374+ layer1.emplace_back (ltype);
375+ } else if ((k < layMax2_) || global) {
376+ layer2.emplace_back (ltype);
377+ } else {
378+ layer3.emplace_back (ltype);
379+ }
380+ }
381+ } else {
382+ ++bad;
383+ }
383384 } else if (items.size () != 8 ) {
384385 ++bad;
385386 } else {
@@ -389,8 +390,8 @@ void ConvertSiliconV1::convert(
389390 int waferV = std::atoi (items[7 ].c_str ());
390391 int thck = static_cast <int >(std::find (thick, thick + 4 , items[2 ]) - thick);
391392 int part = std::atoi (items[1 ].c_str ());
392- if ((thck < 4 ) && (part > 0 ))
393- part += addType[thck];
393+ if ((thck < 4 ) && (part > 0 ))
394+ part += addType[thck];
394395 int orient = std::atoi (items[5 ].c_str ());
395396 wafer waf (thck, part, orient);
396397 if (layer <= layMax1_) {
@@ -419,7 +420,7 @@ void ConvertSiliconV1::convert(
419420 if (layer3.size () > 0 ) {
420421 std::cout << " \n There are " << layer3.size () << " of types:" << std::endl;
421422 for (const auto & l : layer3)
422- std::cout << " " << l;
423+ std::cout << " " << l;
423424 }
424425 std::cout << std::endl << std::endl;
425426
@@ -434,11 +435,11 @@ void ConvertSiliconV1::convert(
434435}
435436
436437void ConvertSiliconV1::writeSilicon (const char * outfile,
437- const std::vector<int >& layers,
438- const std::map<int , wafer>& module ,
439- const std::string& tag,
440- const bool & mode,
441- const bool & debug) {
438+ const std::vector<int >& layers,
439+ const std::map<int , wafer>& module ,
440+ const std::string& tag,
441+ const bool & mode,
442+ const bool & debug) {
442443 char apost (' "' );
443444 unsigned int k0 (0 ), k1 (0 ), k2 (0 );
444445 std::map<int , wafer>::const_iterator itr;
@@ -447,8 +448,8 @@ void ConvertSiliconV1::writeSilicon(const char* outfile,
447448 std::vector<int > layerStart;
448449 int layer (-1 );
449450 if (mode)
450- fOut << blank << " <Vector name=" << apost << " LayerTypes" << tag << apost << " type=" << apost << " numeric"
451- << apost << " nEntries=" << apost << layers.size () << apost << " >" ;
451+ fOut << blank << " <Vector name=" << apost << " LayerTypes" << tag << apost << " type=" << apost << " numeric" << apost
452+ << " nEntries=" << apost << layers.size () << apost << " >" ;
452453 else
453454 fOut << blank << " <Vector name=" << apost << " LayerTypes" << apost << " type=" << apost << " numeric" << apost
454455 << " nEntries=" << apost << layers.size () << apost << " >" ;
0 commit comments