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
HCAL LUT generation and validation #19864
Conversation
A new Pull Request was created by @akhukhun for master. It involves the following packages: CalibCalorimetry/CaloTPG @ghellwig, @arunhep, @cerminar, @cmsbuild, @rekovic, @franzoni, @ggovi, @davidlange6, @mulhearn, @lpernie can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
@akhukhun |
const HcalLutMetadata *metadata = conditions->getHcalLutMetadata(); | ||
const HcalTopology *topo = metadata->topo(); | ||
|
||
std::auto_ptr<HcalL1TriggerObjects> HcalL1TrigObjCol(new HcalL1TriggerObjects); |
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.
auto_ptr is depricated in C++11. Please use unique_ptr
@@ -70,6 +70,7 @@ void CaloTPGTranscoderULUT::loadHCALCompress(HcalLutMetadata const& lutMetadata, | |||
bool isHBHE = (abs(ieta) < theTrigTowerGeometry.firstHFTower(version)); | |||
|
|||
unsigned int lutsize = getOutputLUTSize(id); | |||
outputLUT_[index].resize(lutsize); | |||
|
|||
for (unsigned int i = 0; i < threshold; ++i) |
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 use range-based loop.
@@ -267,6 +268,8 @@ void HcaluLUTTPGCoder::update(const HcalDbService& conditions) { | |||
float gain = 0; | |||
uint32_t status = 0; | |||
|
|||
QIEType_[lutId]=conditions.getHcalQIEType(cell)->getValue(); | |||
|
|||
if (LUTGenerationMode_){ | |||
const HcalCalibrations& calibrations = conditions.getHcalCalibrations(cell); | |||
for (int capId = 0; capId < 4; ++capId){ |
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.
use range-based loop
upgradeQIE11LUT_ ; | ||
return lut.at(lutId); | ||
} | ||
|
||
void HcaluLUTTPGCoder::lookupMSB(const HBHEDataFrame& df, std::vector<bool>& msb) const{ | ||
msb.resize(df.size()); | ||
for (int i=0; i<df.size(); ++i) |
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.
use range-based loop.
int nzero[7]; | ||
int nreal[7]; | ||
int extra[7]; | ||
for(int i=0; i<7; ++i) { |
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.
use range-based loop
} | ||
bool zero=true; | ||
const std::vector<unsigned int>& lut2 = xml2->second; | ||
for(size_t i=0; i<lut2.size(); ++i){ |
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.
use range-based loop
else nreal[subdet]++; | ||
} | ||
cout << Form("%3s: %8s %8s %8s %8s", "Det", "total", "nonzeros", "zeroes", "extra") << endl; | ||
for(int i=1; i<6; ++i) cout << Form("%3s: %8d %8d %8d %8d", DET[i], ntota[i], nreal[i], nzero[i], extra[i]) << endl; |
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.
use range-based loop
cout << Form("%3s: %8s %8s %8s %8s", "Det", "total", "nonzeros", "zeroes", "extra") << endl; | ||
for(int i=1; i<6; ++i) cout << Form("%3s: %8d %8d %8d %8d", DET[i], ntota[i], nreal[i], nzero[i], extra[i]) << endl; | ||
cout << "--------------------------------------------" << endl; | ||
for(int i=0; i<7; ++i) { |
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.
use range-based loop
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.
and everywhere else in this file.
@@ -1550,6 +1643,11 @@ int HcalLutManager::createLutXmlFiles_HBEFFromCoder_HOFromAscii_ZDC( std::string | |||
// | |||
const std::map<int, boost::shared_ptr<LutXml> > _comp_lut_xml = getCompressionLutXmlFromCoder( _transcoder, _tag, split_by_crate ); | |||
addLutMap( xml, _comp_lut_xml ); | |||
|
|||
for(int masktype=0; masktype<3; ++masktype){ |
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.
use range-based loop
float gain = 0.0; | ||
float ped = 0.0; | ||
|
||
for (int i=0; i<4; ++i) { |
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.
use range-based loop
please test |
The tests are being triggered in jenkins. |
-1 Tested at: 959c308 The following merge commits were also included on top of IB + this PR after doing git cms-merge-topic: You can see the results of the tests here: I found follow errors while testing this PR Failed tests: ClangBuild
I found a compilation error while trying to compile with clang: Entering library rule at src/CalibCalorimetry/CaloTPG/plugins Entering library rule at CaloOnlineTools/HcalOnlineDb >> Compiling edm plugin /build/cmsbld/jenkins-workarea/workspace/ib-any-integration/CMSSW_9_3_X_2017-07-25-1100/src/CalibCalorimetry/CaloTPG/plugins/CaloTPGTranscoderULUTs.cc >> Compiling /build/cmsbld/jenkins-workarea/workspace/ib-any-integration/CMSSW_9_3_X_2017-07-25-1100/src/CaloOnlineTools/HcalOnlineDb/src/ZdcLut.cc In file included from /build/cmsbld/jenkins-workarea/workspace/ib-any-integration/CMSSW_9_3_X_2017-07-25-1100/src/CalibCalorimetry/HcalTPGAlgos/src/LutXml.cc:20: /build/cmsbld/jenkins-workarea/workspace/ib-any-integration/CMSSW_9_3_X_2017-07-25-1100/src/CalibCalorimetry/HcalTPGAlgos/interface/LutXml.h:86:99: error: 'auto' not allowed in function prototype XERCES_CPP_NAMESPACE::DOMElement * addData( std::string _elements, std::string _encoding, const auto& _lut ); ^~~~ /build/cmsbld/jenkins-workarea/workspace/ib-any-integration/CMSSW_9_3_X_2017-07-25-1100/src/CalibCalorimetry/HcalTPGAlgos/src/LutXml.cc:157:83: error: 'auto' not allowed in function prototype DOMElement * LutXml::addData( std::string _elements, std::string _encoding, const auto& _lut ) ^~~~ The following merge commits were also included on top of IB + this PR after doing git cms-merge-topic: |
Comparison job queued. |
Comparison is ready Comparison Summary:
|
please test |
The tests are being triggered in jenkins. |
+1 The following merge commits were also included on top of IB + this PR after doing git cms-merge-topic: |
Comparison job queued. |
Comparison is ready Comparison Summary:
|
+1 |
+1 |
+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 will be automatically merged. |
The PR includes
The changes will not affect TP emulation.