80 lastAnalyzedLumi_(iConfig.getParameter<double>(
"lastAnalyzedLumi")),
81 lastAnalyzedRun_(iConfig.getParameter<double>(
"lastAnalyzedRun")),
82 lastAnalyzedFill_(iConfig.getParameter<double>(
"lastAnalyzedFill")),
83 numTracks_(iConfig.getParameter<
int>(
"numTracks")),
84 numPVs_(iConfig.getParameter<
int>(
"numPVs")),
85 numUsedEvents_(iConfig.getParameter<
int>(
"numUsedEvents")),
86 numMaxPVs_(iConfig.getParameter<
int>(
"numMaxPVs")),
87 meanPVs_(iConfig.getParameter<double>(
"meanPVs")),
88 meanPVError_(iConfig.getParameter<double>(
"meanPVError")),
89 rmsPV_(iConfig.getParameter<double>(
"rmsPVs")),
90 rmsPVError_(iConfig.getParameter<double>(
"rmsPVError")),
91 startTime_(iConfig.getParameter<
std::
string>(
"startTime")),
92 endTime_(iConfig.getParameter<
std::
string>(
"endTime")),
93 lumiRange_(iConfig.getParameter<
std::
string>(
"lumiRange")),
94 fIsHLT_(iConfig.getParameter<
bool>(
"isHLT")) {
95 if (iConfig.
exists(
"IOVStartRun") && iConfig.
exists(
"IOVStartLumi")) {
100 edm::LogPrint(
"BeamSpotOnlineFromOfflineConverter") <<
"useNewSince = True";
103 edm::LogPrint(
"BeamSpotOnlineFromOfflineConverter") <<
"useNewSince = False";
113 return ((
uint64_t)fIOVStartRun << 32 | fIOVStartLumi);
118 const std::string fLabel = (
fIsHLT_) ?
"BeamSpotOnlineHLTObjectsRcd" :
"BeamSpotOnlineLegacyObjectsRcd";
145 edm::LogPrint(
"BeamSpotOnlineFromOfflineConverter") <<
" Writing results to DB...";
146 edm::LogPrint(
"BeamSpotOnlineFromOfflineConverter") << abeam;
150 edm::LogPrint(
"BeamSpotOnlineFromOfflineConverter") <<
"poolDBService available";
152 edm::LogPrint(
"BeamSpotOnlineFromOfflineConverter") <<
"new tag requested";
159 edm::LogPrint(
"BeamSpotOnlineFromOfflineConverter") <<
"no new tag requested";
167 edm::LogPrint(
"BeamSpotOnlineFromOfflineConverter") <<
"[BeamSpotOnlineFromOfflineConverter] analyze done \n";
173 desc.add<
bool>(
"isHLT",
true);
174 desc.addOptionalUntracked<uint32_t>(
"IOVStartRun", 1);
175 desc.addOptionalUntracked<uint32_t>(
"IOVStartLumi", 1);
176 desc.add<
double>(
"lastAnalyzedLumi", 1000);
177 desc.add<
double>(
"lastAnalyzedRun", 1);
178 desc.add<
double>(
"lastAnalyzedFill", -999);
179 desc.add<
int>(
"numTracks", 0);
180 desc.add<
int>(
"numPVs", 0);
181 desc.add<
int>(
"numUsedEvents", 0);
182 desc.add<
int>(
"numMaxPVs", 0);
183 desc.add<
double>(
"meanPVs", 0.);
184 desc.add<
double>(
"meanPVError", 0.);
185 desc.add<
double>(
"rmsPVs", 0.);
186 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_
void setStartTime(std::string val)
BeamSpotOnlineFromOfflineConverter(const edm::ParameterSet &)
void setCreationTime(cond::Time_t val)