Code Monkey home page Code Monkey logo

Comments (3)

tamasgal avatar tamasgal commented on May 16, 2024 1

Oh dear, I somehow forgot to answer this. I thought I did 🤔

Anyways, the construction of the struct and also the complete parsing of the structures is very complex. There is a Google group where I also participate in and we were already thinking about writing a book or so about the ROOT I/O to consolidate our knowledge. But I don't know about the time-scale, probably not this year...

So indeed, it's hard to answer your question as it's also depending on other fields in TKey, which have magic values, for example listed here: https://github.com/tamasgal/UnROOT.jl/blob/1d892e7b9159e5425ea91a6cc16dabc1caa09b77/src/constants.jl#L27

from unroot.jl.

Moelf avatar Moelf commented on May 16, 2024

created dynamically
(later it will define it from the streamer info)

I have time and started looking at the code base again. I'm wondering if it's possible to document an implementation-independent way in a Developers / Internals section of the docs so people can understand how conceptually it works.

Particularly, I am yet to understand how to make a struct for a streamer that we have never seen before, my guess is that the name of streamer and byte # for each field are encoded in TKey(?) or somewhere, but if that is the case does this mean we don't have to do any bootstrap except for the TKey(which is ~fixed) and the starting 37(or 75) bytes of the .root files?

from unroot.jl.

tamasgal avatar tamasgal commented on May 16, 2024

Worth to mention, a Macro posted by Chris Rackauckas on twitter:

macro def(name, definition)
  return quote
      macro $(esc(name))()
          esc($(Expr(:quote, definition)))
      end
  end
end

@def myfields
   x::Int
   y::Int
end

struct A
  @myfields
  z::Int
end

With this macro, anyone can compile-time paste code around.

from unroot.jl.

Related Issues (20)

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.