Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #include "FWCore/MessageService/interface/MsgContext.h"
00013 #include <sstream>
00014
00015 #include <iostream>
00016
00017 namespace edm {
00018 namespace service {
00019
00020 std::string MsgContext::compress (const std::string& c) const
00021 {
00022 if ( c.substr (0,4) != "Run:" ) return c;
00023 std::istringstream is (c);
00024 std::string runWord;
00025 int run;
00026 is >> runWord >> run;
00027 if (!is) return c;
00028 if (runWord != "Run:") return c;
00029 std::string eventWord;
00030 int event;
00031 is >> eventWord >> event;
00032 if (!is) return c;
00033 if (eventWord != "Event:") return c;
00034 std::ostringstream os;
00035 os << run << "/" << event;
00036 return os.str();
00037 }
00038 }
00039 }