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

Fix || operator usage in conditional statements #19231

Merged
merged 1 commit into from
Jun 22, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ void PixelToLNKAssociateFromAscii::addConnections(
// fix for type-B modules in barrel
edm::LogInfo(" roc ")<<rocDetId<<" "<<rocLnkId<<" "<<name->isHalfModule()<<endl;
if (name->isHalfModule() && (rocDetIds.min()>7)
&& (part==PixelBarrelName::mO || PixelBarrelName::mI) ) {
&& (part==PixelBarrelName::mO || part==PixelBarrelName::mI) ) {
//cablingRocId.rocLinkId = 9-rocLnkId;
// rocDetId=8,...,15
edm::LogInfo(" special for half modules ");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -684,7 +684,7 @@ void SiStripGainFromCalibTree::algoBeginJob(const edm::EventSetup& iSetup)
for(unsigned int i=0;i<Det.size();i++){ //Make two loop such that the Pixel information is added at the end --> make transition simpler
DetId Detid = Det[i]->geographicalId();
int SubDet = Detid.subdetId();
if( SubDet == PixelSubdetector::PixelBarrel || PixelSubdetector::PixelEndcap ){
if( SubDet == PixelSubdetector::PixelBarrel || SubDet == PixelSubdetector::PixelEndcap ){
Copy link
Contributor

Choose a reason for hiding this comment

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

regarding this particular line of the fix, together with the other two similar occurrences in the other classes in the same package, this actually alters the behavior of the code but thanks to the protection few lines below: https://github.com/cms-sw/cmssw/pull/19231/files#diff-5b549e5390591af6a4ae6ece2166765bR689, there is no issue with previous versions of the calibrations.

auto DetUnit = dynamic_cast<const PixelGeomDetUnit*> (Det[i]);
if(!DetUnit) continue;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@ SiStripGainsPCLHarvester::checkBookAPVColls(const edm::EventSetup& es){
for(unsigned int i=0;i<Det.size();i++){ //Make two loop such that the Pixel information is added at the end --> make transition simpler
DetId Detid = Det[i]->geographicalId();
int SubDet = Detid.subdetId();
if( SubDet == PixelSubdetector::PixelBarrel || PixelSubdetector::PixelEndcap ){
if( SubDet == PixelSubdetector::PixelBarrel || SubDet == PixelSubdetector::PixelEndcap ){
auto DetUnit = dynamic_cast<const PixelGeomDetUnit*> (Det[i]);
if(!DetUnit) continue;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ SiStripGainsPCLWorker::checkBookAPVColls(const edm::EventSetup& es){
for(unsigned int i=0;i<Det.size();i++){ //Make two loop such that the Pixel information is added at the end --> make transition simpler
DetId Detid = Det[i]->geographicalId();
int SubDet = Detid.subdetId();
if( SubDet == PixelSubdetector::PixelBarrel || PixelSubdetector::PixelEndcap ){
if( SubDet == PixelSubdetector::PixelBarrel || SubDet == PixelSubdetector::PixelEndcap ){
auto DetUnit = dynamic_cast<const PixelGeomDetUnit*> (Det[i]);
if(!DetUnit) continue;

Expand Down