22 #include "boost/shared_ptr.hpp"
31 #include "RelationalAccess/ISessionProxy.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 tableToRead(iConfig.getParameter<std::
string>(
"tableToRead"))
115 using namespace edm::es;
116 boost::shared_ptr<RunInfo> pRunInfo ;
127 pRunInfo = boost::shared_ptr<RunInfo>(
new RunInfo() );
137 connection.configure();
142 session.transaction().start(
true);
144 coral::ISchema&
schema =
session.coralSession().schema(
"CMS_RUNINFO");
147 coral::AttributeList conditionData;
148 conditionData.extend<
int>(
"n_run" );
149 conditionData[0].data<
int>() =
runNumber;
154 coral::IQuery* queryV =
schema.newQuery();
156 queryV->addToTableList(tableToRead_fed);
157 queryV->addToOutputList(tableToRead_fed +
"." + columnToRead_val, columnToRead_val);
160 std::string condition =
tableToRead +
".RUNNUMBER=:n_run AND " +
tableToRead +
".NAME='CMS.LVL0:FED_ENABLE_MASK' AND RUNSESSION_PARAMETER.ID = RUNSESSION_STRING.RUNSESSION_PARAMETER_ID";
162 queryV->setCondition(condition, conditionData);
163 coral::ICursor& cursorV = queryV->execute();
165 if ( cursorV.next() ) {
167 const coral::AttributeList& row = cursorV.currentRow();
177 std::stringstream stream(fed);
181 if ( !(stream >> word) ){
break;}
183 std::stringstream
ss(word);
186 ss >> fedNumber >> val;
189 if( (val & 0001) == 1 && (val != 5) && (val != 7) )
190 pRunInfo->m_fed_in.push_back(fedNumber);
boost::shared_ptr< RunInfo > ReturnType
L1RCTOmdsFedVectorProducer(const edm::ParameterSet &)
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)
ReturnType produce(const RunInfoRcd &)
void setAuthenticationPath(const std::string &p)