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

TTree::ReadStream fails on std::cin

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: 6.02/12
    • Fix Version/s: 6.08/00
    • Component/s: Core Libraries, I/O
    • Labels:
      None
    • Environment:

      lxplus

      Description

      TTree::ReadStream does not work as intended when used on std::cin and receiving input from another program.

      Please consider the attached files (testmaketree.cxx and test.csv). The first one can be compiled using

      g++ $(root-config --libs --cflags) -o testmaketree testmaketree.cxx

      The following line works flawlessly executed from a linux shell:
      ./testmaketree test.csv

      But the this line fails with the following error message:
      cat test.csv | ./testmaketree
      Error in <TTree::ReadStream>: Error reading stream

        Attachments

        1. test.csv
          7 kB
        2. testmaketree.cxx
          0.3 kB

          Activity

            People

            • Assignee:
              pcanal Philippe Canal
              Reporter:
              cburgard Carsten Daniel Burgard
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: