22 #include "boost/shared_ptr.hpp"
31 #include "RelationalAccess/ISession.h"
32 #include "RelationalAccess/ITransaction.h"
33 #include "RelationalAccess/IRelationalDomain.h"
34 #include "RelationalAccess/ISchema.h"
35 #include "RelationalAccess/IQuery.h"
36 #include "RelationalAccess/ICursor.h"
37 #include "RelationalAccess/IConnection.h"
38 #include "CoralBase/AttributeList.h"
39 #include "CoralBase/Attribute.h"
40 #include "CoralKernel/Context.h"
86 connectionString(iConfig.getParameter<std::
string>(
"connectionString")),
88 tableToRead(iConfig.getParameter<std::
string>(
"tableToRead"))
117 using namespace edm::es;
118 boost::shared_ptr<RunInfo> pRunInfo ;
129 pRunInfo = boost::shared_ptr<RunInfo>(
new RunInfo() );
139 connection.configure();
146 session.transaction().start(
true);
151 coral::AttributeList conditionData;
152 conditionData.extend<
int>(
"n_run" );
153 conditionData[0].data<
int>() =
runNumber;
158 coral::IQuery* queryV =
schema.newQuery();
160 queryV->addToTableList(tableToRead_fed);
161 queryV->addToOutputList(tableToRead_fed +
"." + columnToRead_val, columnToRead_val);
164 std::string condition =
tableToRead +
".RUNNUMBER=:n_run AND " +
tableToRead +
".NAME='CMS.LVL0:FED_ENABLE_MASK' AND RUNSESSION_PARAMETER.ID = RUNSESSION_STRING.RUNSESSION_PARAMETER_ID";
166 queryV->setCondition(condition, conditionData);
167 coral::ICursor& cursorV = queryV->execute();
169 if ( cursorV.next() ) {
171 const coral::AttributeList& row = cursorV.currentRow();
185 if ( !(stream >> word) ){
break;}
187 std::stringstream
ss(word);
190 ss >> fedNumber >> val;
193 if( (val & 0001) == 1 && (val != 5) && (val != 7) )
194 pRunInfo->m_fed_in.push_back(fedNumber);
boost::shared_ptr< RunInfo > ReturnType
L1RCTOmdsFedVectorProducer(const edm::ParameterSet &)
DbConnectionConfiguration & configuration()
std::string connectionString
void setWhatProduced(T *iThis, const es::Label &iLabel=es::Label())
void get(HolderT &iHolder) const
~L1RCTOmdsFedVectorProducer()
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
void setAuthenticationPath(const std::string &p)
ReturnType produce(const RunInfoRcd &)