CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
L1TMuonGlobalParamsWriter.cc
Go to the documentation of this file.
1 #include <iomanip>
2 #include <iostream>
3 
7 
10 
14 
17 
19 private:
23 
24 public:
25  void analyze(const edm::Event&, const edm::EventSetup&) override;
26 
28  isO2Opayload = pset.getUntrackedParameter<bool>("isO2Opayload", false);
29  if (isO2Opayload) {
31  } else {
32  token_ = esConsumes();
33  }
34  }
35 };
36 
39 
40  if (isO2Opayload)
41  handle1 = evSetup.getHandle(o2oToken_);
42  else
43  handle1 = evSetup.getHandle(token_);
44 
45  L1TMuonGlobalParams const& ptr1 = *handle1;
46 
48  if (poolDb.isAvailable()) {
49  cond::Time_t firstSinceTime = poolDb->beginOfTime();
50  poolDb->writeOneIOV(ptr1, firstSinceTime, (isO2Opayload ? "L1TMuonGlobalParamsO2ORcd" : "L1TMuonGlobalParamsRcd"));
51  }
52 }
53 
57 
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:130
L1TMuonGlobalParamsWriter(const edm::ParameterSet &pset)
edm::ESGetToken< L1TMuonGlobalParams, L1TMuonGlobalParamsRcd > token_
bool isAvailable() const
Definition: Service.h:40
edm::ESGetToken< L1TMuonGlobalParams, L1TMuonGlobalParamsO2ORcd > o2oToken_