CMS 3D CMS Logo

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 
ConfigurationDescriptions.h
edm::service::TestService::preBeginProcessBlock
void preBeginProcessBlock(GlobalContext const &)
Definition: TestService.cc:71
service
Definition: service.py:1
electrons_cff.bool
bool
Definition: electrons_cff.py:366
MessageLogger.h
edm
HLT enums.
Definition: AlignableModifier.h:19
edm::service::TestService::preGlobalBeginLumi
void preGlobalBeginLumi(GlobalContext const &)
Definition: TestService.cc:95
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
DEFINE_FWK_SERVICE
#define DEFINE_FWK_SERVICE(type)
Definition: ServiceMaker.h:96
edm::service::TestService::printTestMessageLoggerErrors_
bool printTestMessageLoggerErrors_
Definition: TestService.cc:42
ActivityRegistry.h
edm::service::TestService::preGlobalEndLumi
void preGlobalEndLumi(GlobalContext const &)
Definition: TestService.cc:101
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:57
edm::ActivityRegistry
Definition: ActivityRegistry.h:134
ParameterSetDescription.h
edm::ActivityRegistry::watchPreGlobalEndRun
void watchPreGlobalEndRun(PreGlobalEndRun::slot_type const &iSlot)
Definition: ActivityRegistry.h:345
ServiceMaker.h
edm::ConfigurationDescriptions
Definition: ConfigurationDescriptions.h:28
edm::service::TestService::preGlobalEndRun
void preGlobalEndRun(GlobalContext const &)
Definition: TestService.cc:89
edm::GlobalContext
Definition: GlobalContext.h:29
edm::ParameterSet
Definition: ParameterSet.h:47
GlobalContext.h
edm::service::TestService::preEndProcessBlock
void preEndProcessBlock(GlobalContext const &)
Definition: TestService.cc:77
edm::service
Definition: TFileService.h:95
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
edm::ActivityRegistry::watchPreBeginProcessBlock
void watchPreBeginProcessBlock(PreBeginProcessBlock::slot_type const &iSlot)
Definition: ActivityRegistry.h:290
edm::service::TestService::preGlobalBeginRun
void preGlobalBeginRun(GlobalContext const &)
Definition: TestService.cc:83
edm::ActivityRegistry::watchPreGlobalEndLumi
void watchPreGlobalEndLumi(PreGlobalEndLumi::slot_type const &iSlot)
Definition: ActivityRegistry.h:421
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
edm::ActivityRegistry::watchPreGlobalBeginLumi
void watchPreGlobalBeginLumi(PreGlobalBeginLumi::slot_type const &iSlot)
Definition: ActivityRegistry.h:407
edm::service::TestService::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &)
Definition: TestService.cc:64
edm::ActivityRegistry::watchPreGlobalBeginRun
void watchPreGlobalBeginRun(PreGlobalBeginRun::slot_type const &iSlot)
Definition: ActivityRegistry.h:333
edm::service::TestService
Definition: TestService.cc:23
ParameterSet.h
edm::ActivityRegistry::watchPreEndProcessBlock
void watchPreEndProcessBlock(PreEndProcessBlock::slot_type const &iSlot)
Definition: ActivityRegistry.h:318
edm::service::TestService::TestService
TestService(const ParameterSet &, ActivityRegistry &)
Definition: TestService.cc:49