Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[root6] Add include statements to StarDb macros #439

Open
wants to merge 18 commits into
base: main
Choose a base branch
from

Conversation

klendathu2k
Copy link
Contributor

ROOT6/cling needs to have include files for the table classes used in these macros.

This PR consists of one single change... to many files: Adding the lines

#ifdef __CLING__
#  include "tables/TABLECLASSHEADER.h"
#endif

at the top of each macro. We only make this change for ROOT6/cling, as ROOT5/cint is
happy with the status-quo. (And ROOT5 does not like the added includes.)

This change has been tested for a single nightly test job (job 10).

klendathu2k and others added 12 commits March 11, 2022 12:29
Before submitting PR#315 some code cleanup was performed (see note below).
The fast jet directory was moved from  StarGenerator/FastJetFilt   to
StarGenerator/FILT/FastJetFilt, to conform with the standard source tree
layout for filters.

4f27034
625bbdd

Conscript-standard directory rules allow one to specify include paths
based on the module (StarGenerator) and package.  The package is one
directory beneath the module...  before code cleanup this was the
FastJetFilter directory.  After cleanup, we have to apply the fast jet
include path to all filters in the StarGenerator/FILT directory.

----

Note on the pp 200 HF filtered jet production.  The production commenced with
fast jet filter code built before code cleanup, based on the original
location of the fast jet filter in the source tree.
when we use the table classes in these macros.

Include statemets are wrapped in an ifdef __CLING__ statement
-- includes are problematic for ROOT5/cint... possibly because of
   the default search paths that are configured, but...
-- ROOT5/cint can live without the includes b/c it is interpreted
   and has the class info via the dictionaries
StarDb/Calibrations/tpc/tpcBXT0CorrEPD.C Outdated Show resolved Hide resolved
StarDb/Calibrations/tpc/tpcAltroParams.y2021.C Outdated Show resolved Hide resolved
StarDb/Calibrations/tpc/itpcDeadFEE.C Outdated Show resolved Hide resolved
StarDb/Calibrations/tpc/TpcLengthCorrectionMDF.C Outdated Show resolved Hide resolved
StarDb/Calibrations/tpc/TpcPadCorrectionMDF.C Outdated Show resolved Hide resolved
StarDb/Calibrations/tpc/TpcResponseSimulator.y2021.C Outdated Show resolved Hide resolved
StarDb/Calibrations/tpc/TpcSecRowB.C Outdated Show resolved Hide resolved
StarDb/Calibrations/tpc/TpcdZdY.C Outdated Show resolved Hide resolved
StarDb/Calibrations/tpc/TpcnTbk.C Outdated Show resolved Hide resolved
StarDb/Calibrations/tpc/tpcGridLeak.C Outdated Show resolved Hide resolved
@plexoos
Copy link
Member

plexoos commented Nov 12, 2022

This change has been tested for a single nightly test job (job 10).

Since you mention it, is it something that is not covered by the CI tests?

StarDb/Calibrations/tpc/TpcdXdY.C Outdated Show resolved Hide resolved
StarDb/Calibrations/tpc/itpcPadGainT0.y2020.C Outdated Show resolved Hide resolved
[skip ci]

Co-authored-by: Dmitry Kalinkin <[email protected]>
@veprbl
Copy link
Member

veprbl commented Nov 12, 2022

This change has been tested for a single nightly test job (job 10).

Since you mention it, is it something that is not covered by the CI tests?

The root6 ci on github ignores the failures. It was setup to track the progress for porting. I can't see how this PR alone can improve the current crashes.

@plexoos
Copy link
Member

plexoos commented Nov 12, 2022

The root6 ci on github ignores the failures. It was setup to track the progress for porting. I can't see how this PR alone can improve the current crashes.

I am very well aware of that. That's why I want Jason to clarify what he means by that statement. (I didn't even know that nightly tests had IDs one could use to refer to them)

@klendathu2k
Copy link
Contributor Author

This PR is necessary, but not sufficient, to make the nightly tests / CI tests run. It has been tested under root 5 to confirm that our code still works. For root 6, there are a couple of other changes that need to be made to the code to get to the point where this PR is necessary. These will be future PR's.

