Created
April 27, 2022 13:48
-
-
Save mmusich/fc8f6f75b1b6518f177d71394b4b3eeb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
// collect how many layers are missing | |
const auto& totalMaps = h_module_total->getAllMaps(); | |
const auto& foundMaps = h_module_found->getAllMaps(); | |
std::vector<bool> isTotalAvailable; | |
std::vector<bool> isFoundAvailable; | |
std::transform(totalMaps.begin(), totalMaps.end(), isTotalAvailable.begin(), [](auto& x) { return !(x==nullptr); }); | |
std::transform(foundMaps.begin(), foundMaps.end(), isFoundAvailable.begin(), [](auto& x) { return !(x==nullptr); }); | |
// check on the input TkHistoMap | |
bool areMapsAvailable{true}; | |
int layerCount{0}; | |
layerCount++; | |
if(!tot){ | |
edm::LogError("SiStripHitEfficiencyHarvester") << "perModule_total TkHistoMap for layer" << layerCount << " was not found.\n -> Aborting!"; | |
areMapsAvailable=false; | |
break; | |
} | |
} | |
layerCount=0; | |
for(const auto& found : isFoundAvailable){ | |
layerCount++; | |
if(!found){ | |
edm::LogError("SiStripHitEfficiencyHarvester") << "perModule_found TkHistoMap for layer" << layerCount << " was not found.\n -> Aborting!"; | |
areMapsAvailable=false; | |
break; | |
} | |
} | |
if(!areMapsAvailable) | |
return; | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment