{"id":26694460,"url":"https://github.com/deeplearnphysics/dlpgenerator","last_synced_at":"2025-09-19T19:12:38.470Z","repository":{"id":116515101,"uuid":"377971815","full_name":"DeepLearnPhysics/DLPGenerator","owner":"DeepLearnPhysics","description":null,"archived":false,"fork":false,"pushed_at":"2024-05-23T02:02:11.000Z","size":2848,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-26T18:39:53.733Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DeepLearnPhysics.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-06-17T22:10:26.000Z","updated_at":"2024-05-23T02:02:14.000Z","dependencies_parsed_at":null,"dependency_job_id":"342a16e8-3e67-471e-a214-b4ea800eaee8","html_url":"https://github.com/DeepLearnPhysics/DLPGenerator","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/DeepLearnPhysics/DLPGenerator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DeepLearnPhysics%2FDLPGenerator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DeepLearnPhysics%2FDLPGenerator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DeepLearnPhysics%2FDLPGenerator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DeepLearnPhysics%2FDLPGenerator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DeepLearnPhysics","download_url":"https://codeload.github.com/DeepLearnPhysics/DLPGenerator/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DeepLearnPhysics%2FDLPGenerator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275989414,"owners_count":25565646,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-19T02:00:09.700Z","response_time":108,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-03-26T18:29:35.918Z","updated_at":"2025-09-19T19:12:38.427Z","avatar_url":"https://github.com/DeepLearnPhysics.png","language":"C++","readme":"# LiteFMWK\n\n`LiteFMWK` is a software development base that allows you to:\n* Generate a software _package_ where you can generate arbitrary number of C++ class/function and compile into 1 library\n* Automatically generate ROOT cling dictionary to access compiled class/function from cling/python interpreters (latter via PyROOT)\n* Support a structure for introducing inter-package dependencies\n\n## How to use it?\nJust try:\n```\nsource setup.sh\n```\nThis sets up necessary shell env. variables. \nYou need to have `ROOT6` (if not, you get an error message from `setup.sh`).\nThere's a support to detect `numpy` and provide a few handy compiler directives as well.\n\n## How to make a new _package_?\nJust try:\n```\ngen_my_package Aho\n```\n... which will generate a directory named `Aho` under the repository top directory.\nA new package comes with `GNUmakefile` which allows you to compile a package by simply typing `make` in the package directory.\nYou also find `sample.h` and `sample.cxx`. \nThese are very much empty C++ classes just to demonstrate that you can `make` and access them from an interpreter.\n```\npython -c \"import ROOT;print ROOT.Aho.sample()\"\n```\n\n## Generating a new class\nIn a package directory you can generate a new class. You can of course just type-it-up from scratch.\nYou can also try:\n```\ngen_my_class Tako\n```\n... which generates `Tako.h` and `Tako.cxx` much like `sample` class.  Again, to compile, you can just type  `make`.\n\nIf you have written your class from scratch, make sure you add your class to `LinkDef.h` if you want a dictionary generation (e.g. if you want an access from an interpreter).\n\n## Example?\nYou can find an example in this branch:\n```\ngit checkout example\n```\n\n## Compiling multiple packages\nNo one wants to `cd` package directory and `make` for every package. You can utilize the top level `GNUmakefile` which is extremely simple and hopefully self-descriptive. All you need to do is to list (space-separated) packages in `SUBDIRS` variable.\n\n## Excluding a class from dictionary generation\nSometimes you don't want to expose your C++ class to an interpreter.\nAssuming your C++ class is already registered in the dictionary (a mechanism to make your class available in an interpreter), simply exclude it from `LinkDef.h`.\n\nIf you wonder when you want to do it, here's some example reasons:\n* Compilation is so slow (auto-generated dictionary source code is usually _really_ long, like easily 10,000 lines, taking long time to compile)\n* Ugh I keep getting dictionary compilation error (auto-generation of dictionary source code is far from being perfect, especially for the latest C++ standards... if troublesome, exclude)\n\n## Making inter-package dependencies\nTo make one package depend on another, you typically want to know 2 information: headers to be included and libraries to be linked against.\nHere are two pieces of information you may find it useful/handy:\n*  Package libraries are compiled and available under `$MYSW_LIBDIR/libLiteFMWK_$(PACKAGE_NAME).so`\n*  Package header files are copied and available under `$MYSW_INCDIR/litefmwk/$(PACKAGE_NAME)`\n... where you substitute `$(PACKAGE_NAME)` with the actual name string.\n\nWith these info, you know what you need to do for your new package compilation that depends on those.\n\n1. Add compiler flags\n  * `-I$(MYSW_INCDIR)`\n  * `-L$(MYSW_LIBDIR) -lLiteFMWK_$(PACKAGE_NAME).so`\n  \n2. Include statements in the source codes\n  * `#include \"litefmwk/$(PACKAGE_NAME)/$(WANTED_HEADER)\"`\n  * ... where `$(WANTED_HEADER)` is the header file you want (like `sample.h`).\n \n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeeplearnphysics%2Fdlpgenerator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeeplearnphysics%2Fdlpgenerator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeeplearnphysics%2Fdlpgenerator/lists"}