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
[91X] SiPixelAli PCL payload creation thresholds from db - CondFormats #18087
Conversation
A new Pull Request was created by @mmusich (Marco Musich) for master. It involves the following packages: CondCore/PCLConfigPlugins The following packages do not have a category, yet: CondCore/PCLConfigPlugins @ghellwig, @arunhep, @cerminar, @cmsbuild, @franzoni, @ggovi, @mmusich, @davidlange6 can you please review it and eventually sign? Thanks. cms-bot commands are listed here #13028 |
please test |
The tests are being triggered in jenkins. |
There was a problem hiding this 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_ |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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_; |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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"); |
There was a problem hiding this comment.
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"}; |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
Hi @ghellwig, OK - I think I'll take all suggestions once tests are done, just to make sure there is no other issue. |
Comparison job queued. |
It is indeed part of the CMSSW coding rules (not that its always enforced, but recently we are trying)
… On Mar 27, 2017, at 2:07 PM, Gregor Mittag ***@***.***> wrote:
@ghellwig commented on this pull request.
In CondFormats/PCLConfig/interface/AlignPCLThresholds.h:
> @@ -0,0 +1,58 @@
+#ifndef _AlignPCLThresholds_h_
+#define _AlignPCLThresholds_h_
I don't know if it is written down somewhere explicitely, but it reduces the risk of clashes within whole CMSSW
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
@davidlange6, @mmusich, |
please test |
The tests are being triggered in jenkins. |
Comparison job queued. |
@ghellwig, @arunhep, @franzoni, @ggovi |
+1 |
+1 |
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 @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 |
@smuzaffar might it be because of this: #18117 merged at the same time? Looks like AlignPCLThresholdsReader needs to have a proper include |
as just discussed with @smuzaffar and @dr15johns, this is from a header cleanup in fwk. @mmusich just needs to include the headers used by this code and will be ok.
… On Mar 31, 2017, at 9:01 AM, Malik Shahzad Muzaffar ***@***.***> wrote:
@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.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
@davidlange6 I am preparing the branch; will PR it in a few minutes. |
#18137 should address the issue. Sorry for that. |
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: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