You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is a common situation when one has a collection of values (E.g. after parsing a file), for this case there is a handy function that allows to add many conditions values at one time.
**(!) performance:**```add_conditions``` tries to use as less transactions as possible to check and commit all values. So for it provides a big performance gain vs calling ```add_condition``` for each value separately
*[get_trigger_params.cpp](https://github.com/JeffersonLab/rcdb/blob/main/cpp/examples/get_trigger_params.cpp) - Versatile data readout example. It includes:
154
+
*[simple.cpp](https://github.com/JeffersonLab/rcdb/blob/main/cpp/examples/simple.cpp) - Simple condition readout. Note: this example has no CMake target and is not built by `cmake --build build`; compile it manually with `gcc` as shown in the Installation section.
155
+
*[get_trigger_params.cpp](https://github.com/JeffersonLab/rcdb/blob/main/cpp/examples/get_trigger_params.cpp)(target `examples_trigger_params`) - Versatile data readout example. It includes:
155
156
* Reading conditions
156
157
* Working with JSON serialized objects
157
158
* Getting RCDB stored files contents
158
159
* Working with config file parser
159
-
*[write_conditions.cpp](https://github.com/JeffersonLab/rcdb/blob/main/cpp/examples/write_conditions.cpp) - Writing conditions to RCDB from C++. It includes:
*[write_conditions.cpp](https://github.com/JeffersonLab/rcdb/blob/main/cpp/examples/write_conditions.cpp) (target `examples_write_conditions`) - Writing conditions to RCDB from C++. It includes:
162
+
* Using WritingConnection
161
163
* Adding condition values of different types
164
+
*[write_array_to_json.cpp](https://github.com/JeffersonLab/rcdb/blob/main/cpp/examples/write_array_to_json.cpp) (target `examples_write_array_to_json`) - Writing an array serialized to JSON
165
+
*[write_objects_to_json.cpp](https://github.com/JeffersonLab/rcdb/blob/main/cpp/examples/write_objects_to_json.cpp) (target `examples_write_objects_to_json`) - Writing objects serialized to JSON
Copy file name to clipboardExpand all lines: docs/Creating-condition-types.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,8 +4,8 @@ Lets look ''create_condition_type'' from the example above (we add parameter nam
4
4
5
5
```python
6
6
db.create_condition_type(name="my_val",
7
-
value_type,
8
-
description)
7
+
value_type=value_type,
8
+
description=description)
9
9
```
10
10
11
11
**name** - The first parameter is condition name. When we say "event_count for run 100", "event_count" is that name.
@@ -36,4 +36,4 @@ Names are just strings. RCDB doesn't provide special treatment of slashes '/' or
36
36
More examples of how to use types are presented in the next section
37
37
38
38
39
-
**description** - 255 chars max human readable description, that other users can see. It is optional but it is very good practice to fill it.
39
+
**description** - 255 chars max human readable description, that other users can see. It is a required argument, and it is very good practice to fill it with something meaningful.
0 commit comments