CMS 3D CMS Logo

L1TMuonEndCapParamsWriter.cc
Go to the documentation of this file.
1 #include <iomanip>
2 #include <iostream>
3 
5 
8 
11 
15 
18 
20 private:
24 
25 public:
26  void analyze(const edm::Event&, const edm::EventSetup&) override;
27 
29  isO2Opayload = pset.getUntrackedParameter<bool>("isO2Opayload", false);
30  if (isO2Opayload) {
32  } else {
33  token_ = esConsumes();
34  }
35  }
36 };
37 
40 
41  if (isO2Opayload)
42  handle1 = evSetup.getHandle(o2oToken_);
43  else
44  handle1 = evSetup.getHandle(token_);
45 
46  L1TMuonEndCapParams const& ptr1 = *handle1;
47 
49  if (poolDb.isAvailable()) {
50  cond::Time_t firstSinceTime = poolDb->beginOfTime();
51  poolDb->writeOneIOV(ptr1, firstSinceTime, (isO2Opayload ? "L1TMuonEndCapParamsO2ORcd" : "L1TMuonEndCapParamsRcd"));
52  }
53 }
54 
58 
void analyze(const edm::Event &, const edm::EventSetup &) override
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:151
edm::ESGetToken< L1TMuonEndCapParams, L1TMuonEndCapParamsRcd > token_
bool isAvailable() const
Definition: Service.h:40
edm::ESGetToken< L1TMuonEndCapParams, L1TMuonEndCapParamsO2ORcd > o2oToken_
L1TMuonEndCapParamsWriter(const edm::ParameterSet &pset)