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

Copying a TFormula doesn't preserve fLazyInitialization

    XMLWordPrintable

Details

    Description

      When reading a TFormula from a file and making a copy of it before evaluation the TFormula is not initialized properly as `fLazyInitialization` is not copied to the new object.

      I attached a minimal working example

      $ root -l -q -x write.cxx 
       
      Processing write.cxx...
      $ root -l -q -x read.cxx 
       
      Processing read.cxx...
      original: 2
      Error in <TFormula::DoEval>: Formula has error and  it is not properly initialized 
      copy: nan
      

      Attachments

        1. read.cxx
          0.3 kB
        2. write.cxx
          0.2 kB

        Activity

          People

            moneta Lorenzo Moneta
            9784214ad6c464d2626b Martin Ritter
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              Actual End: