Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:12:48

0001 #include "FWCore/Framework/interface/Frameworkfwd.h"
0002 #include "FWCore/Framework/interface/global/EDAnalyzer.h"
0003 #include "FWCore/Framework/interface/MakerMacros.h"
0004 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0005 #include "FWCore/Utilities/interface/StreamID.h"
0006 
0007 namespace edmtest {
0008 
0009   class UnitTestClient_E : public edm::global::EDAnalyzer<> {
0010   public:
0011     explicit UnitTestClient_E(edm::ParameterSet const&) {}
0012 
0013     void analyze(edm::StreamID, edm::Event const&, edm::EventSetup const&) const override;
0014   };
0015 
0016   void UnitTestClient_E::analyze(edm::StreamID, edm::Event const&, edm::EventSetup const&) const {
0017     edm::LogInfo("expect_overall_unnamed") << "The following outputs are expected: \n"
0018                                            << "unlisted_category    appearing in events 1,2,3,4,5,10,15,25,45 \n";
0019 
0020     edm::LogInfo("expect_overall_specific") << "The following outputs are expected: \n"
0021                                             << "lim3bydefault    appearing in events 1,2,3,6,9,15,27 \n";
0022 
0023     edm::LogInfo("expect_supercede_specific") << "The following outputs are expected: \n"
0024                                               << "lim2bycommondefault appearing in events 1,2,3,4,5,6,7,8,16,24,40 \n";
0025 
0026     edm::LogInfo("expect_non_supercede_common_specific")
0027         << "The following outputs are expected: \n"
0028         << "lim2bycommondefault appearing in events 1,2,4,6,10,18,34 \n";
0029 
0030     edm::LogInfo("expect_specific") << "The following outputs are expected: \n"
0031                                     << "lim0bydefaults appearing in events 1,2,3,4,5,6,12,18,30 \n";
0032 
0033     for (int i = 1; i <= 50; ++i) {
0034       edm::LogInfo("unlisted_category") << "message with overall default limit of 5: " << i;
0035       edm::LogInfo("lim3bydefault") << "message with specific overall default limit of 3: " << i;
0036       edm::LogInfo("lim2bycommondefault") << "message with specific overall default limit of 2: " << i;
0037       edm::LogInfo("lim0bydefaults") << "message with overall default and dest default limit of 0: " << i;
0038       //    edm::LogInfo   ("lim3bydefault")   <<
0039       //    "message with overall default limit (superceded) of 2: " << i;
0040     }
0041   }
0042 
0043 }  // namespace edmtest
0044 
0045 using edmtest::UnitTestClient_E;
0046 DEFINE_FWK_MODULE(UnitTestClient_E);