Giter VIP home page Giter VIP logo

Comments (11)

oschulz avatar oschulz commented on June 2, 2024

Could you make that data file available?

from uproot.jl.

oschulz avatar oschulz commented on June 2, 2024

In general, this happens when iterating over a TTree serially, entry by entry - that's slow with UpROOT, due to the way Python uproot works. However, you're doing a multi-entry getindex in both cases. I'd really like to have a similar file to test with.

from uproot.jl.

mmikhasenko avatar mmikhasenko commented on June 2, 2024

Thanks for looking at it.

#include "TString.h"
#include "TFile.h"
#include "TTree.h"

#include <string>
#include "stdlib.h"

int create_file() {

  TFile *f = new TFile("test_tree.root", "recreate");
  TTree *t = new TTree("mytree", "mytree");

  auto app = "EXYZ";
  const uint Np = 4;
  std::string names[Np] = {"pBeam", "pPim", "pEta", "pRecoil"};

  //
  double v[Np][4];
  for (uint n=0; n<Np; n++)
    for (uint i=0; i<4; i++)
      t->Branch(TString::Format("%s_%c",names[n].c_str(), app[i]), &v[n][i]);

  const int Nev = 300000;

  for (uint i=0; i <= Nev; i++) {
    for (uint n=0; n<Np; n++)
      for (uint i=0; i<4; i++)
	v[n][i] = (rand() % 100) / 100.0;
    //
    t->Fill();
  }

  t->Write();
  f->Close();

  return 0;
}

from uproot.jl.

oschulz avatar oschulz commented on June 2, 2024

Why did you close the issue - is this resolved?

from uproot.jl.

mmikhasenko avatar mmikhasenko commented on June 2, 2024

Ha, by mistake, I did not notice. Perhaps, the cat walked on the keyboard

from uproot.jl.

oschulz avatar oschulz commented on June 2, 2024

Hehe, Ok, I'll take a look then.

from uproot.jl.

mmikhasenko avatar mmikhasenko commented on June 2, 2024

I will be showing Julia to the CERN students on Friday. Nervous as introducing a new girlfriend to parents

from uproot.jl.

oschulz avatar oschulz commented on June 2, 2024

Oh, nice! Anything you need for that, last-minute, that I can help with?

from uproot.jl.

mmikhasenko avatar mmikhasenko commented on June 2, 2024

thanks! the uproot part works nicely. Enjoy the vacation!

from uproot.jl.

mmikhasenko avatar mmikhasenko commented on June 2, 2024

wrong place for posting. I was making a similar example for investigation in UnROOT.
I think this issue can be closed.

from uproot.jl.

oschulz avatar oschulz commented on June 2, 2024

Thanks!

from uproot.jl.

Related Issues (12)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.