File indexing completed on 2023-03-17 11:03:46
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020 #include <memory>
0021
0022
0023 #include "FWCore/Framework/interface/LooperFactory.h"
0024 #include "FWCore/Framework/interface/ESProducerLooper.h"
0025
0026 #include "FWCore/Framework/interface/ESHandle.h"
0027
0028 #include "FWCore/Framework/interface/ESProducts.h"
0029
0030
0031
0032
0033
0034 class __class__ : public edm::ESProducerLooper {
0035 public:
0036 __class__(const edm::ParameterSet&);
0037 ~__class__() override;
0038
0039 #python_begin
0040 if len(__datatypes__) > 1:
0041 datatypes = []
0042 for dtype in __datatypes__:
0043 datatypes.append("std::unique_ptr<%s>" % dtype)
0044 print(" using ReturnType = edm::ESProducts<%s>;" % ','.join(datatypes))
0045 elif len(__datatypes__) == 1:
0046 print(" using ReturnType = std::shared_ptr<%s>;" % __datatypes__[0])
0047 #python_end
0048
0049 ReturnType produce(const __record__&);
0050
0051 void beginOfJob() override;
0052 void startingNewLoop(unsigned int) override;
0053 Status duringLoop(const edm::Event&, const edm::EventSetup&) override;
0054 Status endOfLoop(const edm::EventSetup&) override;
0055 void endOfJob() override;
0056
0057 private:
0058
0059 };
0060
0061
0062
0063
0064
0065
0066
0067
0068
0069
0070
0071
0072 __class__::__class__(const edm::ParameterSet& iConfig) {
0073
0074
0075 setWhatProduced(this);
0076
0077
0078 }
0079
0080 __class__::~__class__() {
0081
0082
0083 }
0084
0085
0086
0087
0088
0089
0090 __class__::ReturnType __class__::produce(const __record__& iRecord) {
0091 using namespace edm::es;
0092 #python_begin
0093 out1 = []
0094 out2 = []
0095 for dtype in __datatypes__:
0096 out1.append(" std::unique_ptr<%s> p%s;" % (dtype, dtype))
0097 out2.append("p%s" % dtype)
0098 output = '\n'.join(out1)
0099 output += "\n return products(%s);" % ','.join(out2)
0100 print(output)
0101 #python_end
0102 }
0103
0104
0105 void __class__::beginOfJob(const edm::EventSetup&) {
0106 }
0107
0108
0109
0110 void __class__::startingNewLoop(unsigned int iIteration) {
0111 }
0112
0113
0114 __class__::Status __class__::duringLoop(const edm::Event&, const edm::EventSetup&) {
0115 return kContinue;
0116 }
0117
0118
0119
0120 __class__::Status __class__::endOfLoop(const edm::EventSetup&, unsigned int) {
0121 return kStop;
0122 }
0123
0124
0125 void __class__::endOfJob() {
0126 }
0127
0128
0129 DEFINE_FWK_LOOPER(__class__);