28 auto run = (since >> 32);
30 return std::make_pair(
run,
lumi);
40 void endJob()
override;
58 m_condDb ( iConfig.getParameter<
std::
string >(
"conditionDatabase") ),
59 m_tagName ( iConfig.getParameter<
std::
string >(
"tagName") ),
60 m_startTime( iConfig.getParameter< unsigned long long >(
"startIOV") ),
61 m_endTime ( iConfig.getParameter< unsigned long long >(
"endIOV") ),
62 m_output ( iConfig.getParameter<
std::
string >(
"output") )
76 if (startIov > endIov)
78 edm::LogInfo(
"BeamSpotRcdPrinter") <<
"[BeamSpotRcdPrinter::" << __func__ <<
"] " 79 <<
"Set start time " << startIov
80 <<
"\n ... Set end time " << endIov;
83 edm::LogInfo(
"BeamSpotRcdPrinter") <<
"[BeamSpotRcdPrinter::" << __func__ <<
"] " 84 <<
"Query the condition database " <<
m_condDb;
90 std::vector< cond::Time_t > vTime;
93 edm::LogInfo(
"BeamSpotRcdPrinter") <<
"[BeamSpotRcdPrinter::" << __func__ <<
"] " 96 auto iiov = iovProxy.
find(startIov);
97 auto eiov = iovProxy.
find(endIov);
99 while (iiov != iovProxy.
end() && (*iiov).since <= (*eiov).since){
101 if ((*iiov).since<startIov){
102 vTime.push_back(startIov);
104 vTime.push_back((*iiov).since);
109 ss << runLS.first <<
","<< runLS.second <<
" ("<< (*iiov).since <<
")" <<
" [hash: " << (*iiov).payloadId <<
"] \n" 116 vTime.push_back(endIov);
118 edm::LogInfo(
"BeamSpotRcdPrinter") <<
"[BeamSpotRcdPrinter::" << __func__ <<
"] " 119 <<
"Read " << niov <<
" IOVs from tag " << m_tagName <<
" corresponding to the specified time interval.\n\n" << ss.str();
135 desc.
add<
std::string>(
"conditionDatabase",
"frontier://FrontierProd/CMS_CONDITIONS");
136 desc.
add<
std::string>(
"tagName",
"BeamSpotObjects_PCL_byLumi_v0_prompt");
137 desc.
add<
unsigned long long>(
"startIOV",1406859487478481);
138 desc.
add<
unsigned long long>(
"endIOV",1406876667347162);
144 descDBParameters.addUntracked<
int>(
"authenticationSystem",0);
145 descDBParameters.addUntracked<
std::string>(
"security",
"");
146 descDBParameters.addUntracked<
int>(
"messageLevel",0);
149 descriptions.
add(
"BeamSpotRcdPrinter", desc);
T getParameter(std::string const &) const
BeamSpotRcdPrinter(const edm::ParameterSet &iConfig)
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
void start(bool readOnly=true)
std::pair< unsigned int, unsigned int > unpack(cond::Time_t since)
const Time_t kLowMask(0xFFFFFFFF)
std::unique_ptr< T > fetchPayload(const cond::Hash &payloadHash)
cond::persistency::ConnectionPool m_connectionPool
Transaction & transaction()
~BeamSpotRcdPrinter() override
example_stream void analyze(const edm::Event &, const edm::EventSetup &) override
void setParameters(const edm::ParameterSet &connectionPset)
IOVProxy readIov(const std::string &tag, bool full=false)
#define DEFINE_FWK_MODULE(type)
unsigned long long Time_t
Iterator find(cond::Time_t time)
unsigned long long m_startTime
Session createSession(const std::string &connectionString, bool writeCapable=false)
unsigned long long m_endTime
ParameterDescriptionBase * add(U const &iLabel, T const &value)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
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)