Skip to content

fix: C++ SQLite fails for CLAS12 RCDB, since it lacks table files_have_runs#123

Open
c-dilks wants to merge 1 commit intoJeffersonLab:mainfrom
c-dilks:fix-sqlite-cpp
Open

fix: C++ SQLite fails for CLAS12 RCDB, since it lacks table files_have_runs#123
c-dilks wants to merge 1 commit intoJeffersonLab:mainfrom
c-dilks:fix-sqlite-cpp

Conversation

@c-dilks
Copy link
Member

@c-dilks c-dilks commented Nov 21, 2025

fixes #122

@c-dilks
Copy link
Member Author

c-dilks commented Nov 21, 2025

This fix optionally creates the corresponding queries, only if that
table exists; methods which use those queries will throw a runtime error
if the table does not exist.

@DraTeots
Copy link
Collaborator

Hello! Sorry, I completely missed this PR in the first place. I am now also confused:

  1. 'files_has_runs' appears in RCDB earlier than 2015 (probably earlier, but they were changed at least in 2015). Does it mean that CLAS12 DB was not updated since then?

  2. The main branch works with rcdb2 or v2 tables, there are couple of other tables added. C++ readout API can work with previous DB and doesn't check the version, that is why it works at all. But the rest of RCDB v2 (e.g. main branch) should not work then.

@c-dilks
Copy link
Member Author

c-dilks commented Feb 25, 2026

No worries!

If I recall correctly, our RCDB SQLite files lack the files_has_runs table, which is why I ran into the runtime error reported in #122. I'm not familiar with the history here, but I suppose CLAS12's RCDB and CCDB are using v1 still.

@baltzell inform me that this year of 2026 may be a good time for transitioning CLAS12 to use v2 (since PRAD/X17 is running rather than CLAS).

Also, we have been maintaining forks of RCDB and CCDB, but I'm not sure how different those are from the main JeffersonLab forks here on GitHub. At least some of our pull requests to our CLAS12 forks were opened here too, this PR being one example.

@DraTeots
Copy link
Collaborator

@baltzell We did it for other halls now, so it now should be pretty straightforward workflow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

C++ SQLite fails for CLAS12 RCDB, since it lacks table files_have_runs

2 participants