CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
L1TMuonBarrelParamsWriter.cc
Go to the documentation of this file.
1 #include <iomanip>
2 #include <iostream>
3 
7 
10 
16 
19 
21 private:
23 
24 public:
25  void analyze(const edm::Event&, const edm::EventSetup&) override;
26 
28  isO2Opayload = pset.getUntrackedParameter<bool>("isO2Opayload", false);
29  }
30  ~L1TMuonBarrelParamsWriter(void) override {}
31 };
32 
36 
37  if (isO2Opayload)
38  evSetup.get<L1TMuonBarrelParamsO2ORcd>().get(handle1);
39  else {
40  evSetup.get<L1TMuonBarrelParamsRcd>().get(handle1);
41  evSetup.get<L1TMuonBarrelKalmanParamsRcd>().get(handle2);
42  }
43 
44  std::shared_ptr<L1TMuonBarrelParams> ptr1(new L1TMuonBarrelParams(*(handle1.product())));
45  std::shared_ptr<L1TMuonBarrelKalmanParams> ptr2(new L1TMuonBarrelKalmanParams(*(handle2.product())));
46 
48  if (poolDb.isAvailable()) {
49  cond::Time_t firstSinceTime = poolDb->beginOfTime();
50  poolDb->writeOneIOV(*ptr1, firstSinceTime, (isO2Opayload ? "L1TMuonBarrelParamsO2ORcd" : "L1TMuonBarrelParamsRcd"));
51  if (not isO2Opayload)
52  poolDb->writeOneIOV(*ptr2, firstSinceTime, ("L1TMuonBarrelKalmanParamsRcd"));
53  }
54 }
55 
59 
T getUntrackedParameter(std::string const &, T const &) const
L1TMuonBarrelParamsWriter(const edm::ParameterSet &pset)
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
int iEvent
Definition: GenABIO.cc:224
unsigned long long Time_t
Definition: Time.h:14
T const * product() const
Definition: ESHandle.h:86
void analyze(const edm::Event &, const edm::EventSetup &) override
T get() const
Definition: EventSetup.h:82