Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:54:26

0001 #include "DataFormats/PatCandidates/interface/throwMissingLabel.h"
0002 
0003 #include "FWCore/Utilities/interface/Exception.h"
0004 #include <iostream>
0005 
0006 namespace pat {
0007   void throwMissingLabel(const std::string& what,
0008                          const std::string& bad_label,
0009                          const std::vector<std::string>& available) {
0010     cms::Exception ex(std::string("Unknown") + what);
0011     ex << "Requested " << what << " " << bad_label << " is not available! Possible " << what << "s are: " << std::endl;
0012     for (const auto& name : available) {
0013       ex << name << ' ';
0014     }
0015     throw ex;
0016   }
0017 }  // namespace pat