@@ -27,83 +27,49 @@ you can use the following code:
27
27
28
28
Raw Uproot Example
29
29
------------------
30
- This example uses the raw uproot query type to extract the `el_pt_NOSYS ` branch from the `reco ` tree
31
- in ` user.mtost:user.mtost.singletop.p6026.Jun13 ` Dataset.
30
+ This example uses the raw uproot query type to extract the `AnalysisElectronsAuxDyn.pt ` branch from the `CollectionTree ` tree
31
+ in ATLAS PHYSLITE OpenData Dataset.
32
32
33
33
.. tabs ::
34
34
35
- .. tab :: *yaml *
35
+ .. tab :: *YAML *
36
36
37
- .. literalinclude :: ../examples/config_Uproot_UprootRaw .yaml
37
+ .. literalinclude :: ../examples/config_UprootRaw .yaml
38
38
:language: yaml
39
39
40
- .. tab :: *dict *
40
+ .. tab :: *Python Dict *
41
41
42
- .. literalinclude :: ../examples/Uproot_UprootRaw_Dict.py
42
+ .. literalinclude :: ../examples/UprootRaw_Dict.py
43
+ :language: python
44
+
45
+ .. tab :: *Python Typed Object*
46
+
47
+ .. literalinclude :: ../examples/UprootRaw_Typed.py
43
48
:language: python
44
49
45
50
46
51
Python Function Example
47
52
-----------------------
48
- This example uses an uproot python function to extract the `el_pt_NOSYS ` branch from the `reco ` tree
49
- in ` user.mtost:user.mtost.singletop.p6026.Jun13 ` Dataset. Note that you can specify a python function
53
+ This example uses an uproot python function to extract the `AnalysisElectronsAuxDyn.pt ` branch from the `CollectionTree ` tree
54
+ in ATLAS PHYSLITE OpenData Dataset. Note that you can specify a python function
50
55
even in a yaml file.
51
56
52
57
.. tabs ::
53
58
54
- .. tab :: *yaml *
59
+ .. tab :: *YAML *
55
60
56
- .. literalinclude :: ../examples/config_Uproot_PythonFunction .yaml
61
+ .. literalinclude :: ../examples/config_PythonFunction .yaml
57
62
:language: yaml
58
63
59
- .. tab :: *dict *
64
+ .. tab :: *Python Dict *
60
65
61
- .. literalinclude :: ../examples/Uproot_PythonFunction_Dict .py
66
+ .. literalinclude :: ../examples/PythonFunction_Dict .py
62
67
:language: python
63
68
69
+ .. tab :: *Python Typed Object*
64
70
65
- Simple Func_ADL Example
66
- -----------------------
67
- This simple example reads a single root file form the CERN Opendata repo
68
-
69
- .. code :: python
70
-
71
- from servicex_client.dataset_identifier import FileListDataset
72
- from servicex_client.models import ResultFormat
73
- from servicex_client.servicex_client import ServiceXClient
74
-
75
- sx = ServiceXClient(backend = " localhost" )
76
- dataset_id = FileListDataset(" root://eospublic.cern.ch//eos/opendata/atlas/OutreachDatasets/2020-01-22/4lep/MC/mc_345060.ggH125_ZZ4lep.4lep.root" ) # NOQA 501
77
-
78
- ds = sx.func_adl_dataset(dataset_id, codegen = " uproot" ,
79
- title = " Root" ,
80
- result_format = ResultFormat.parquet)
81
-
82
- sx3 = ds.Select(lambda e : {' lep_pt' : e[' lep_pt' ]}). \
83
- Where(lambda e : e[' lep_pt' ] > 1000 ). \
84
- as_pandas()
85
- print (sx3)
86
-
87
- Func_ADL Example With Rucio Dataset
88
- -----------------------------------
89
- This example uses the Rucio Dataset Identifier and returns a list of downloaded
90
- parquet files
91
-
92
- .. code :: python
93
-
94
- from servicex_client.dataset_identifier import RucioDatasetIdentifier
95
- from servicex_client.models import ResultFormat
96
- from servicex_client.servicex_client import ServiceXClient
97
-
98
- sx = ServiceXClient(backend = " testing4" )
99
-
100
- dataset_id = RucioDatasetIdentifier(" user.kchoi:user.kchoi.fcnc_tHq_ML.ttH.v8" )
101
-
102
- ds = sx.func_adl_dataset(dataset_id)
71
+ .. literalinclude :: ../examples/PythonFunction_Typed.py
72
+ :language: python
103
73
104
- sx2 = ds.Select(lambda e : {' el_pt' : e[' el_pt' ]})\
105
- .set_result_format(ResultFormat.parquet)\
106
- .as_files()
107
74
108
- print (sx2)
109
75
0 commit comments