main() shows how to use load_pueoEvent_Dataset()load_pueoEvent_Dataset(), start here!.
More...
Go to the source code of this file.
|
| ROOT.pueo.Dataset | load_pueoEvent_Dataset (Path pueo_mc_data, int run_number) |
| | Loads the "dual output" dataset whose interface is defined in pueoEvent repository.
|
main() shows how to use load_pueoEvent_Dataset()load_pueoEvent_Dataset(), start here!.
- The script will first load the library libpueoEvent.so in $PUEO_UTIL_INSTALL_DIR as soon as you import it, even if you don't call the function load_pueoEvent_Dataset()load_pueoEvent_Dataset()
, since the loading is done at the global scope.
- Note
- no need to set LD_LIBRARY_PATH
- As the script tries to load the library, it could error out if the library cannot be found, or if $PUEO_UTIL_INSTALL_DIR is not set
- The checks are done via asserts, which attempt to provide more meaningful error messages. You can turn them off by running instead of which turns on optimzation.
- P.S. initialise.py with an "s" because I like to be annoying.
Definition in file initialise.py.
◆ load_pueoEvent_Dataset()
| ROOT.pueo.Dataset load_pueoEvent_Dataset |
( |
Path | pueo_mc_data, |
|
|
int | run_number ) |
Loads the "dual output" dataset whose interface is defined in pueoEvent repository.
- Parameters
-
| [in] | pueo_mc_data | The directorydirectory that contains all the run<run_number>/ subdirectories. |
| [in] | run_number | Must be discoverable inside pueo_mc_data, else an assertion will cause the function to error out. |
- Return values
-
| dataset | An instance of the class Dataset |
- Note
- The "dual output" parallels the "main output" of simulatePueo, namely the IceFinal files IceFinal_<run_number>_allTree.root.
- The dual ouput files mimic the real PUEO data format.
- ie. they are the SimulatedPueo*File<run_number>.root that live alongside the IceFinal file in the run<run_number>/ directory.
- It might help to check out the examples in the pueoEvent repository.
- Details:
- Technically, as intended by pueoEvent, PUEO_MC_DATA should be an environment variable.
- However, pueo_mc_data is a Path in this function.
- It is first used to verify whether run<run_number>/SimulatedPueoEventFile<run_number>.root exists.
- Then it is used to define a temporary environment variable within the python process, which will not persist beyond the program.
- In short, by using this script you are not actually using, nor affecting, the environment variable PUEO_MC_DATA which you might have defined in your .bashrc.
Definition at line 42 of file initialise.py.