### Install Uproot with Pip Source: https://uproot.readthedocs.io/en/latest/index.html Install Uproot and the optional but recommended Awkward Array using pip. ```bash pip install uproot awkward ``` -------------------------------- ### Install Uproot with Conda Source: https://uproot.readthedocs.io/en/latest/index.html Install Uproot using conda, which automatically installs Awkward Array. ```bash conda install -c conda-forge uproot ``` -------------------------------- ### Cluster.start Source: https://uproot.readthedocs.io/en/latest/uproot.source.coalesce.Cluster.html Represents the start of the cluster. ```APIDOC ## Cluster.start ### Description Represents the start of the cluster. ### Method GET (Implicit) ### Endpoint (Not applicable, this is an attribute/property) ### Parameters None ``` -------------------------------- ### Install 'hist' package Source: https://uproot.readthedocs.io/en/latest/basic.html If the 'hist' package is not installed, use pip to install it. This is required for histogram conversion. ```bash pip install hist ``` -------------------------------- ### Initialize an RNTuple with data Source: https://uproot.readthedocs.io/en/latest/uproot.writing.writable.WritableDirectory.html RNTuples can be initialized with data by assigning a dictionary of arrays or a Pandas DataFrame to a key in the directory. This is the default behavior for non-empty RNTuples starting from v5.7.0. ```python my_directory["ntuple"] = {"field1": np.array(...), "field2": ak.Array(...)} ``` -------------------------------- ### Model_TStreamerInfo.cursor Source: https://uproot.readthedocs.io/en/latest/uproot.streamers.Model_TStreamerInfo.html Gets the cursor pointing to the start of this instance in the byte stream. ```APIDOC ## Model_TStreamerInfo.cursor Model_TStreamerInfo.cursor ### Description A cursor pointing to the start of this instance in the byte stream (before read_numbytes_version). ### Response - **cursor** (object) - The cursor object. ``` -------------------------------- ### Iterate over (name, classname) pairs in a WritableDirectory Source: https://uproot.readthedocs.io/en/latest/uproot.writing.writable.WritableDirectory.html Use `iterclassnames` to get an iterator over (name, classname) pairs. This method does not read file data and supports recursion, cycle number inclusion, and filtering. ```python WritableDirectory.iterclassnames(_*_ , _recursive=True_ , _cycle=True_ , _filter_name= _, _filter_classname= _) ``` -------------------------------- ### Set File Compression on Creation Source: https://uproot.readthedocs.io/en/latest/basic.html Shows how to specify a compression algorithm for an entire file when it is first created using `uproot.recreate`. The compression setting can be inspected and modified later. ```python >>> file = uproot.recreate("example.root", compression=uproot.ZLIB(4)) >>> file.compression ZLIB(4) ``` -------------------------------- ### HTTPResource.future Source: https://uproot.readthedocs.io/en/latest/uproot.source.http.HTTPResource.html Creates a ResourceFuture that calls get with specified start and stop positions. ```APIDOC ## future ### Description Returns a uproot.source.futures.ResourceFuture that calls get with `start` and `stop`. ### Parameters - **source** (uproot.HTTPSource or uproot.MultithreadedHTTPSource) - The data source. - **start** (int) - Seek position of the first byte to include. - **stop** (int) - Seek position of the first byte to exclude (one greater than the last byte to include). ### Returns - uproot.source.futures.ResourceFuture - A future that calls get with `start` and `stop`. ``` -------------------------------- ### Iterate over objects in a WritableDirectory Source: https://uproot.readthedocs.io/en/latest/uproot.writing.writable.WritableDirectory.html Use `itervalues` to get an iterator over objects in the directory. It can recursively search subdirectories and filter by name or classname. ```python WritableDirectory.itervalues(_*_ , _recursive=True_ , _filter_name= _, _filter_classname= _) ``` -------------------------------- ### Iterate over (name, object) pairs in a WritableDirectory Source: https://uproot.readthedocs.io/en/latest/uproot.writing.writable.WritableDirectory.html Use `iteritems` to get an iterator over (name, object) pairs. This method supports recursive searching, cycle number inclusion, and filtering by name or classname. ```python WritableDirectory.iteritems(_*_ , _recursive=True_ , _cycle=True_ , _filter_name= _, _filter_classname= _) ``` -------------------------------- ### Opening Local, HTTP, and XRootD Files Source: https://uproot.readthedocs.io/en/latest/uproot3-to-4.html Demonstrates the basic usage of `uproot.open` for different file sources in Uproot 4. ```python >>> import uproot >>> local_file = uproot.open("local/file.root") >>> http_file = uproot.open("https://server.net/file.root") >>> xrootd_file = uproot.open("root://server.net/file.root") ``` -------------------------------- ### get Method Source: https://uproot.readthedocs.io/en/latest/uproot.source.xrootd.XRootDResource.html Retrieves a byte buffer from the resource between specified start and stop positions. ```APIDOC ## get Method ### Description Retrieves a byte buffer from the resource between specified start and stop positions. ### Parameters * **start** (_int_) - Seek position of the first byte to include. * **stop** (_int_) - Seek position of the first byte to exclude (one greater than the last byte to include). ### Returns A Python buffer of data between `start` and `stop`. ``` -------------------------------- ### Model_TDatime.cursor Source: https://uproot.readthedocs.io/en/latest/uproot.models.TDatime.Model_TDatime.html Gets a cursor pointing to the start of this instance in the byte stream. Inherited from uproot.Model. ```APIDOC ## Model_TDatime.cursor ### Description A cursor pointing to the start of this instance in the byte stream (before read_numbytes_version). ### Method Inherited from uproot.Model. ``` -------------------------------- ### HTTPSource with Basic Authentication Source: https://uproot.readthedocs.io/en/latest/uproot.source.http.basic_auth_headers.html Demonstrates how to use the `HTTPSource` with basic authentication by providing a username and password, which are then encoded and sent in the `Authorization` header. ```APIDOC ## HTTPSource with Basic Authentication ### Description This example shows how to configure `HTTPSource` to access resources that require basic HTTP authentication. The username and password are provided, and uproot automatically formats them into the `Authorization: Basic ` header. ### Method `uproot.HTTPSource(url, username=None, password=None, ...)` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```python import uproot url = "http://example.com/protected/data.root" username = "myuser" password = "mypassword" # When username and password are provided, uproot automatically adds the Basic Auth header with open(url, username=username, password=password) as file: # Access the file content pass ``` ### Response #### Success Response (200) - **file_content** (bytes) - The content of the file accessed via HTTP. #### Response Example (Binary data representing the file content) ``` -------------------------------- ### future Static Method Source: https://uproot.readthedocs.io/en/latest/uproot.source.xrootd.XRootDResource.html Creates a ResourceFuture that calls get with specified start and stop positions. ```APIDOC ## future Static Method ### Description Creates a ResourceFuture that calls get with specified start and stop positions. ### Parameters * **source** (uproot.MultithreadedXRootDSource) - The data source. * **start** (_int_) - Seek position of the first byte to include. * **stop** (_int_) - Seek position of the first byte to exclude (one greater than the last byte to include). ### Returns A uproot.source.futures.ResourceFuture that calls get with `start` and `stop`. ``` -------------------------------- ### Specifying File Handlers and Options in Uproot 4 Source: https://uproot.readthedocs.io/en/latest/uproot3-to-4.html Shows how to explicitly pass file handler classes and free-standing options to `uproot.open` for local, HTTP, and XRootD sources. ```python >>> file = uproot.open("file.root", ... file_handler=uproot.MultithreadedFileSource, ... num_workers=10) >>> file = uproot.open("https://server.net/file.root", ... http_handler=uproot.MultithreadedHTTPSource, ... timeout=3.0) >>> file = uproot.open("root://server.net/file.root", ... xrootd_handler=uproot.MultithreadedXRootDSource, ... num_workers=5) ``` -------------------------------- ### XRootDResource Constructor Source: https://uproot.readthedocs.io/en/latest/uproot.source.xrootd.XRootDResource.html Initializes an XRootDResource for a given file path and optional timeout. ```APIDOC ## XRootDResource Constructor ### Description Initializes an XRootDResource for a given file path and optional timeout. ### Parameters * **file_path** (_str_) - A URL of the file to open. * **timeout** (_None_ or _float_) - An optional timeout in seconds. ``` -------------------------------- ### Accessing RField data as an array Source: https://uproot.readthedocs.io/en/latest/uproot.models.RNTuple.RField.html Retrieves the data of an RField as an array. This is useful for inspecting or processing individual fields from an RNTuple. The example shows how to get an RField object and then call its array() method. ```python >>> field = ntuple["my_field"] >>> array = field.array() >>> array ``` -------------------------------- ### Main Interface Functions Source: https://uproot.readthedocs.io/en/latest/uproot.source.chunk.notifier.html Core functions for opening, iterating, and manipulating ROOT files. ```APIDOC ## uproot.open ### Description Opens a ROOT file or directory for reading. ### Method (Not specified, typically a function call) ### Endpoint (Not applicable, this is an SDK function) ### Parameters (Parameters not specified in the source text) ### Request Example (Not applicable) ### Response (Response details not specified in the source text) ``` ```APIDOC ## uproot.iterate ### Description Iterates over data in a ROOT file, potentially in chunks. ### Method (Not specified, typically a function call) ### Endpoint (Not applicable, this is an SDK function) ### Parameters (Parameters not specified in the source text) ### Request Example (Not applicable) ### Response (Response details not specified in the source text) ``` ```APIDOC ## uproot.concatenate ### Description Concatenates data from multiple ROOT files or objects. ### Method (Not specified, typically a function call) ### Endpoint (Not applicable, this is an SDK function) ### Parameters (Parameters not specified in the source text) ### Request Example (Not applicable) ### Response (Response details not specified in the source text) ``` ```APIDOC ## uproot.dask ### Description Provides Dask integration for uproot operations. ### Method (Not specified, typically a function call) ### Endpoint (Not applicable, this is an SDK function) ### Parameters (Parameters not specified in the source text) ### Request Example (Not applicable) ### Response (Response details not specified in the source text) ``` ```APIDOC ## uproot.dask_write ### Description Enables writing data using Dask with uproot. ### Method (Not specified, typically a function call) ### Endpoint (Not applicable, this is an SDK function) ### Parameters (Parameters not specified in the source text) ### Request Example (Not applicable) ### Response (Response details not specified in the source text) ``` ```APIDOC ## uproot.create ### Description Creates a new ROOT file for writing. ### Method (Not specified, typically a function call) ### Endpoint (Not applicable, this is an SDK function) ### Parameters (Parameters not specified in the source text) ### Request Example (Not applicable) ### Response (Response details not specified in the source text) ``` ```APIDOC ## uproot.recreate ### Description Recreates an existing ROOT file, overwriting its content. ### Method (Not specified, typically a function call) ### Endpoint (Not applicable, this is an SDK function) ### Parameters (Parameters not specified in the source text) ### Request Example (Not applicable) ### Response (Response details not specified in the source text) ``` ```APIDOC ## uproot.update ### Description Updates an existing ROOT file with new data. ### Method (Not specified, typically a function call) ### Endpoint (Not applicable, this is an SDK function) ### Parameters (Parameters not specified in the source text) ### Request Example (Not applicable) ### Response (Response details not specified in the source text) ``` -------------------------------- ### submit Source: https://uproot.readthedocs.io/en/latest/uproot.source.futures.TrivialExecutor.html Immediately runs the given task synchronously with the provided arguments. ```APIDOC ## submit Inherited from uproot.source.futures.Executor. TrivialExecutor.submit(_task_, _/_ , _*args_, _**kwargs_) ### Description Immediately runs `task(*args)`. ### Method Synchronous execution ### Parameters - **_task_**: The task to be executed. - **_/ - **_*args**: Positional arguments for the task. - **_**kwargs**: Keyword arguments for the task. ``` -------------------------------- ### Navigating nested directories and accessing TTrees Source: https://uproot.readthedocs.io/en/latest/uproot3-to-4.html Demonstrates accessing nested directories and TTrees using string paths with slashes as separators, and accessing branches within a TTree. ```python >>> directory = uproot.open("https://scikit-hep.org/uproot3/examples/nesteddirs.root") >>> directory >>> directory.keys() ['one;1', 'one/two;1', 'one/two/tree;1', 'one/tree;1', 'three;1', 'three/tree;1'] >>> directory["one"] >>> directory["one"]["two"] >>> directory["one"]["two"]["tree"] >>> directory["one/two/tree"] >>> directory["three/tree/evt"] >>> directory["three/tree/evt/I32"] ``` -------------------------------- ### TBranchElement Example Output Source: https://uproot.readthedocs.io/en/latest/uproot.behaviors.TBranchElement.TBranchElement.html This is an example of the output format from the TBranchElement.show() method, illustrating branch names, their C++ typenames, and their uproot interpretations. ```text name | typename | interpretation ---------------------+----------------------+----------------------------------- event_number | int32_t | AsDtype('>i4') trigger_isomu24 | bool | AsDtype('bool') eventweight | float | AsDtype('>f4') MET | TVector2 | AsStridedObjects(Model_TVector2_v3 jetp4 | std::vector | AsJagged(AsDtype('>f4'), header_by jetid | std::vector | AsJagged(AsDtype('bool'), header_b ``` -------------------------------- ### Check Multipart GET Support Source: https://uproot.readthedocs.io/en/latest/uproot.source.http.HTTPResource.html A helper function to determine if the server supports multipart GET requests based on the provided ranges and HTTP response. ```python is_multipart_supported = uproot.source.http.HTTPResource.is_multipart_supported(ranges, response) ``` -------------------------------- ### Handle Multipart GET Request Source: https://uproot.readthedocs.io/en/latest/uproot.source.http.HTTPResource.html This static method attempts to perform an HTTP(S) multipart GET request to fetch multiple ranges efficiently. It fills a results dictionary with the fetched data. ```python uproot.source.http.HTTPResource.multifuture(source, range_header, ranges, futures, results) ``` -------------------------------- ### Create and Open a ROOT File for Writing Source: https://uproot.readthedocs.io/en/latest/basic.html Opens a ROOT file in write mode using uproot.recreate. The returned object is a WritableDirectory representing the root directory of the file. ```python >>> file = uproot.recreate("example.root") >>> file ``` -------------------------------- ### Handle missing Pandas library during array read Source: https://uproot.readthedocs.io/en/latest/basic.html Demonstrates the error message when attempting to read a TBranch as a Pandas Series without Pandas installed. It provides instructions on how to install the required package. ```python >>> events["M"].array(library="pd") Traceback (most recent call last): File "/home/jpivarski/irishep/uproot/uproot/extras.py", line 43, in pandas import pandas ModuleNotFoundError: No module named 'pandas' ImportError: install the 'pandas' package with: pip install pandas or conda install pandas ``` -------------------------------- ### Open ROOT File and List Class Names Source: https://uproot.readthedocs.io/en/latest/basic.html Opens a ROOT file from a URL and lists the class names of objects within it. This is useful for understanding the structure of the file. ```python >>> file = uproot.open("https://scikit-hep.org/uproot3/examples/hepdata-example.root") >>> file.classnames() {'hpx': 'TH1F', 'hpxpy': 'TH2F', 'hprof': 'TProfile', 'ntuple': 'TNtuple'} ``` -------------------------------- ### Open a ROOT file for reading Source: https://uproot.readthedocs.io/en/latest/basic.html Use `uproot.open` to access a ROOT file. For automatic file closing, use a `with` statement. ```python >>> import uproot >>> file = uproot.open("path/to/dataset.root") ``` ```python >>> with uproot.open("path/to/dataset.root") as file: ... do_something... ``` -------------------------------- ### entries_to_ranges_or_baskets Source: https://uproot.readthedocs.io/en/latest/uproot.models.TBranch.Model_TBranchElement_v8.html Converts entry start and stop points into either (start, stop) integer pairs for normal TBaskets or uproot.models.TBasket.Model_TBasket objects for embedded TBaskets. The list is updated in place as TBaskets are read. ```APIDOC ## entries_to_ranges_or_baskets(_entry_start_ , _entry_stop_) ### Description Returns a list of (start, stop) integer pairs for free (normal) `TBaskets` and uproot.models.TBasket.Model_TBasket objects for embedded `TBaskets`. The intention is for this list to be updated in place, replacing (start, stop) integer pairs with uproot.models.TBasket.Model_TBasket objects as they get read and interpreted. ### Parameters #### Path Parameters - **_entry_start_** (int) - The starting entry number. - **_entry_stop_** (int) - The stopping entry number. ``` -------------------------------- ### Model_TStreamerInfo.typename Source: https://uproot.readthedocs.io/en/latest/uproot.streamers.Model_TStreamerInfo.html Gets the typename/classname of the TStreamerInfo. ```APIDOC ## Model_TStreamerInfo.typename Model_TStreamerInfo.typename ### Description The typename/classname (`fName`) of this `TStreamerInfo`. ### Response - **typename** (string) - The typename/classname of the TStreamerInfo. ``` -------------------------------- ### read Source: https://uproot.readthedocs.io/en/latest/uproot.models.TH.Model_TH2S_v4.html Instantiates a model by reading data from a file chunk using a cursor and context. ```APIDOC ## read ### Description Creates a model instance by reading data from a file. ### Method `read(chunk, cursor, context, file, selffile, parent, concrete=None)` ### Parameters #### Path Parameters * **cls** (subclass of uproot.Model) – Class to instantiate. * **chunk** (uproot.source.chunk.Chunk) – Buffer of contiguous data from the file uproot.source.chunk.Source. * **cursor** (uproot.Cursor) – Current position in that `chunk`. * **context** (_dict_) – Auxiliary data used in deserialization. * **file** (uproot.ReadOnlyFile) – An open file object, capable of generating new uproot.Model classes from its streamers. * **selffile** (uproot.reading.CommonFileMethods) – A possibly uproot.reading.DetachedFile associated with this object. * **parent** (_None_ _or_ _calling object_) – The previous `read` in the recursive descent. * **concrete** (None or uproot.Model instance) – If None, this model corresponds to the concrete (instantiated) class in C++. Otherwise, this model represents a superclass part of the object, and `concrete` points to the concrete instance. ``` -------------------------------- ### Open ROOT File and Read Branches Source: https://uproot.readthedocs.io/en/latest/basic.html Opens a ROOT file and reads specified branches into an array. This is the initial step before computing expressions or applying cuts. ```python >>> events = uproot.open("https://scikit-hep.org/uproot3/examples/Zmumu.root:events") >>> events.arrays(["px1", "py1", "pz1"]) ``` -------------------------------- ### Model_TStreamerInfo.name Source: https://uproot.readthedocs.io/en/latest/uproot.streamers.Model_TStreamerInfo.html Gets the name of the TStreamerInfo. ```APIDOC ## Model_TStreamerInfo.name Model_TStreamerInfo.name ### Description The name (`fName`) of this `TStreamerInfo`, passed through uproot.model.classname_regularize. ### Response - **name** (string) - The name of the TStreamerInfo. ``` -------------------------------- ### Model_TH2I_v4.kind Source: https://uproot.readthedocs.io/en/latest/uproot.models.TH.Model_TH2I_v4.html Gets the kind of the histogram. ```APIDOC ## Model_TH2I_v4.kind ### Description Gets the kind of the histogram. ### Attribute `kind` ``` -------------------------------- ### AsDouble32 Constructor Source: https://uproot.readthedocs.io/en/latest/uproot.interpretation.numerical.AsDouble32.html Initializes an AsDouble32 interpretation object with specified bounds, number of bits, and target dimensions. ```APIDOC ## AsDouble32(low, high, num_bits, to_dims=()) ### Description Interpretation for ROOT’s `Double32_t` type. ### Parameters * **low** (float) – Lower bound on the range of expressible values. * **high** (float) – Upper bound on the range of expressible values. * **num_bits** (int) – Number of bits in the representation. * **to_dims** (tuple of ints) – Shape of to_dtype. ``` -------------------------------- ### Create a New ROOT File Source: https://uproot.readthedocs.io/en/latest/basic.html Use `uproot.recreate` to create a new ROOT file. This will overwrite any existing file with the same name. ```python >>> file = uproot.recreate("path/to/new-file.root") ``` -------------------------------- ### Model_TH2I_v4.title Source: https://uproot.readthedocs.io/en/latest/uproot.models.TH.Model_TH2I_v4.html Gets the title of the histogram. ```APIDOC ## Model_TH2I_v4.title ### Description The title of the histogram. ### Attribute `title` ``` -------------------------------- ### Model_TH2I_v4.name Source: https://uproot.readthedocs.io/en/latest/uproot.models.TH.Model_TH2I_v4.html Gets the name of the histogram. ```APIDOC ## Model_TH2I_v4.name ### Description The name of the histogram. ### Attribute `name` ``` -------------------------------- ### read Source: https://uproot.readthedocs.io/en/latest/uproot.models.TTree.Model_TTree_v16.html Creates a model instance by reading data from a file. ```APIDOC ## read _classmethod _Model_TTree_v16.read(_chunk_ , _cursor_ , _context_ , _file_ , _selffile_ , _parent_ , _concrete =None_) Parameters: * **cls** (subclass of uproot.Model) – Class to instantiate. * **chunk** (uproot.source.chunk.Chunk) – Buffer of contiguous data from the file uproot.source.chunk.Source. * **cursor** (uproot.Cursor) – Current position in that `chunk`. * **context** (_dict_) – Auxiliary data used in deserialization. * **file** (uproot.ReadOnlyFile) – An open file object, capable of generating new uproot.Model classes from its streamers. * **selffile** (uproot.reading.CommonFileMethods) – A possibly uproot.reading.DetachedFile associated with this object. * **parent** (_None_ _or_ _calling object_) – The previous `read` in the recursive descent. * **concrete** (None or uproot.Model instance) – If None, this model corresponds to the concrete (instantiated) class in C++. Otherwise, this model represents a superclass part of the object, and `concrete` points to the concrete instance. Creates a model instance by reading data from a file. ``` -------------------------------- ### Model_TH2F_v4.kind Source: https://uproot.readthedocs.io/en/latest/uproot.models.TH.Model_TH2F_v4.html Gets the kind of the histogram. ```APIDOC ## Model_TH2F_v4.kind ### Description Gets the kind of the histogram. ### Attribute `kind` ``` -------------------------------- ### Using `with` Statement for File Management Source: https://uproot.readthedocs.io/en/latest/uproot3-to-4.html Recommends and demonstrates the `with` statement for managing file resources, ensuring files are properly closed, especially when opening many files. ```python >>> with uproot.open("file.root") as file: ... do_something(file) ``` -------------------------------- ### read Source: https://uproot.readthedocs.io/en/latest/uproot.streamers.Model_TStreamerSTL.html Creates a model instance by reading data from a file chunk using a cursor and context, handling file and parent object references. ```APIDOC ## read _classmethod _Model_TStreamerSTL.read(_chunk_ , _cursor_ , _context_ , _file_ , _selffile_ , _parent_ , _concrete =None_) ### Parameters * **cls** (subclass of uproot.Model) – Class to instantiate. * **chunk** (uproot.source.chunk.Chunk) – Buffer of contiguous data from the file uproot.source.chunk.Source. * **cursor** (uproot.Cursor) – Current position in that `chunk`. * **context** (_dict_) – Auxiliary data used in deserialization. * **file** (uproot.ReadOnlyFile) – An open file object, capable of generating new uproot.Model classes from its streamers. * **selffile** (uproot.reading.CommonFileMethods) – A possibly uproot.reading.DetachedFile associated with this object. * **parent** (_None_ _or_ _calling object_) – The previous `read` in the recursive descent. * **concrete** (None or uproot.Model instance) – If None, this model corresponds to the concrete (instantiated) class in C++. Otherwise, this model represents a superclass part of the object, and `concrete` points to the concrete instance. ### Description Creates a model instance by reading data from a file. ``` -------------------------------- ### Model_TH2F_v4.title Source: https://uproot.readthedocs.io/en/latest/uproot.models.TH.Model_TH2F_v4.html Gets the title of the histogram. ```APIDOC ## Model_TH2F_v4.title ### Description The title of the histogram. ### Attribute `title` ``` -------------------------------- ### Model_TH2F_v4.name Source: https://uproot.readthedocs.io/en/latest/uproot.models.TH.Model_TH2F_v4.html Gets the name of the histogram. ```APIDOC ## Model_TH2F_v4.name ### Description The name of the histogram. ### Attribute `name` ``` -------------------------------- ### Instantiate HTTPResource Source: https://uproot.readthedocs.io/en/latest/uproot.source.http.HTTPResource.html Create an instance of HTTPResource to access a file via a URL. You can optionally specify a timeout. ```python resource = uproot.source.http.HTTPResource("http://example.com/file.dat", timeout=5.0) ``` -------------------------------- ### Model_TH1D_v3.kind Source: https://uproot.readthedocs.io/en/latest/uproot.models.TH.Model_TH1D_v3.html Gets the kind of the histogram. ```APIDOC ## Model_TH1D_v3.kind Model_TH1D_v3.kind ### Description Gets the kind of the histogram. ``` -------------------------------- ### uproot.writing.writable.create Source: https://uproot.readthedocs.io/en/latest/uproot.writing.writable.create.html Opens a local file for writing. Raises FileExistsError if the file already exists. Returns a uproot.WritableDirectory. ```APIDOC ## uproot.writing.writable.create ### Description Opens a local file for writing. Like ROOT’s `"CREATE"` option, this function raises an error (`FileExistsError`) if a file already exists at `file_path`. Returns a `uproot.WritableDirectory`. ### Parameters #### Path Parameters - **file_path** (str, `pathlib.Path` or file-like object) - Required - The filesystem path of the file to open or an open file. #### Options - **initial_directory_bytes** (int; default: 256) - **initial_streamers_bytes** (int; default: 1024) - **uuid_function** (callable; default: `uuid.uuid1`) - **compression** (uproot.compression.Compression or None; default: `uproot.ZLIB(1)`) - Compression algorithm and level for new objects added to the file. Can be updated after creating the uproot.WritableFile. Additional options are passed to as `storage_options` to the fsspec filesystem. ``` -------------------------------- ### Model_TAttFill_v2.read Source: https://uproot.readthedocs.io/en/latest/uproot.models.TAtt.Model_TAttFill_v2.html Instantiates a model by reading data from a file chunk using a cursor and context. ```APIDOC ## read ### Description Creates a model instance by reading data from a file. ### Method classmethod ### Parameters * **cls** (subclass of uproot.Model) – Class to instantiate. * **chunk** (uproot.source.chunk.Chunk) – Buffer of contiguous data from the file uproot.source.chunk.Source. * **cursor** (uproot.Cursor) – Current position in that `chunk`. * **context** (_dict_) – Auxiliary data used in deserialization. * **file** (uproot.ReadOnlyFile) – An open file object, capable of generating new uproot.Model classes from its streamers. * **selffile** (uproot.reading.CommonFileMethods) – A possibly uproot.reading.DetachedFile associated with this object. * **parent** (_None_ _or_ _calling object_) – The previous `read` in the recursive descent. * **concrete** (None or uproot.Model instance) – If None, this model corresponds to the concrete (instantiated) class in C++. Otherwise, this model represents a superclass part of the object, and `concrete` points to the concrete instance. ``` -------------------------------- ### Model_TH1D_v3.title Source: https://uproot.readthedocs.io/en/latest/uproot.models.TH.Model_TH1D_v3.html Gets the title of the histogram. ```APIDOC ## Model_TH1D_v3.title Model_TH1D_v3.title ### Description The title of the histogram. ``` -------------------------------- ### read() Source: https://uproot.readthedocs.io/en/latest/uproot.streamers.Model_TStreamerLoop.html Creates a model instance by reading data from a file. It takes several arguments related to the data source, cursor, context, and file object. ```APIDOC ## read(_chunk_ , _cursor_ , _context_ , _file_ , _selffile_ , _parent_ , _concrete =None_) Parameters: * **cls** (subclass of uproot.Model) – Class to instantiate. * **chunk** (uproot.source.chunk.Chunk) – Buffer of contiguous data from the file uproot.source.chunk.Source. * **cursor** (uproot.Cursor) – Current position in that `chunk`. * **context** (_dict_) – Auxiliary data used in deserialization. * **file** (uproot.ReadOnlyFile) – An open file object, capable of generating new uproot.Model classes from its streamers. * **selffile** (uproot.reading.CommonFileMethods) – A possibly uproot.reading.DetachedFile associated with this object. * **parent** (_None_ _or_ _calling object_) – The previous `read` in the recursive descent. * **concrete** (None or uproot.Model instance) – If None, this model corresponds to the concrete (instantiated) class in C++. Otherwise, this model represents a superclass part of the object, and `concrete` points to the concrete instance. Creates a model instance by reading data from a file. ``` -------------------------------- ### Model_TH1D_v3.name Source: https://uproot.readthedocs.io/en/latest/uproot.models.TH.Model_TH1D_v3.html Gets the name of the histogram. ```APIDOC ## Model_TH1D_v3.name Model_TH1D_v3.name ### Description The name of the histogram. ```