Uploaded image for project: 'ROOT'
  1. ROOT
  2. ROOT-4592

TLorentzVector constructor

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • High
    • None
    • < v5-28-00
    • Math Libraries
    • None
    • All

    Description

      this is a copy and paste from: http://root.cern.ch/phpBB3/viewtopic.php?f=3&amp;amp;t=15470&amp;amp;sid=7883219728eb49a8fcdbc973430a47e7&amp;amp;p=66500#p66500

      refer to it for additional details:

      Hello, today I spent a lot of time to find this bug in my program: I have a function

      CODE: SELECT ALL
      void function(const TLorentzVector v);

      but for some reson I was calling it with
      CODE: SELECT ALL
      function(integer_value);

      it was very difficult because the compiler didn't tell me anything. In fact I found that an integer can be converted to a TLorentzVector

      CODE: SELECT ALL
      TLorentzVector a;
      a = 1.2;

      is this a feature? Do we need it? I think it is dangerous

      Attachments

        Activity

          People

            moneta Lorenzo Moneta
            turra Ruggero Turra
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: