File indexing completed on 2024-04-06 12:18:45
0001 #include <cctype>
0002 #include <iostream>
0003
0004 #include "HLTrigger/Timer/interface/processor_model.h"
0005
0006 const char* article(char letter) {
0007 switch (tolower(letter)) {
0008 case 'a':
0009 case 'e':
0010 case 'i':
0011 case 'o':
0012 case 'u':
0013 case 'y':
0014 return "an";
0015 default:
0016 return "a";
0017 }
0018 }
0019
0020 const char* article(const char* word) { return word == nullptr ? nullptr : article(word[0]); }
0021
0022 const char* article(const std::string& word) { return word.empty() ? nullptr : article(word[0]); }
0023
0024 int main() {
0025 std::cout << "Running on " << article(processor_model) << " " << processor_model << std::endl;
0026
0027 return processor_model.empty();
0028 }