Skip to content
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

Recovering event pointer when using restRoot file.root #452

Closed
jgalan opened this issue Jun 20, 2023 · 3 comments
Closed

Recovering event pointer when using restRoot file.root #452

jgalan opened this issue Jun 20, 2023 · 3 comments
Assignees

Comments

@jgalan
Copy link
Member

jgalan commented Jun 20, 2023

Before #441 we could access the event pointer stored inside the ROOT file. I.e. TRestGeant4Event, TRestRawSignalEvent, ... depending on which event was available.

Now we recover a pointer to the event tree.

Could we recover back the old behaviour? For me it was interesting to have ready access to the event as ev0.

Also, why not use the pointer instance name as md_mdName? instead of metadata0["restG4 run"] which we get right now?

I also think the 0 could disappear now from instance names.

Screenshot 2023-06-20 at 18 23 38
@juanangp
Copy link
Member

Could we recover back the old behaviour? For me it was interesting to have ready access to the event as ev0.

Now the input TRestEvent is accessible via ev

Also, why not use the pointer instance name as md_mdName? instead of metadata0["restG4 run"] which we get right now?

Now we have a map of TRestMetadata pointers, that's why we have the metadata["metaName"], it is not possible to define a variable with a particular name pattern. This was done previously with gROOT->ProcessLine(...); that I think we should try to avoid.

I also think the 0 could disappear now from instance names.

Done

@jgalan
Copy link
Member Author

jgalan commented Jul 3, 2023

However, the interpreter seems to do not like it. See issue #450

@juanangp
Copy link
Member

juanangp commented Jul 3, 2023

However, the interpreter seems to do not like it. See issue #450

Weel, it is not possible to attach an std::map<std::string, TRestMetadata*> as TRestMetadata* so the root interpreter gets confused. I have added a solution on #453 by using gROOT->ProcessLine. Please close the other issue...

@juanangp juanangp closed this as completed Jul 5, 2023
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

No branches or pull requests

2 participants