From 3e281936b0ad7b5cae400c883e0721c8617d9abe Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Tue, 30 Jan 2018 15:59:01 +0100
Subject: [PATCH] Herwig_i: Comply with ATLAS naming conventions.

Private static data members should start with s_.
Identifiers should not start with underscores.



Former-commit-id: 0766548b6ff55796ffbfad59eb2781945fa66ae7
---
 Generators/Herwig_i/Herwig_i/Herwig.h     |  2 +-
 Generators/Herwig_i/Herwig_i/Lhefinfo.h   |  2 +-
 Generators/Herwig_i/Herwig_i/Lhefinfo.icc |  4 ++--
 Generators/Herwig_i/Herwig_i/herwig6520.h | 12 +++++------
 Generators/Herwig_i/Herwig_i/wgtacp.h     |  2 +-
 Generators/Herwig_i/Herwig_i/wgtacp.icc   |  8 +++----
 Generators/Herwig_i/src/Herwig.cxx        | 26 +++++++++++------------
 Generators/Herwig_i/src/Lhefinfo.cxx      | 16 +++++++-------
 Generators/Herwig_i/src/wgtacp.cxx        |  2 +-
 9 files changed, 37 insertions(+), 37 deletions(-)

diff --git a/Generators/Herwig_i/Herwig_i/Herwig.h b/Generators/Herwig_i/Herwig_i/Herwig.h
index baeef1845b5..123bfef3250 100644
--- a/Generators/Herwig_i/Herwig_i/Herwig.h
+++ b/Generators/Herwig_i/Herwig_i/Herwig.h
@@ -121,7 +121,7 @@ protected:
   /// I/O to HEPEVT
   void store_Atlas_HEPEVT();
 
-  static Atlas_HEPEVT* atlas_HEPEVT;
+  static Atlas_HEPEVT* s_atlas_HEPEVT;
 
 };
 
diff --git a/Generators/Herwig_i/Herwig_i/Lhefinfo.h b/Generators/Herwig_i/Herwig_i/Lhefinfo.h
index 417841673e3..978e3b3c4f2 100644
--- a/Generators/Herwig_i/Herwig_i/Lhefinfo.h
+++ b/Generators/Herwig_i/Herwig_i/Lhefinfo.h
@@ -44,7 +44,7 @@ private:
     double  scalePdf, xPdf1, xPdf2;
   };
 
-  static LHEFINFO* _lhefinfo;
+  static LHEFINFO* s_lhefinfo;
 };
 
 #include "Herwig_i/Lhefinfo.icc"
