CMS 3D CMS Logo

L1TMuonBarrelParamsWriter.cc
Go to the documentation of this file.
1 #include <iomanip>
2 #include <iostream>
3 
7 
10 
16 
19 
21 private:
26 
27 public:
28  void analyze(const edm::Event&, const edm::EventSetup&) override;
29 
31  isO2Opayload = pset.getUntrackedParameter<bool>("isO2Opayload", false);
32  if (isO2Opayload) {
34  } else {
37  }
38  }
39 };
40 
44 
45  if (isO2Opayload)
46  handle1 = evSetup.getHandle(o2oParamsToken_);
47  else {
48  handle1 = evSetup.getHandle(paramsToken_);
49  handle2 = evSetup.getHandle(kalmanToken_);
50  }
51 
53  if (poolDb.isAvailable()) {
54  cond::Time_t firstSinceTime = poolDb->beginOfTime();
55  poolDb->writeOneIOV(
56  *handle1, firstSinceTime, (isO2Opayload ? "L1TMuonBarrelParamsO2ORcd" : "L1TMuonBarrelParamsRcd"));
57  if (not isO2Opayload)
58  poolDb->writeOneIOV(*handle2, firstSinceTime, ("L1TMuonBarrelKalmanParamsRcd"));
59  }
60 }
61 
65 
L1TMuonBarrelParamsWriter(const edm::ParameterSet &pset)
int iEvent
Definition: GenABIO.cc:224
unsigned long long Time_t
Definition: Time.h:14
Hash writeOneIOV(const T &payload, Time_t time, const std::string &recordName)
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:130
edm::ESGetToken< L1TMuonBarrelParams, L1TMuonBarrelParamsO2ORcd > o2oParamsToken_
edm::ESGetToken< L1TMuonBarrelKalmanParams, L1TMuonBarrelKalmanParamsRcd > kalmanToken_
void analyze(const edm::Event &, const edm::EventSetup &) override
edm::ESGetToken< L1TMuonBarrelParams, L1TMuonBarrelParamsRcd > paramsToken_
bool isAvailable() const
Definition: Service.h:40