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

[91X] SiPixelAli PCL payload creation thresholds from db - CondFormats #18087

Merged
merged 8 commits into from Mar 30, 2017

Conversation

mmusich
Copy link
Contributor

@mmusich mmusich commented Mar 27, 2017

Greetings,
this Pull Request is the first step in making the payload creation thresholds of the Pixel Alignment workflow in Prompt Calibration Loop configurable from Database via Global Tag.
In this PR a new CondFormat is added to store the thresholds in a generic container class. The condition format has been designed:

  • allowing full granularity (i.e. possibility to specify each single threshold for each single degree of freedom)
  • allowing flexibility in the list of alignable detectors (might want to add / remove structures in future)
  • keeping in mind possible extensions to more than the current 6 spatial degrees of freedom that are aligned (sensor surfaces, pixel/strip calibration parameters, etc. etc.)

For a full presentation about the concept see this presentation
Once this is merged a second PR will follow, including changes in the consumer code in the Alignment package.

Attention: @ghellwig, @mschrode, @meng-xiao

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @mmusich (Marco Musich) for master.

It involves the following packages:

CondCore/PCLConfigPlugins
CondCore/Utilities
CondFormats/DataRecord
CondFormats/PCLConfig

The following packages do not have a category, yet:

CondCore/PCLConfigPlugins
CondFormats/PCLConfig
Please create a PR for https://github.com/cms-sw/cms-bot/blob/master/categories.py to assign category

@ghellwig, @arunhep, @cerminar, @cmsbuild, @franzoni, @ggovi, @mmusich, @davidlange6 can you please review it and eventually sign? Thanks.
@ghellwig, @apfeiffer1, @tocheng this is something you requested to watch as well.
@Muzaffar, @davidlange6, @smuzaffar you are the release manager for this.

cms-bot commands are listed here #13028

@arunhep
Copy link
Contributor

arunhep commented Mar 27, 2017

please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Mar 27, 2017

The tests are being triggered in jenkins.
https://cmssdt.cern.ch/jenkins/job/ib-any-integration/18720/console Started: 2017/03/27 11:51

Copy link

@ghellwig ghellwig left a comment

Choose a reason for hiding this comment

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

From my side, I'm fine with the PR after the requested changes are made.

@@ -0,0 +1,58 @@
#ifndef _AlignPCLThresholds_h_
#define _AlignPCLThresholds_h_

Choose a reason for hiding this comment

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

@mmusich I think this include guard should read CondFormats_PCLConfig_interface_AlignPCLThresholds_h or similar

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@ghellwig OK, picky but probably safer.
Is it recommended in the coding rules? I see it's rather common practice troughout the CondFormats package to define guards with the name of the class alone.

Choose a reason for hiding this comment

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

I don't know if it is written down somewhere explicitely, but it reduces the risk of clashes within whole CMSSW

#include <string>
#include <vector>

using namespace std;

Choose a reason for hiding this comment

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

@mmusich no using namespace statements in header files

AlignPCLThresholds(){}
virtual ~AlignPCLThresholds(){}

void setAlignPCLThreshold(string AlignableId, const AlignPCLThreshold &Threshold);

Choose a reason for hiding this comment

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

please pass AlignableId as const std::string&
the same applies in the other methods