diff --git a/Generators/Herwig_i/Herwig_i/Lhefinfo.icc b/Generators/Herwig_i/Herwig_i/Lhefinfo.icc
index c2ebd84187c..5ebfb4da400 100644
--- a/Generators/Herwig_i/Herwig_i/Lhefinfo.icc
+++ b/Generators/Herwig_i/Herwig_i/Lhefinfo.icc
@@ -7,8 +7,8 @@
 // initialise pointer
 void Lhefinfo::init() 
 {
-  if ( !_lhefinfo ) {
-    _lhefinfo = static_cast< LHEFINFO* >( lhefinfo_address_() );
+  if ( !s_lhefinfo ) {
+    s_lhefinfo = static_cast< LHEFINFO* >( lhefinfo_address_() );
   }
 }
 
diff --git a/Generators/Herwig_i/Herwig_i/herwig6520.h b/Generators/Herwig_i/Herwig_i/herwig6520.h
index ee29c944a69..d11abb9b8f6 100644
--- a/Generators/Herwig_i/Herwig_i/herwig6520.h
+++ b/Generators/Herwig_i/Herwig_i/herwig6520.h
@@ -2,13 +2,13 @@
   Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 */
 
-#ifndef __HERWIG65_HH__
-#define __HERWIG65_HH__
+#ifndef HERWIG_I_HERWIG6520_H
+#define HERWIG_I_HERWIG6520_H
 
 /* Common Block Declarations */
 #include <complex>
 
-const int m_nmxhep = 10000;
+const int nmxhep = 10000;
 
 struct Hwbeam_t {
     int ipart1, ipart2;
@@ -69,7 +69,7 @@ extern  Hwparp_t* gHwparp ;
 struct Hwbosc_t {
   // rhohep = 3*NMXHEP
 //   double alpfac, brhig[12], enhanc[12], gammax, rhohep[30000];
-  double alpfac, brhig[12], enhanc[12], gammax, rhohep[3*m_nmxhep];
+  double alpfac, brhig[12], enhanc[12], gammax, rhohep[3*nmxhep];
   int iophig, modbos[50];
 } ;
 
@@ -92,7 +92,7 @@ struct Hwevnt_t {
   // idhw = NMXHEP
     double avwgt, evwgt, gamwt, tlout, wbigst, wgtmax, wgtsum, wsqsum;
 //     int idhw[10000], ierror, istat, lwevt, maxer, maxpr;
-    int idhw[m_nmxhep], ierror, istat, lwevt, maxer, maxpr;
+    int idhw[nmxhep], ierror, istat, lwevt, maxer, maxpr;
     int nowgt;
     int nrn[2], numer, numeru, nwgts;
     int gensof;
@@ -313,7 +313,7 @@ struct Hwspin_t {
     std::complex<double> mespn[2400]	/* was [2][2][2][2][3][50] */, rhospn[200]	/* was [2][2][50] */;
     double spncfc[450]	/* was [3][3][50] */;
 //     int idspn[50], jmospn[50], jdaspn[100]	/* was [2][50] */, nspn, isnhep[10000], nsntry;
-    int idspn[50], jmospn[50], jdaspn[100]	/* was [2][50] */, nspn, isnhep[m_nmxhep], nsntry;
+    int idspn[50], jmospn[50], jdaspn[100]	/* was [2][50] */, nspn, isnhep[nmxhep], nsntry;
     int decspn[50];
     int ncfl[50], spcopt;
 };
diff --git a/Generators/Herwig_i/Herwig_i/wgtacp.h b/Generators/Herwig_i/Herwig_i/wgtacp.h
index 4db6d461e27..c3fc89f4694 100644
--- a/Generators/Herwig_i/Herwig_i/wgtacp.h
+++ b/Generators/Herwig_i/Herwig_i/wgtacp.h
@@ -42,7 +42,7 @@ private:
     int     userwgts;
  };
 
-  static WGTACP* _wgtacp;
+  static WGTACP* s_wgtacp;
 };
 
 #include "Herwig_i/wgtacp.icc"
diff --git a/Generators/Herwig_i/Herwig_i/wgtacp.icc b/Generators/Herwig_i/Herwig_i/wgtacp.icc
index 6215065d144..2300e59960f 100644
--- a/Generators/Herwig_i/Herwig_i/wgtacp.icc
+++ b/Generators/Herwig_i/Herwig_i/wgtacp.icc
@@ -6,18 +6,18 @@
 
 // initialise pointer
 void Wgtacp::init(){
-  if ( !_wgtacp ) {
-    _wgtacp = static_cast< WGTACP* >( wgtacp_address_() );
+  if ( !s_wgtacp ) {
+    s_wgtacp = static_cast< WGTACP* >( wgtacp_address_() );
   }
 }
 
 double Wgtacp::wgtacp(int i){
   init();
-  return _wgtacp->wgtacp[i];
+  return s_wgtacp->wgtacp[i];
 }
 
 int Wgtacp::userwgts(){
   init();
-  return _wgtacp->userwgts;
+  return s_wgtacp->userwgts;
 }
 
diff --git a/Generators/Herwig_i/src/Herwig.cxx b/Generators/Herwig_i/src/Herwig.cxx
index a47fde5fb8b..1006ae3f079 100644
--- a/Generators/Herwig_i/src/Herwig.cxx
+++ b/Generators/Herwig_i/src/Herwig.cxx
@@ -129,7 +129,7 @@ extern "C" {
 ////////////////////////////////////////////////////////
 
 
-Atlas_HEPEVT* Herwig::atlas_HEPEVT = new Atlas_HEPEVT();
+Atlas_HEPEVT* Herwig::s_atlas_HEPEVT = new Atlas_HEPEVT();
 
 
 //--------------------------------------------------------------------------
@@ -809,17 +809,17 @@ StatusCode Herwig::fillEvt(HepMC::GenEvent* evt) {
   int idh1=gHwevnt->idhw[ ld1-1 ];
   int idh2=gHwevnt->idhw[ ld2-1 ];
   int nset=0;
-  double m_disf[26];
+  double disf[26];
 
   if ( idx1 > 25 || idx2 > 25 ) {
     ATH_MSG_WARNING( "PDF index out of range!" );
   } else {
 
-    hwsfun_(&x1, &q, &idh1, &nset, &(m_disf[0]), &ld1);
-    hwsfun_(&x2, &q, &idh2, &nset, &(m_disf[13]), &ld2);
+    hwsfun_(&x1, &q, &idh1, &nset, &(disf[0]), &ld1);
+    hwsfun_(&x2, &q, &idh2, &nset, &(disf[13]), &ld2);
 
-    xpdf1 = m_disf[ idx1 ];
-    xpdf2 = m_disf[ idx2 ];
+    xpdf1 = disf[ idx1 ];
+    xpdf2 = disf[ idx2 ];
   }
 
 
@@ -934,15 +934,15 @@ void Herwig::updateStatusCode( HepMC::GenEvent *evt )
 
 void Herwig::store_Atlas_HEPEVT() {
   ATH_MSG_DEBUG("atlas_HEPEVT params: "
-                << "nhep=" << atlas_HEPEVT->nhep() << ", "
-                << "isthep(10)=" << atlas_HEPEVT->isthep(10) << ", "
-                << "idhep(10)=" << atlas_HEPEVT->idhep(10) << ", "
-                << "jmohep(1,10)=" << atlas_HEPEVT->jmohep(1,10) << ", "
-                << "jdahep(2,10)=" << atlas_HEPEVT->jdahep(2,10));
+                << "nhep=" << s_atlas_HEPEVT->nhep() << ", "
+                << "isthep(10)=" << s_atlas_HEPEVT->isthep(10) << ", "
+                << "idhep(10)=" << s_atlas_HEPEVT->idhep(10) << ", "
+                << "jmohep(1,10)=" << s_atlas_HEPEVT->jmohep(1,10) << ", "
+                << "jdahep(2,10)=" << s_atlas_HEPEVT->jdahep(2,10));
    /// @todo Ugly... and a memory leak?
-  atlas_HEPEVT->fill();
+  s_atlas_HEPEVT->fill();
   Atlas_HEPEVT* ahep = new Atlas_HEPEVT();
-  *(ahep) = *(atlas_HEPEVT);
+  *(ahep) = *(s_atlas_HEPEVT);
   string keyid = "Herwig";
   StatusCode sc = evtStore()->record(ahep, keyid);
   if (!sc.isSuccess()) {
diff --git a/Generators/Herwig_i/src/Lhefinfo.cxx b/Generators/Herwig_i/src/Lhefinfo.cxx
index c0f936ec488..647f084cfce 100644
--- a/Generators/Herwig_i/src/Lhefinfo.cxx
+++ b/Generators/Herwig_i/src/Lhefinfo.cxx
@@ -6,7 +6,7 @@
 #include "Herwig_i/Lhefinfo.h"
 
 // set pointer to zero at start
-Lhefinfo::LHEFINFO* Lhefinfo::_lhefinfo = 0;
+Lhefinfo::LHEFINFO* Lhefinfo::s_lhefinfo = 0;
 
 // Constructor
 Lhefinfo::Lhefinfo() 
@@ -19,42 +19,42 @@ Lhefinfo::~Lhefinfo()
 int& Lhefinfo::id1()
 {
   init();
-  return _lhefinfo->id1;
+  return s_lhefinfo->id1;
 }
 
 int& Lhefinfo::id2()
 {
   init();
-  return _lhefinfo->id2;
+  return s_lhefinfo->id2;
 }
 
 double& Lhefinfo::x1()
 {
   init();
-  return _lhefinfo->x1;
+  return s_lhefinfo->x1;
 }
 
 double& Lhefinfo::x2()
 {
   init();
-  return _lhefinfo->x2;
+  return s_lhefinfo->x2;
 }
 
 double& Lhefinfo::scalePdf()
 {
   init();
-  return _lhefinfo->scalePdf;
+  return s_lhefinfo->scalePdf;
 }
 
 double& Lhefinfo::xPdf1()
 {
   init();
-  return _lhefinfo->xPdf1;
+  return s_lhefinfo->xPdf1;
 }
 
 double& Lhefinfo::xPdf2()
 {
   init();
-  return _lhefinfo->xPdf2;
+  return s_lhefinfo->xPdf2;
 }
 
diff --git a/Generators/Herwig_i/src/wgtacp.cxx b/Generators/Herwig_i/src/wgtacp.cxx
index 369a85942fb..5d5aafd5afd 100644
--- a/Generators/Herwig_i/src/wgtacp.cxx
+++ b/Generators/Herwig_i/src/wgtacp.cxx
@@ -6,7 +6,7 @@
 #include "Herwig_i/wgtacp.h"
 
 // set pointer to zero at start
-Wgtacp::WGTACP* Wgtacp::_wgtacp = 0;
+Wgtacp::WGTACP* Wgtacp::s_wgtacp = 0;
 
 // Constructor
 Wgtacp::Wgtacp(){
-- 
GitLab