Skip to content

Instantly share code, notes, and snippets.

@mmusich
Created April 27, 2022 13:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mmusich/fc8f6f75b1b6518f177d71394b4b3eeb to your computer and use it in GitHub Desktop.
Save mmusich/fc8f6f75b1b6518f177d71394b4b3eeb to your computer and use it in GitHub Desktop.
/*
// 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