Skip to content

Commit 1dd8ec9

Browse files
committed
CSV documentation and work
1 parent 68f9132 commit 1dd8ec9

15 files changed

+110
-269
lines changed

csv_convert/open_multiple_example.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import pandas as pd
22
import glob
33

4-
def concat_csvs_with_unique_events(pattern):
4+
def concat_csvs_with_unique_events(files):
55
"""Load and concatenate CSV files with globally unique event IDs"""
6-
files = sorted(glob.glob(pattern))
6+
77
dfs = []
88
offset = 0
99

@@ -16,8 +16,8 @@ def concat_csvs_with_unique_events(pattern):
1616
return pd.concat(dfs, ignore_index=True)
1717

1818
# Usage
19-
lambda_df = concat_csvs_with_unique_events("mcpart_lambda*.csv")
20-
dis_df = concat_csvs_with_unique_events("dis_parameters*.csv")
19+
lambda_df = concat_csvs_with_unique_events(sorted(glob.glob("mcpart_lambda*.csv")))
20+
dis_df = concat_csvs_with_unique_events(sorted(glob.glob("dis_parameters*.csv")))
2121

2222
# Join them
2323
joined = lambda_df.merge(dis_df, on='evt', how='inner')

docs/tutorials/cpp01_edm4eic.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ If you want to build the tutorials outside of eic-shell, the dependencies are:
6060
## Running as a ROOT macro
6161

6262
```bash
63-
root -x -l -b -q 'cpp01_read_edm4eic.cxx("events.edm4eic.root",100)'
63+
root -x -l -b -q 'cpp_01_read_edm4eic.cxx("events.edm4eic.root",100)'
6464
```
6565

6666
To make such scripts on your own the important parts are:

pyproject.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,6 @@ name = "meson-structure"
33
version = "0.1.0"
44
description = "Add your description here"
55
requires-python = ">=3.13"
6-
dependencies = []
6+
dependencies = [
7+
"notebook>=7.4.3",
8+
]
-15.7 KB
Binary file not shown.

tutorials/01_plots/momentum_z.png

-23.4 KB
Binary file not shown.
-25.6 KB
Binary file not shown.

tutorials/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ find_package(nlohmann_json)
2222
# -----------------------------------------------------------------------------#
2323
# Build executable #
2424
# -----------------------------------------------------------------------------#
25-
add_executable(cpp01_read_edm4eic cpp01_read_edm4eic.cxx)
25+
add_executable(cpp_01_read_edm4eic cpp_01_read_edm4eic.cxx)
2626

27-
target_link_libraries(cpp01_read_edm4eic
27+
target_link_libraries(cpp_01_read_edm4eic
2828
PRIVATE
2929
ROOT::Core ROOT::RIO ROOT::Tree ROOT::Hist ROOT::Gpad
3030
podio::podio podio::podioRootIO podio::podioDict

tutorials/csv_mcpart_lambda.cxx

Lines changed: 0 additions & 261 deletions
This file was deleted.

0 commit comments

Comments
 (0)