Fork me on GitHub

Changeset 973b92a in git for external/fastjet/internal


Ignore:
Timestamp:
Oct 9, 2015, 2:47:38 PM (9 years ago)
Author:
Pavel Demin <pavel.demin@…>
Branches:
ImprovedOutputFile, Timing, dual_readout, llp, master
Children:
8713dee
Parents:
f118021
Message:

update FastJet library to 3.1.3 and Nsubjettiness library to 2.2.1

File:
1 edited

Legend:

Unmodified
Added
Removed
  • external/fastjet/internal/DnnPlane.hh

    rf118021 r973b92a  
    11//FJSTARTHEADER
    2 // $Id: DnnPlane.hh 3442 2014-07-24 07:20:49Z salam $
     2// $Id: DnnPlane.hh 3918 2015-07-03 14:19:13Z salam $
    33//
    44// Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     
    190190    // no crash... that's done by checking (near != NULL)
    191191    if ((std::abs(dist-mindist)<DISTANCE_FOR_CGAL_CHECKS) &&
    192         (near != NULL) &&
     192        _is_not_null(near) && // GPS cf. note below about != NULL with clang/CGAL
    193193        (_euclid_distance(candidate, near->point())<DISTANCE_FOR_CGAL_CHECKS)){
    194194      // we're in a situation where there might be a rounding issue,
     
    222222  /// then use CGAL to compare the distances.
    223223  static const double DISTANCE_FOR_CGAL_CHECKS; 
     224
     225
     226  /// small routine to check if if a vertex handle is not null.
     227  ///
     228  /// This is centralised here because of the need for a not-very
     229  /// readable workaround for certain CGAL/clang++ compiler
     230  /// combinations.
     231  inline static bool _is_not_null(const Vertex_handle & vh) {
     232    // as found in issue 2015-07-clang61+CGAL, the form
     233    //   vh != NULL
     234    // appears to be broken with CGAL-3.6 and clang-3.6.0/.1
     235    //
     236    // The not very "readable"
     237    //   vh.operator->()
     238    // does the job instead
     239    return vh.operator->();
     240  }
    224241 
    225242};
     
    237254inline bool DnnPlane::Valid(const int index) const {
    238255  if (index >= 0 && index < static_cast<int>(_supervertex.size())) {
    239     return (_supervertex[index].vertex != NULL);} else {return false;} }
     256    return _is_not_null(_supervertex[index].vertex);
     257  }
     258  else {
     259    return false;
     260  }
     261}
     262
    240263
    241264inline EtaPhi DnnPlane::etaphi(const int i) const {
Note: See TracChangeset for help on using the changeset viewer.