@plexoos
Copy link
Member

plexoos commented Nov 13, 2022

We only make this change for ROOT6/cling, as ROOT5/cint is
happy with the status-quo. (And ROOT5 does not like the added includes.)

I think ROOT5 cannot find the includes because the search paths are not set properly for the interpreter. Hopefully, #441 can solve this, and if it works for ROOT5 we can leave out the #ifdef __CLING__ statements.

@klendathu2k
Copy link
Contributor Author

We only make this change for ROOT6/cling, as ROOT5/cint is
happy with the status-quo. (And ROOT5 does not like the added includes.)

I think ROOT5 cannot find the includes because the search paths are not set properly for the interpreter. Hopefully, #441 can solve this, and if it works for ROOT5 we can leave out the #ifdef __CLING__ statements.

No objections if it works.

@plexoos
Copy link
Member

plexoos commented Nov 15, 2022

Doing a quick grep through the codes... I believe that the sce_ctrl.C, scf_ctrl.C, scm_ctrl.C and sls_ctrl.C files can be deprecated...

Just pushed test code... if this succeeds, perhaps we remove these files.

Yes, I confirm that the missing types supposed to be generated for those DB tables are not used anywhere in StRoot/
It should be safe to remove the files:

$ ls StarDb/svt/ssd/*_ctrl.C
StarDb/svt/ssd/sce_ctrl.C  StarDb/svt/ssd/scf_ctrl.C  StarDb/svt/ssd/scm_ctrl.C  StarDb/svt/ssd/sls_ctrl.C

Copy link
Member

@plexoos plexoos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is ready but first we need to merge #441

Copy link
Contributor

@genevb genevb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The modification wouldn't even be necessary if this content were in the actual database instead of .C files as instructed by the S&C team for many years (I guess we'll have to stop calling them "CINT files"). Otherwise no objection.

@klendathu2k
Copy link
Contributor Author

Search paths are causing a side effect that is doesn't let me run the nightly tests... but I can avoid loading the rootlogon and keep testing. I think we can merge.

@plexoos
Copy link
Member

plexoos commented Nov 16, 2022

Search paths are causing a side effect that is doesn't let me run the nightly tests... but I can avoid loading the rootlogon and keep testing.

It is something for the Production team to figure out preferably before we merge. I don't know how they set up .rootrc or rootlogon.C/rootlogoff.C macros on the farm. In the CI jobs we obviously use these the current revisions from StRoot/macros/

@genevb
Copy link
Contributor

genevb commented Nov 16, 2022 via email

@plexoos
Copy link
Member

plexoos commented Nov 16, 2022

The production environment is just like any other STAR user environment on the SDCC farm.

Of course not. You can't possibly know how users set up their environments.

If a different approach is being used for github CI tests, I don't see figuring that out as a Production Team responsibility.

So, what is the right approach? Could you elaborate and guide us through if you think this is some else's responsibility.

@genevb
Copy link
Contributor

genevb commented Nov 16, 2022 via email

@plexoos
Copy link
Member

plexoos commented Nov 16, 2022

Gene, you are leaving out a very important point. It is the production team who installs the STAR software on the farm. As far as I know nobody else can do it. So, for this change to work properly and to move us closer to ROOT6, the production team (as one of the users of the STAR software) needs to either use the StRoot/macros/rootlogon.C provided in the code tree or update their own accordingly. ROOT also provides a mechanism to pick a specific rootlogon/rootlogoff.C via .rootrc. Again, you can use the one in StRoot/macros or come up with your own or suggest changes to all of these files. These are the handles to run the code but if you have a better suggestion how to accommodate this change please let us know.

@genevb
Copy link
Contributor

genevb commented Nov 16, 2022 via email

@plexoos
Copy link
Member

plexoos commented Nov 16, 2022

Does that help?

I don't know. If you say it is safe to merge this we'll do it. I thought something did not work for Jason...

@genevb
Copy link
Contributor

genevb commented Nov 16, 2022 via email

@veprbl
Copy link
Member

veprbl commented Nov 16, 2022

If Jerome had left STAR, why we still can't just give someone else the permissions and assign the responsibility?

@klendathu2k
Copy link
Contributor Author

Sorry, I lost track of some of this discussion.

When the include paths are added via the root logon... root 6 complains when trying to autoload headers. So there is a conflict somewhere that i don't understand. And I infer from other parts of this discussion that it is environment dependent. So ... I would propose that the rootlogon change be a separate pull request, which we address after setting up an intial test library.

@plexoos
Copy link
Member

plexoos commented Nov 18, 2022

I would propose that the rootlogon change be a separate pull request

#441 ? It is already merged

I don't understand what problem you are experiencing. If you need help please provide a how to reproduce example.

@klendathu2k
Copy link
Contributor Author

I would propose that the rootlogon change be a separate pull request

#441 ? It is already merged

I don't understand what problem you are experiencing. If you need help please provide a how to reproduce example.

I guess the issue was unrelated to the include paths. Or my environment doesn't load in the rootlogon. I am assuming that this PR #439 is still to be merged? Or is the belief that #441 will resolve the problem with StarDb?

@plexoos
Copy link
Member

plexoos commented Nov 18, 2022

#441 is needed to get rid of #ifdef __CLING__ statements which is the current state of this PR branch. The CI tests pass and it is absolutely fine with me to merge this PR into main ASAP.

However, Jason your own comments above indicated that there might be a problem with using this on the farm. I warned the production team that they may have a similar problem. That is it. If the production team does not want to test or double check this before it goes into main, it is their choice. As I noted above, I don't even understand what the problem is or if there is a problem :)

@klendathu2k
Copy link
Contributor Author

Well... the CLING guard was in place just to isolate this change to root 6...

Let's move forward on everything else but this PR. I can then test to see if the issue I was seeing when I tried the new root logon was real or pilot error. And then move forward from there.

@plexoos
Copy link
Member

plexoos commented Nov 18, 2022

the __CLING__ guard was in place just to isolate this change to root 6...

Yes, and as you can see from the CI tests it works perfectly for ROOT5 too. We don't want to create branches in our code unnecessarily

plexoos added a commit to plexoos/star-sw that referenced this pull request Nov 28, 2022
plexoos added a commit to plexoos/star-sw that referenced this pull request Dec 10, 2022
@plexoos plexoos changed the title [root6] Add include statments to StarDb macros [root6] Add include statements to StarDb macros Dec 20, 2022
plexoos added a commit to plexoos/star-sw that referenced this pull request Jan 3, 2023
plexoos added a commit to plexoos/star-sw that referenced this pull request Jan 30, 2023
Fix error: unknown type name 'St_DataSet' in ROOT6 tests

```
LoadTable: .L /star-sw/StarDb/tpc/tsspars/tsspar.y2019.C
In file included from input_line_851:1:
/star-sw/StarDb/tpc/tsspars/tsspar.y2019.C:3:1: error: unknown type name 'St_DataSet'
St_DataSet *CreateTable() {
^
/star-sw/StarDb/tpc/tsspars/tsspar.y2019.C:57:10: error: use of undeclared identifier 'St_DataSet'
 return (St_DataSet *)tableSet;
         ^
/star-sw/StarDb/tpc/tsspars/tsspar.y2019.C:57:22: error: expected expression
 return (St_DataSet *)tableSet;
                     ^
root4star: .sl79_gcc485/OBJ/StRoot/St_db_Maker/St_db_Maker.cxx:932: virtual TDataSet* St_db_Maker::LoadTable(TDataSet*): Assertion `!ee' failed.
sh: line 1:   133 Aborted                 (core dumped) MALLOC_CHECK_=3 root4star -b -q -l 'bfc.C(50, "pp2022,StiCA,BEmcChkStat,ftt,-picowrite,-hitfilt,-evout", "/star/rcf/test/daq/2022/040/23040001/st_fwd_23040001_raw_0000003.daq")'
Error: Process completed with exit code 134.
```
plexoos added a commit to plexoos/star-sw that referenced this pull request Jan 31, 2023
Similar to star-bnl#439 we add includes to newly added macros
@plexoos plexoos requested a review from fisyak as a code owner March 29, 2023 20:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ROOT6 Issues and changes related to transition from ROOT5 to ROOT6
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants