Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • C cmsgemos
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 96
    • Issues 96
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 16
    • Merge requests 16
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • cmsgemonline
  • gem-daq
  • cmsgemos
  • Merge requests
  • !246

Basic configuration database support in C++

  • Review changes

  • Download
  • Email patches
  • Plain diff
Open Louis Moureaux requested to merge feature/configuration-cpp into main Mar 18, 2022
  • Overview 15
  • Commits 3
  • Pipelines 3
  • Changes 4

Description

This is the C++ side of !223 (merged), !224 (merged), and !225 (merged). I'm planning to keep all management logic in Python, with C++ doing simple queries.

In addition to the database, the configuration can be constructed from a layout tree and configuration files. The naming convention looks like fed-1468/backend_board-7/link-5/vfat-13.cfg; missing files are simply ignored and the configuration will contain no data for the corresponding components.

Related Issue

I see #121 is still open, let's use it for everything.

How Has This Been Tested?

So far:

auto conn = pqxx::connection("dbname=lmoureau user=*** password=***");
auto tx = pqxx::work(conn);
auto c = configuration(tx, 95);
std::cout << c.display_name() << std::endl;

c = configuration(tx, "cool");
std::cout << c.display_name() << std::endl;

c = configuration(tx, "cool", 3);
std::cout << c.display_name() << std::endl;

I also checked that the amount of data fetched from the database makes sense.

For the file-based constructor I checked the file names but didn't try to load any data.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
Edited Mar 24, 2022 by Louis Moureaux
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: feature/configuration-cpp