CMS 3D CMS Logo

L1TGlobalPrescalesVetosWriter.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  L1TGlobalPrescalesVetos const& ptr1 = *handle1;
46 
48  if (poolDb.isAvailable()) {
49  cond::Time_t firstSinceTime = poolDb->beginOfTime();
50  poolDb->writeOneIOV(
51  ptr1, firstSinceTime, (isO2Opayload ? "L1TGlobalPrescalesVetosO2ORcd" : "L1TGlobalPrescalesVetosRcd"));
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:130
edm::ESGetToken< L1TGlobalPrescalesVetos, L1TGlobalPrescalesVetosRcd > token_
bool isAvailable() const
Definition: Service.h:40
edm::ESGetToken< L1TGlobalPrescalesVetos, L1TGlobalPrescalesVetosO2ORcd > o2oToken_
L1TGlobalPrescalesVetosWriter(const edm::ParameterSet &pset)