namespace edmtest
{
class AlignPCLThresholdsReader : public edm::EDAnalyzer

Choose a reason for hiding this comment

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

please make it an edm::one::EDAnalyzer

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't think we'll ever need to have this run MT, but OK

Choose a reason for hiding this comment

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

true, but since it's a new class we should use the current standard


private:
bool printdebug_;
std::string formatedOutput_;

Choose a reason for hiding this comment

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

I believe these could be both const as is in general good practice for configuration parameters


// ----------member data ---------------------------
std::string m_record;
unsigned int m_minNrecords;

Choose a reason for hiding this comment

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

could be both const

m_parameters(iConfig.getParameter<std::vector<edm::ParameterSet> >("thresholds"))
{
//now do what ever initialization is needed
usesResource("TFileService");

Choose a reason for hiding this comment

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

can you change that to usesResource(TFileService::kSharedResource);
it's technically the same, of course


// loop on the PSet and insert the conditions

std::vector<std::string> mandatories = {"X","Y","Z","thetaX","thetaY","thetaZ"};

Choose a reason for hiding this comment

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

this could become a std::array

Copy link
Contributor Author

Choose a reason for hiding this comment

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

any reason about preferring arrays instead of vectors?
I can reserve the size upfront, but I still prefer to handle vectors over arrays

Choose a reason for hiding this comment

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

this was meant as a suggestion to emphasize the rigid nature of this list
but if it is not meant to be rigid, a vector is certainly best

@mmusich
Copy link
Contributor Author

mmusich commented Mar 27, 2017

Hi @ghellwig, OK - I think I'll take all suggestions once tests are done, just to make sure there is no other issue.

@cmsbuild
Copy link
Contributor

@cmsbuild
Copy link
Contributor

Comparison job queued.

@davidlange6
Copy link
Contributor

davidlange6 commented Mar 27, 2017 via email

@cmsbuild
Copy link
Contributor

@ghellwig
Copy link

@davidlange6, @mmusich,
I think the new packages should be assigned to db, right?
Who should take care of the corresponding PR to cms-bot?

@cmsbuild
Copy link
Contributor

Pull request #18087 was updated. @ghellwig, @arunhep, @cerminar, @cmsbuild, @franzoni, @ggovi, @mmusich, @davidlange6 can you please check and sign again.

@ghellwig
Copy link

please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Mar 29, 2017

The tests are being triggered in jenkins.
https://cmssdt.cern.ch/jenkins/job/ib-any-integration/18772/console Started: 2017/03/29 10:36

@cmsbuild
Copy link
Contributor

@cmsbuild
Copy link
Contributor

Comparison job queued.

@cmsbuild
Copy link
Contributor

@mmusich
Copy link
Contributor Author

mmusich commented Mar 29, 2017

@ghellwig, @arunhep, @franzoni, @ggovi
Is there anything else I can do to get the PR signed again?
By the way, we'll need this merged in pre2 (due in two days according to https://twiki.cern.ch/twiki/bin/view/CMS/CMSSW_9_1_0) in order to propagate the new payload in Global Tag and change the consumer code.

@ghellwig
Copy link

+1

@ggovi
Copy link
Contributor

ggovi commented Mar 30, 2017

+1

@cmsbuild
Copy link
Contributor

This pull request is fully signed and it will be integrated in one of the next master IBs (tests are also fine). This pull request requires discussion in the ORP meeting before it's merged. @Muzaffar, @davidlange6, @smuzaffar

@davidlange6 davidlange6 merged commit 504c5ff into cms-sw:master Mar 30, 2017
@smuzaffar
Copy link
Contributor

@davidlange6 @mmusich , looks like this PR broke IBs https://cmssdt.cern.ch/SDT/cgi-bin/buildlogs/slc6_amd64_gcc530/CMSSW_9_1_X_2017-03-30-2300/CondFormats/PCLConfig
I shall check why the PR tests did not catch this.

@mmusich
Copy link
Contributor Author

mmusich commented Mar 31, 2017

@smuzaffar might it be because of this: #18117 merged at the same time? Looks like AlignPCLThresholdsReader needs to have a proper include #include "FWCore/Framework/interface/one/EDAnalyzer.h" . I am testing it now.

@davidlange6
Copy link
Contributor

davidlange6 commented Mar 31, 2017 via email

@mmusich
Copy link
Contributor Author

mmusich commented Mar 31, 2017

@davidlange6 I am preparing the branch; will PR it in a few minutes.

@mmusich
Copy link
Contributor Author

mmusich commented Mar 31, 2017

#18137 should address the issue. Sorry for that.

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

Successfully merging this pull request may close these issues.

None yet

7 participants