File tree Expand file tree Collapse file tree 3 files changed +28
-2
lines changed Expand file tree Collapse file tree 3 files changed +28
-2
lines changed Original file line number Diff line number Diff line change 55#include " FWCore/ParameterSet/interface/ParameterSetDescription.h"
66#include " SonicCMS/Core/interface/SonicClientSync.h"
77#include " SonicCMS/Core/interface/SonicClientPseudoAsync.h"
8+ #include " SonicCMS/Core/interface/SonicClientAsync.h"
89
910#include < vector>
1011#include < thread>
@@ -42,6 +43,13 @@ class DummyClient : public Client {
4243
4344typedef DummyClient<SonicClientSync<int >> DummyClientSync;
4445typedef DummyClient<SonicClientPseudoAsync<int >> DummyClientPseudoAsync;
45- // test of true Async omitted
46+ typedef DummyClient<SonicClientAsync<int >> DummyClientAsync;
47+
48+ // specialization for true async
49+ template <>
50+ void DummyClientAsync::predictImpl () {
51+ this ->output_ = this ->input_ *factor_;
52+ this ->finish ();
53+ }
4654
4755#endif
Original file line number Diff line number Diff line change @@ -44,13 +44,17 @@ namespace edmtest {
4444
4545 typedef SonicDummyProducer<DummyClientSync> SonicDummyProducerSync;
4646 typedef SonicDummyProducer<DummyClientPseudoAsync> SonicDummyProducerPseudoAsync;
47+ typedef SonicDummyProducer<DummyClientAsync> SonicDummyProducerAsync;
4748
4849 template <> std::string SonicDummyProducerSync::getCfiName () { return " SonicDummyProducerSync" ; }
4950 template <> std::string SonicDummyProducerPseudoAsync::getCfiName () { return " SonicDummyProducerPseudoAsync" ; }
51+ template <> std::string SonicDummyProducerAsync::getCfiName () { return " SonicDummyProducerAsync" ; }
5052}
5153
5254using edmtest::SonicDummyProducerSync;
5355DEFINE_FWK_MODULE (SonicDummyProducerSync);
5456using edmtest::SonicDummyProducerPseudoAsync;
5557DEFINE_FWK_MODULE (SonicDummyProducerPseudoAsync);
58+ using edmtest::SonicDummyProducerAsync;
59+ DEFINE_FWK_MODULE (SonicDummyProducerAsync);
5660
Original file line number Diff line number Diff line change 2727 ),
2828)
2929
30- process .task = cms .Task (process .dummySync ,process .dummyPseudoAsync )
30+ process .dummyAsync = cms .EDProducer ("SonicDummyProducerAsync" ,
31+ input = cms .int32 (3 ),
32+ Client = cms .PSet (
33+ factor = cms .int32 (5 ),
34+ wait = cms .int32 (10 ),
35+ ),
36+ )
37+
38+ process .task = cms .Task (process .dummySync ,process .dummyPseudoAsync ,process .dummyAsync )
3139
3240process .testerSync = cms .EDAnalyzer ("IntTestAnalyzer" ,
3341 valueMustMatch = cms .untracked .int32 (- 1 ),
3947 moduleLabel = cms .untracked .string ("dummyPseudoAsync" ),
4048)
4149
50+ process .testerAsync = cms .EDAnalyzer ("IntTestAnalyzer" ,
51+ valueMustMatch = cms .untracked .int32 (15 ),
52+ moduleLabel = cms .untracked .string ("dummyAsync" ),
53+ )
54+
4255process .p1 = cms .Path (process .testerSync , process .task )
4356process .p2 = cms .Path (process .testerPseudoAsync , process .task )
57+ process .p3 = cms .Path (process .testerAsync , process .task )
You can’t perform that action at this time.
0 commit comments