83 lastAnalyzedLumi_(iConfig.getParameter<double>(
"lastAnalyzedLumi")),
84 lastAnalyzedRun_(iConfig.getParameter<double>(
"lastAnalyzedRun")),
85 lastAnalyzedFill_(iConfig.getParameter<double>(
"lastAnalyzedFill")),
86 numTracks_(iConfig.getParameter<
int>(
"numTracks")),
87 numPVs_(iConfig.getParameter<
int>(
"numPVs")),
88 numUsedEvents_(iConfig.getParameter<
int>(
"numUsedEvents")),
89 numMaxPVs_(iConfig.getParameter<
int>(
"numMaxPVs")),
90 meanPVs_(iConfig.getParameter<double>(
"meanPVs")),
91 meanPVError_(iConfig.getParameter<double>(
"meanPVError")),
92 rmsPV_(iConfig.getParameter<double>(
"rmsPVs")),
93 rmsPVError_(iConfig.getParameter<double>(
"rmsPVError")),
94 startTime_(iConfig.getParameter<
std::
string>(
"startTime")),
95 endTime_(iConfig.getParameter<
std::
string>(
"endTime")),
96 lumiRange_(iConfig.getParameter<
std::
string>(
"lumiRange")),
97 fIsHLT_(iConfig.getParameter<
bool>(
"isHLT")) {
98 if (iConfig.
exists(
"IOVStartRun") && iConfig.
exists(
"IOVStartLumi")) {
103 edm::LogPrint(
"BeamSpotOnlineFromOfflineConverter") <<
"useNewSince = True";
106 edm::LogPrint(
"BeamSpotOnlineFromOfflineConverter") <<
"useNewSince = False";
108 fLabel_ = (
fIsHLT_) ?
"BeamSpotOnlineHLTObjectsRcd" :
"BeamSpotOnlineLegacyObjectsRcd";
117 return ((
uint64_t)fIOVStartRun << 32 | fIOVStartLumi);
150 edm::LogPrint(
"BeamSpotOnlineFromOfflineConverter") <<
" Writing results to DB...";
151 edm::LogPrint(
"BeamSpotOnlineFromOfflineConverter") << abeam;
155 edm::LogPrint(
"BeamSpotOnlineFromOfflineConverter") <<
"poolDBService available";
157 edm::LogPrint(
"BeamSpotOnlineFromOfflineConverter") <<
"new tag requested";
164 edm::LogPrint(
"BeamSpotOnlineFromOfflineConverter") <<
"no new tag requested";
167 iEvent.getLuminosityBlock().run(),
iEvent.getLuminosityBlock().luminosityBlock());
168 edm::LogPrint(
"BeamSpotOnlineFromOfflineConverter") <<
"Using a new Since: " << thisSince;
174 edm::LogPrint(
"BeamSpotOnlineFromOfflineConverter") <<
"[BeamSpotOnlineFromOfflineConverter] analyze done \n";
181 desc.add<
bool>(
"isHLT",
true);
182 desc.addOptionalUntracked<uint32_t>(
"IOVStartRun", 1);
183 desc.addOptionalUntracked<uint32_t>(
"IOVStartLumi", 1);
184 desc.add<
double>(
"lastAnalyzedLumi", 1000);
185 desc.add<
double>(
"lastAnalyzedRun", 1);
186 desc.add<
double>(
"lastAnalyzedFill", -999);
187 desc.add<
int>(
"numTracks", 0);
188 desc.add<
int>(
"numPVs", 0);
189 desc.add<
int>(
"numUsedEvents", 0);
190 desc.add<
int>(
"numMaxPVs", 0);
191 desc.add<
double>(
"meanPVs", 0.);
192 desc.add<
double>(
"meanPVError", 0.);
193 desc.add<
double>(
"rmsPVs", 0.);
194 desc.add<
double>(
"rmsPVError", 0.);
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)
void setStartTimeStamp(cond::Time_t val)
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
void setLastAnalyzedLumi(int val)
const int lastAnalyzedLumi_
cond::Time_t beginOfTime() const
void setMeanErrorPV(float val)
bool exists(std::string const ¶meterName) const
checks if a parameter exists
void setUsedEvents(int val)
void setEndTimeStamp(cond::Time_t val)
void createOneIOV(const T &payload, cond::Time_t firstSinceTime, const std::string &recordName)
~BeamSpotOnlineFromOfflineConverter() override=default
void setEndTime(std::string val)
void analyze(const edm::Event &, const edm::EventSetup &) override
cond::Time_t pack(uint32_t, uint32_t)
T getUntrackedParameter(std::string const &, T const &) const
void setNumTracks(int val)
void appendOneIOV(const T &payload, cond::Time_t sinceTime, const std::string &recordName)
void setLastAnalyzedRun(int val)
unsigned long long Time_t
void setMeanPV(float val)
void setLastAnalyzedFill(int val)
bool isNewTagRequest(const std::string &recordName)
cond::Time_t currentTime() const
const int lastAnalyzedRun_
void copyFromBeamSpotObject(const BeamSpotObjects &bs)
Setters Methods.
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
#define DEFINE_FWK_MODULE(type)
void setRmsErrorPV(float val)
const std::string startTime_
Log< level::Warning, true > LogPrint
const std::string endTime_
const std::string lumiRange_
const edm::ESGetToken< BeamSpotObjects, BeamSpotObjectsRcd > bsToken_
unsigned long long uint64_t
void setLumiRange(std::string val)
const int lastAnalyzedFill_
bool check(const edm::EventSetup &iSetup)
void setStartTime(std::string val)
BeamSpotOnlineFromOfflineConverter(const edm::ParameterSet &)
void setCreationTime(cond::Time_t val)
edm::ESWatcher< BeamSpotObjectsRcd > bsWatcher_