title: Open txt file and draw histogram in root
body: <p>I have a txt file which contains numbers. I want to draw a histogram according to this file in root. But I can't do this. </p>
  
  <pre><code>{ 
      TFile *f = new TFile("myfile.root"); 
  
      f.ls(); 
  
      TH1F * h1 = (TH1F*)f.Get("h1"); 
      h1-&gt;Draw(); 
  }
  </code></pre>