File indexing completed on 2024-04-06 11:56:14
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023 #include <memory>
0024
0025
0026 #include "FWCore/Framework/interface/ModuleFactory.h"
0027 #include "FWCore/Framework/interface/ESProducer.h"
0028 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0029
0030
0031 #include "CondFormats/Alignment/interface/Alignments.h"
0032 #include "CondFormats/Alignment/interface/AlignmentErrorsExtended.h"
0033 #include "CondFormats/AlignmentRecord/interface/TrackerAlignmentRcd.h"
0034 #include "CondFormats/AlignmentRecord/interface/DTAlignmentRcd.h"
0035 #include "CondFormats/AlignmentRecord/interface/CSCAlignmentRcd.h"
0036 #include "CondFormats/AlignmentRecord/interface/TrackerAlignmentErrorExtendedRcd.h"
0037 #include "CondFormats/AlignmentRecord/interface/DTAlignmentErrorExtendedRcd.h"
0038 #include "CondFormats/AlignmentRecord/interface/CSCAlignmentErrorExtendedRcd.h"
0039 #include "CondFormats/AlignmentRecord/interface/GlobalPositionRcd.h"
0040
0041 class FakeAlignmentProducer : public edm::ESProducer {
0042 public:
0043 FakeAlignmentProducer(const edm::ParameterSet&);
0044 ~FakeAlignmentProducer() override {}
0045
0046 std::unique_ptr<Alignments> produceTkAli(const TrackerAlignmentRcd&) { return std::make_unique<Alignments>(); }
0047 std::unique_ptr<Alignments> produceDTAli(const DTAlignmentRcd&) { return std::make_unique<Alignments>(); }
0048 std::unique_ptr<Alignments> produceCSCAli(const CSCAlignmentRcd&) { return std::make_unique<Alignments>(); }
0049 std::unique_ptr<Alignments> produceGlobals(const GlobalPositionRcd&) { return std::make_unique<Alignments>(); }
0050
0051 std::unique_ptr<AlignmentErrorsExtended> produceTkAliErr(const TrackerAlignmentErrorExtendedRcd&) {
0052 return std::make_unique<AlignmentErrorsExtended>();
0053 }
0054 std::unique_ptr<AlignmentErrorsExtended> produceDTAliErr(const DTAlignmentErrorExtendedRcd&) {
0055 return std::make_unique<AlignmentErrorsExtended>();
0056 }
0057 std::unique_ptr<AlignmentErrorsExtended> produceCSCAliErr(const CSCAlignmentErrorExtendedRcd&) {
0058 return std::make_unique<AlignmentErrorsExtended>();
0059 }
0060 };
0061
0062 FakeAlignmentProducer::FakeAlignmentProducer(const edm::ParameterSet& iConfig) {
0063
0064
0065
0066 edm::LogInfo("Alignments") << "@SUB=FakeAlignmentProducer"
0067 << "Providing data with label '" << iConfig.getParameter<std::string>("appendToDataLabel")
0068 << "'.";
0069
0070 setWhatProduced(this, &FakeAlignmentProducer::produceTkAli);
0071 setWhatProduced(this, &FakeAlignmentProducer::produceTkAliErr);
0072 setWhatProduced(this, &FakeAlignmentProducer::produceDTAli);
0073 setWhatProduced(this, &FakeAlignmentProducer::produceDTAliErr);
0074 setWhatProduced(this, &FakeAlignmentProducer::produceCSCAli);
0075 setWhatProduced(this, &FakeAlignmentProducer::produceCSCAliErr);
0076 setWhatProduced(this, &FakeAlignmentProducer::produceGlobals);
0077 }
0078
0079
0080 DEFINE_FWK_EVENTSETUP_MODULE(FakeAlignmentProducer);