Skip to content

$file.readBuffer to read the data from disk #343

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: dev
Choose a base branch
from

Conversation

Krmjn09
Copy link
Collaborator

@Krmjn09 Krmjn09 commented Jun 26, 2025

Screenshot 2025-06-26 191056
first 10 double values from data page

@Krmjn09 Krmjn09 requested review from linev and silverweed June 26, 2025 13:53
@silverweed
Copy link
Contributor

Very good, these numbers look correct!
Please be sure to mark all the temporary code as such with comments and fix the eslint warnings.

The next step after this would be to get the column type and page uncompressed size from the schema you deserialized in the header. In this case you should find that the column type is 7 (kReal64).


let file = await openFile('https://jsroot.gsi.de/files/tmp/ntpl001_staff.root');
let file = await openFile('./simple.root');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you using local simple.root file - please add it to PR, otherwise tests will fail

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In fact, why did they not fail in the CI? Are the rntuple tests not run?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The tests in rntuple_test file are kind of like a checker for the fields and columns if they did not match for ntupl_staff001 it will answer like expected the first field as category but got doubles

Copy link
Collaborator Author

@Krmjn09 Krmjn09 Jun 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So the tests are running in my terminal but gives failure instead of Ok

Copy link
Collaborator Author

@Krmjn09 Krmjn09 Jun 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's passing all checks even if the simple.root is not in GitHub because I haven't still added rntuple_test.js in jsroot ci.yml file yet

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will do that as soon as possible

@Krmjn09 Krmjn09 requested a review from linev June 26, 2025 14:33
@@ -546,6 +557,30 @@ async function readHeaderFooter(tuple) {

tuple.builder.deserializePageList(unzipped_blob);
return true;

// Read the first page data
// const firstPage = tuple.builder?.pageLocations?.[0]?.[0]?.pages?.[0];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you comment out all the new code and changed back the rntuple file?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Like i don't know how can I add the root file in GitHub once I get to know that I will uncomment the code

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you can just git add the root file in the demo directory (is that ok @linev)?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added that one file forcefully correctly

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image
still failing the checks ! Cant understand the problem

@Krmjn09 Krmjn09 requested a review from silverweed June 27, 2025 09:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants