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