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

rootcp does not preserve name of Key when copying

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: 6.06/04
    • Fix Version/s: 6.14/00
    • Component/s: None
    • Labels:
      None
    • Environment:

      ROOT installed through MacPorts on MacOS El Capitan 10.11.4

      Description

      When using rootcp (this is also true for rootmv), the key-name of an object is not preserved.


      Example

      Create:

      import ROOT
      f=ROOT.TFile('test.root', 'RECREATE')
      h=ROOT.TH1F('', '', 1, 0, 1)
      h.Write('myHistogram')
      f.Close()

      Test:

      import ROOT
      f=ROOT.TFile('test.root', 'READ')
      f.ls()

      Outputs:

      TFile**		test.root
       TFile*		test.root
        KEY: TH1F	myHistogram;1

      Execute copy:

      rootcp "test.root:*" test2.root

      Read:

      import ROOT
      f=ROOT.TFile('test2.root', 'READ')
      f.ls()

      Outputs

      TFile**		test2.root
       TFile*		test2.root
        KEY: TH1F	;1

        Attachments

          Activity

            People

            Assignee:
            mato Pere Mato Vila
            Reporter:
            fawilk Fabian Wilk (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Actual Start: