<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html;
      charset=ISO-8859-1">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Dear all,<br>
    <br>
    We're quite eager to use RIVET in the LHCb community (at least in
    the group that does MC generators studies). As the main developer of
    the Gaudi component that integrates libRivet into our simulation
    software, I'm being asked to release my component and I sort of
    cannot because of the issue that Anton and I discovered and patched.
    I forward or re-forward you the message below and I hope you can
    find some spare time to give us/me an answer whether you ran into
    similar problems with other collaboration frameworks.<br>
    <br>
    Recently, I had a 2 and a half hours debugging session and
    discovered an interesting thing namely, that there seems to be no
    RTTI information for the LWH AIDA classes in the libRivet compiled
    by LCG (we use the software provided by GENSER at LHCb). It may be
    because of the way the AIDA interface is implemented (inlined and
    with virtual destructors) which makes the compiler strip those
    type_infos from the library. Unfortunately, the way I see it, there
    is no alternative, at the moment, but patching RIVET. Your input on
    this issue would be most valuable for me at this point so please
    reply!<br>
    <br>
    Best regards,<br>
    Alex Grecu<br>
    <br>
    -------- Original Message --------
    <table class="moz-email-headers-table" border="0" cellpadding="0"
      cellspacing="0">
      <tbody>
        <tr>
          <th align="RIGHT" nowrap="nowrap" valign="BASELINE">Subject: </th>
          <td>Re: Small problem linking LCG libRivet to Gaudi algorithm
            in Gauss</td>
        </tr>
        <tr>
          <th align="RIGHT" nowrap="nowrap" valign="BASELINE">Date: </th>
          <td>Wed, 7 Sep 2011 14:39:16 +0200</td>
        </tr>
        <tr>
          <th align="RIGHT" nowrap="nowrap" valign="BASELINE">From: </th>
          <td>Anton Karneyeu <a moz-do-not-send="true"
              class="moz-txt-link-rfc2396E"
              href="mailto:Anton.Karneyeu@cern.ch"><Anton.Karneyeu@cern.ch></a></td>
        </tr>
        <tr>
          <th align="RIGHT" nowrap="nowrap" valign="BASELINE">To: </th>
          <td>Rivet <a moz-do-not-send="true"
              class="moz-txt-link-rfc2396E"
              href="mailto:rivet@projects.hepforge.org"><rivet@projects.hepforge.org></a></td>
        </tr>
        <tr>
          <th align="RIGHT" nowrap="nowrap" valign="BASELINE">CC: </th>
          <td><a moz-do-not-send="true" class="moz-txt-link-rfc2396E"
              href="mailto:Alex.Grecu@cern.ch"></a>Genser <a
              moz-do-not-send="true" class="moz-txt-link-rfc2396E"
              href="mailto:genser-dev@cern.ch"><genser-dev@cern.ch></a></td>
        </tr>
      </tbody>
    </table>
    <br>
    <br>
    <pre>Hi all,

yesterday I met with Alex to see the origin of the crash.

Segfault happens at this line:


<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://projects.hepforge.org/rivet/trac/browser/tags/rivet-1.6.0/src/Core/AnalysisHandler.cc#L269">http://projects.hepforge.org/rivet/trac/browser/tags/rivet-1.6.0/src/Core/AnalysisHandler.cc#L269</a>

if the type of *hobj is IProfile1D (and if the *hobj is IHistogram1D 
then all three dynamic_cast work as expected).  The reason is not clear 
for me - looks like compiler bug (gcc 4.3), but can be also due to 
mismatch between g++ options used to build Rivet in genser repository 
and g++ options to link with Rivet in LHCb software, or influence of LCG 
AIDA implementation used in LHCb.

So, I prepare a workaround to avoid subsequent dynamic_casts if 
preceding cast is successful:


<a moz-do-not-send="true" class="moz-txt-link-freetext" href="https://svnweb.cern.ch/trac/GENSER/browser/GENSER3/pkgsrc/MCGenerators/rivet/tags/rivet-1_6_0_p1/patches/patch-aa">https://svnweb.cern.ch/trac/GENSER/browser/GENSER3/pkgsrc/MCGenerators/rivet/tags/rivet-1_6_0_p1/patches/patch-aa</a>

Rivet build with the patch situated here:


/afs/cern.ch/sw/lcg/external/MCGenerators_hepmc2.06.05/rivet/1.6.0.p1/x86_64-slc5-gcc43-opt

Alex confirmed the patched version works fine now with LHCb Rivet handler.

I am not sure the above patch is a best way to fix the problem and may 
be there is a better way. Could you have a look?

Cheers,
Anton



</pre>
  </body>
</html>