CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
TestService.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: Services
4 // Class : TestService
5 //
6 // Implementation:
7 // <Notes on implementation>
8 //
9 // Original Author: W. David Dagenhart
10 // Created: 14 July 2021
11 
19 
20 namespace edm {
21  namespace service {
22 
23  class TestService {
24  public:
26 
28 
30 
31  void preEndProcessBlock(GlobalContext const&);
32 
33  void preGlobalBeginRun(GlobalContext const&);
34 
35  void preGlobalEndRun(GlobalContext const&);
36 
37  void preGlobalBeginLumi(GlobalContext const&);
38 
39  void preGlobalEndLumi(GlobalContext const&);
40 
41  private:
43  };
44  } // namespace service
45 } // namespace edm
46 
47 using namespace edm::service;
48 
50  : printTestMessageLoggerErrors_(iPS.getUntrackedParameter<bool>("printTestMessageLoggerErrors")) {
52 
54 
56 
58 
60 
62 }
63 
66  desc.addUntracked<bool>("printTestMessageLoggerErrors", false)
67  ->setComment("Prints MessageLogger errors to test formatting of such messages when printed from Services");
68  descriptions.add("TestService", desc);
69 }
70 
73  edm::LogError("TestMessageLogger") << "test message from TestService::preBeginProcessBlock";
74  }
75 }
76 
79  edm::LogError("TestMessageLogger") << "test message from TestService::preEndProcessBlock";
80  }
81 }
82 
85  edm::LogError("TestMessageLogger") << "test message from TestService::preGlobalBeginRun";
86  }
87 }
88 
91  edm::LogError("TestMessageLogger") << "test message from TestService::preGlobalEndRun";
92  }
93 }
94 
97  edm::LogError("TestMessageLogger") << "test message from TestService::preGlobalBeginLumi";
98  }
99 }
100 
103  edm::LogError("TestMessageLogger") << "test message from TestService::preGlobalEndLumi";
104  }
105 }
106 
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
void watchPreGlobalEndLumi(PreGlobalEndLumi::slot_type const &iSlot)
void preGlobalBeginLumi(GlobalContext const &)
Definition: TestService.cc:95
void watchPreGlobalBeginLumi(PreGlobalBeginLumi::slot_type const &iSlot)
void watchPreBeginProcessBlock(PreBeginProcessBlock::slot_type const &iSlot)
void watchPreEndProcessBlock(PreEndProcessBlock::slot_type const &iSlot)
Log< level::Error, false > LogError
void preGlobalEndLumi(GlobalContext const &)
Definition: TestService.cc:101
void watchPreGlobalEndRun(PreGlobalEndRun::slot_type const &iSlot)
void preEndProcessBlock(GlobalContext const &)
Definition: TestService.cc:77
void watchPreGlobalBeginRun(PreGlobalBeginRun::slot_type const &iSlot)
#define DEFINE_FWK_SERVICE(type)
Definition: ServiceMaker.h:96
void preGlobalEndRun(GlobalContext const &)
Definition: TestService.cc:89
void add(std::string const &label, ParameterSetDescription const &psetDescription)
TestService(const ParameterSet &, ActivityRegistry &)
Definition: TestService.cc:49
void preBeginProcessBlock(GlobalContext const &)
Definition: TestService.cc:71
void preGlobalBeginRun(GlobalContext const &)
Definition: TestService.cc:83
static void fillDescriptions(edm::ConfigurationDescriptions &)
Definition: TestService.cc:64