Skip to content

Add compatibility with new GRP scheme#976

Merged
jgrosseo merged 4 commits into
AliceO2Group:masterfrom
njacazio:nj-newmag
Jul 26, 2022
Merged

Add compatibility with new GRP scheme#976
jgrosseo merged 4 commits into
AliceO2Group:masterfrom
njacazio:nj-newmag

Conversation

@njacazio

Copy link
Copy Markdown
Collaborator

@njacazio njacazio requested review from a team, alibuild, iarsene, jgrosseo and ktf as code owners July 12, 2022 10:11
@alibuild

Copy link
Copy Markdown
Collaborator

Error while checking build/O2Physics/o2 for cb8739e at 2022-07-12 12:56:

## sw/BUILD/O2Physics-latest/log
/sw/SOURCES/O2Physics/976-slc7_x86-64/0/Common/TableProducer/trackPropagation.cxx:115:161: error: 'timestamp' was not declared in this scope
ninja: build stopped: subcommand failed.

Full log here.

njacazio added 2 commits July 12, 2022 14:06
- This is nasty because it was hiding in the LOGF(info, ..) function
@njacazio

Copy link
Copy Markdown
Collaborator Author

Hi @ddobrigk could you have a look please? I think that the approvers might be on leave, how should we merge this?

@mfaggin

mfaggin commented Jul 18, 2022

Copy link
Copy Markdown
Collaborator

@jgrosseo @iarsene @ktf are there news about this PR? This looks fundamental to work with on AO2Ds with LHC22e. Thank you.

if (!grpmag) {
LOG(fatal) << "Got nullptr from CCDB for path " << grpmagPath << " of object GRPMagField and " << grpPath << " of object GRPObject for timestamp " << bc.timestamp();
}
LOGF(info, "Setting magnetic field to current %d A for run %d from its GRPMagField CCDB object", grpmag->getL3Current(), bc.runNumber());

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I would use the "detail" level for log by default, unless you really care about having the message during real production.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I agree, however this is the same level of info that was present before, this is also important information that should be printed once per run i.e. once per job ideally

@ktf

ktf commented Jul 18, 2022

Copy link
Copy Markdown
Member

This looks good on my side.

Configurable<std::string> grpPath{"grpPath", "GLO/GRP/GRP", "Path of the grp file"};
Configurable<std::string> grpmagPath{"grpmagPath", "GLO/Config/GRPMagField", "CCDB path of the GRPMagField object"};
Configurable<std::string> mVtxPath{"mVtxPath", "GLO/Calib/MeanVertex", "Path of the mean vertex file"};
Configurable<bool> checkGRPObject{"checkGRPObject", false, "Flag to check the CCDB for GRPObject before asking for the GRPMagField"};

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

actually, why not simply making it empty by default and use it if not?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Because I want to have the feature that the CCDB will not be checked and will get directly the new structure.
This is because the old GRP structure will be translated to the new one

@njacazio njacazio left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Thanks @ktf for the suggestions, however, I would not change the code. Can we merge it as it is now? This is a blocker for other projects

Configurable<std::string> grpPath{"grpPath", "GLO/GRP/GRP", "Path of the grp file"};
Configurable<std::string> grpmagPath{"grpmagPath", "GLO/Config/GRPMagField", "CCDB path of the GRPMagField object"};
Configurable<std::string> mVtxPath{"mVtxPath", "GLO/Calib/MeanVertex", "Path of the mean vertex file"};
Configurable<bool> checkGRPObject{"checkGRPObject", false, "Flag to check the CCDB for GRPObject before asking for the GRPMagField"};

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Because I want to have the feature that the CCDB will not be checked and will get directly the new structure.
This is because the old GRP structure will be translated to the new one

if (!grpmag) {
LOG(fatal) << "Got nullptr from CCDB for path " << grpmagPath << " of object GRPMagField and " << grpPath << " of object GRPObject for timestamp " << bc.timestamp();
}
LOGF(info, "Setting magnetic field to current %d A for run %d from its GRPMagField CCDB object", grpmag->getL3Current(), bc.runNumber());

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I agree, however this is the same level of info that was present before, this is also important information that should be printed once per run i.e. once per job ideally

@mfaggin

mfaggin commented Jul 25, 2022

Copy link
Copy Markdown
Collaborator

Thanks @ktf for the suggestions, however, I would not change the code. Can we merge it as it is now? This is a blocker for other projects

thanks @njacazio , do you think we can proceed @ktf ?

@mfaggin

mfaggin commented Jul 26, 2022

Copy link
Copy Markdown
Collaborator

Thanks @ktf for the suggestions, however, I would not change the code. Can we merge it as it is now? This is a blocker for other projects

thanks @njacazio , do you think we can proceed @ktf ?

A gentle reminder

@njacazio

Copy link
Copy Markdown
Collaborator Author

@jgrosseo @iarsene if you're back could you please check/approve?

@jgrosseo jgrosseo merged commit bd48994 into AliceO2Group:master Jul 26, 2022
@jgrosseo

Copy link
Copy Markdown
Contributor

When will the old scheme be deprecated?

@njacazio njacazio deleted the nj-newmag branch July 26, 2022 12:41
@njacazio

Copy link
Copy Markdown
Collaborator Author

I think it might be already, I have to check with Victor

@mfaggin

mfaggin commented Jul 26, 2022

Copy link
Copy Markdown
Collaborator

When will the old scheme be deprecated?

@victor-gonzalez can confirm, but if I am not wrong this is already deprecated, apart for Run 2 converted data

@victor-gonzalez

Copy link
Copy Markdown
Collaborator

For Run 2 converted datasets the old scheme will stay
For Run 3 it seems the new schema has been populated with OCT Pilot beam and with the simulations
JUN Pilot beam and Run 3 datasets are only under the new schema

@jgrosseo

Copy link
Copy Markdown
Contributor

Then I think the config parameter should be renamed to choose run 2 or 3...

@njacazio

Copy link
Copy Markdown
Collaborator Author

agreed

lbariogl pushed a commit to CF-tutorials/O2Physics that referenced this pull request Jul 28, 2022
@ktf ktf self-requested a review August 3, 2022 07:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

6 participants