29 return std::make_pair(
run,
lumi);
55 m_condDb(iConfig.getParameter<
std::
string>(
"conditionDatabase")),
56 m_tagName(iConfig.getParameter<
std::
string>(
"tagName")),
57 m_startTime(iConfig.getParameter<unsigned long long>(
"startIOV")),
58 m_endTime(iConfig.getParameter<unsigned long long>(
"endIOV")),
59 m_output(iConfig.getParameter<
std::
string>(
"output")) {
69 if (startIov > endIov)
71 edm::LogInfo(
"BeamSpotRcdPrinter") <<
"[BeamSpotRcdPrinter::" << __func__ <<
"] " 72 <<
"Set start time " << startIov <<
"\n ... Set end time " << endIov;
75 edm::LogInfo(
"BeamSpotRcdPrinter") <<
"[BeamSpotRcdPrinter::" << __func__ <<
"] " 76 <<
"Query the condition database " <<
m_condDb;
82 std::vector<cond::Time_t> vTime;
85 edm::LogInfo(
"BeamSpotRcdPrinter") <<
"[BeamSpotRcdPrinter::" << __func__ <<
"] " 89 auto iiov = iovs.
find(startIov);
90 auto eiov = iovs.find(endIov);
92 while (iiov != iovs.end() && (*iiov).since <= (*eiov).since) {
94 if ((*iiov).since < startIov) {
95 vTime.push_back(startIov);
97 vTime.push_back((*iiov).since);
102 ss << runLS.first <<
"," << runLS.second <<
" (" << (*iiov).since <<
")" 103 <<
" [hash: " << (*iiov).payloadId <<
"] \n" 110 vTime.push_back(endIov);
112 edm::LogInfo(
"BeamSpotRcdPrinter") <<
"[BeamSpotRcdPrinter::" << __func__ <<
"] " 113 <<
"Read " << niov <<
" IOVs from tag " <<
m_tagName 114 <<
" corresponding to the specified time interval.\n\n" 129 desc.add<
std::string>(
"conditionDatabase",
"frontier://FrontierProd/CMS_CONDITIONS");
130 desc.add<
std::string>(
"tagName",
"BeamSpotObjects_PCL_byLumi_v0_prompt");
131 desc.add<
unsigned long long>(
"startIOV", 1406859487478481);
132 desc.add<
unsigned long long>(
"endIOV", 1406876667347162);
138 descDBParameters.addUntracked<
int>(
"authenticationSystem", 0);
139 descDBParameters.addUntracked<
std::string>(
"security",
"");
140 descDBParameters.addUntracked<
int>(
"messageLevel", 0);
143 descriptions.
add(
"BeamSpotRcdPrinter",
desc);
T getParameter(std::string const &) const
BeamSpotRcdPrinter(const edm::ParameterSet &iConfig)
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
#define DEFINE_FWK_MODULE(type)
void start(bool readOnly=true)
const Time_t kLowMask(0xFFFFFFFF)
std::unique_ptr< T > fetchPayload(const cond::Hash &payloadHash)
cond::persistency::ConnectionPool m_connectionPool
Transaction & transaction()
~BeamSpotRcdPrinter() override
void setParameters(const edm::ParameterSet &connectionPset)
unsigned long long Time_t
unsigned long long m_startTime
Session createSession(const std::string &connectionString, bool writeCapable=false)
Iterator find(cond::Time_t time) const
unsigned long long m_endTime
IOVProxy readIov(const std::string &tag)
Log< level::Info, false > LogInfo
void analyze(const edm::Event &evt, const edm::EventSetup &evtSetup) override
void add(std::string const &label, ParameterSetDescription const &psetDescription)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
std::pair< unsigned int, unsigned int > unpack(cond::Time_t since)