NSLS-II / metadatastore

DEPRECATED: Incorporated into https://github.com/NSLS-II/databroker
Other
2 stars 11 forks source link

What is the best way to get an event given an event uid? #261

Closed CJ-Wright closed 7 years ago

CJ-Wright commented 7 years ago

What is the best way to get an event given an event uid? Methods exist to do the same for starts, stops, and descriptors but not events.

ghost commented 7 years ago

https://github.com/NSLS-II/metadatastore/blob/a72733f1e942cb04578a07855d1b092ec066437c/metadatastore/examples/sample_data/multisource_event.py#L63

In the API: https://github.com/NSLS-II/metadatastore/blob/65cc5775c5d0bf71b88f3b28907c248e722a703e/metadatastore/mds.py#L491

CJ-Wright commented 7 years ago

Thank you!

tacaswell commented 7 years ago

Why do you want to get an event by event uid?

ghost commented 7 years ago

@tacaswell you beat me to it

CJ-Wright commented 7 years ago

Because when I insert a new event and want to pass the information held in that new event I only get an event_uid back

CJ-Wright commented 7 years ago

It will be helpful for chaining callbacks together.

tacaswell commented 7 years ago

You also have the event if you just inserted it.

CJ-Wright commented 7 years ago

Is it the exact same formatting and such? My understanding was that insert_event just gave back the uid. I have the dict but the dict doesn't have all the info in it (eg the filled key)

tacaswell commented 7 years ago

filled is optional, you pass everything else in and you get back the uid. If you are constructing the events (and have the descriptor) you should also know which keys are filled or not.