Go Back to: C++ Manual General Site
LDMX.Conditions package¶
Submodules¶
LDMX.Conditions.SimpleCSVTableProvider module¶
SimpleCSVTableProvider
Specialization of ConditionsObjectProvider for simple tables indexed by detid
- class LDMX.Conditions.SimpleCSVTableProvider.SimpleCSVTableEntry(url: str, first_run: int = -1, last_run: int = -1, run_type: str = 'any', values: list[float | int] = <factory>)¶
Bases:
objectOne entry in the providing table
This defines an “entry” in the table provider corresponding to a certain Interval Of Validity (IOV). The entry can be be valid between two run number, over all time, only for MC, only for Data, or for both. The entry is retrieved from a URL location.
- Parameters:
url (str) – URL to download the table entry from
first_run (int) – first run number (inclusive) the entry is valid for
last_run (int) – last run number (inclusive) the entry is valid for
run_type (str) – data (real), mc (simulation), or any (both)
values (list[float|int]) – values for each of the columns hardcoded instead of read from a file
- first_run: int = -1¶
- last_run: int = -1¶
- run_type: str = 'any'¶
- url: str¶
- values: list[float | int]¶
- class LDMX.Conditions.SimpleCSVTableProvider.SimpleCSVTableProvider(obj_name: str, data_type: str, columns: list[str], conditions_base_url: str = '', entries_url: str = '', entries: list[~LDMX.Conditions.SimpleCSVTableProvider.SimpleCSVTableEntry] = <factory>, tag_name: str = '')¶
Bases:
ConditionsObjectProviderProvides a uniform table of a specific type
Parametrs¶
- obj_namestr
Name of object that this provider provides (e.g. EcalGains)
- data_typestr
Name of type of data stored in this table (e.g. “int” or “double”)
- columnslist of str
List of column names for this table
- conditions_base_urlstr
Base location for URLs, filling the LDMX_CONDITION_BASEURL parameter inside any table’s URL
- entries_urlstr
URL to a CSV table mapping tables to specific intervals of validity. Optional.
- class_name: str = 'conditions::SimpleCSVTableProvider'¶
- columns: list[str]¶
- conditions_base_url: str = ''¶
- data_type: str¶
- entries: list[SimpleCSVTableEntry]¶
- entries_url: str = ''¶
- module_name: str = 'Conditions'¶
- obj_name: str¶
- object_name: str = 'UNDEFINED'¶
- tag_name: str = ''¶
- valid_for_all_rows(values)¶
Define a value to use for all rows instead of downloading the table from a URL
- Parameters:
values (list) – A value for each column to use for all rows
- valid_for_runs(url, first_run, last_run)¶
Add an entry to this provider that is valid between the input run numbers
- Parameters:
url (str) – Location to download the table from
first_run (int) – First run number that this entry is valid for
last_run (int) – Last run number that this entry is valid for
- valid_forever(url)¶
Add an entry to this provider that is valid forever and for all run types (data or MC)
- Parameters:
url (str) – Location to download the table from
- LDMX.Conditions.SimpleCSVTableProvider.simple_csv_double_table_provider(obj_name, columns)¶
Factory for a SimpleCSVTableProvider for tables of doubles
- LDMX.Conditions.SimpleCSVTableProvider.simple_csv_integer_table_provider(obj_name, columns)¶
Factory for a SimpleCSVTableProvider for tables of integers