30 #include "RelationalAccess/ISessionProxy.h" 31 #include "RelationalAccess/ITransaction.h" 32 #include "RelationalAccess/IRelationalDomain.h" 33 #include "RelationalAccess/ISchema.h" 34 #include "RelationalAccess/IQuery.h" 35 #include "RelationalAccess/ICursor.h" 36 #include "RelationalAccess/IConnection.h" 37 #include "CoralBase/AttributeList.h" 38 #include "CoralBase/Attribute.h" 39 #include "CoralKernel/Context.h" 115 std::shared_ptr<RunInfo> pRunInfo ;
126 pRunInfo = std::make_shared<RunInfo>();
136 connection.configure();
146 coral::AttributeList conditionData;
147 conditionData.extend<
int>(
"n_run" );
148 conditionData[0].data<
int>() = runNumber;
153 coral::IQuery* queryV = schema.newQuery();
155 queryV->addToTableList(tableToRead_fed);
156 queryV->addToOutputList(tableToRead_fed +
"." + columnToRead_val, columnToRead_val);
159 std::string condition =
tableToRead +
".RUNNUMBER=:n_run AND " +
tableToRead +
".NAME='CMS.LVL0:FED_ENABLE_MASK' AND RUNSESSION_PARAMETER.ID = RUNSESSION_STRING.RUNSESSION_PARAMETER_ID";
161 queryV->setCondition(condition, conditionData);
162 coral::ICursor& cursorV = queryV->execute();
164 if ( cursorV.next() ) {
166 const coral::AttributeList& row = cursorV.currentRow();
176 std::stringstream stream(fed);
180 if ( !(stream >> word) ){
break;}
182 std::stringstream ss(word);
185 ss >> fedNumber >>
val;
188 if( (val & 0001) == 1 && (val != 5) && (val != 7) )
189 pRunInfo->m_fed_in.push_back(fedNumber);
L1RCTOmdsFedVectorProducer(const edm::ParameterSet &)
void start(bool readOnly=true)
def replace(string, replacements)
Transaction & transaction()
std::string connectionString
void setWhatProduced(T *iThis, const es::Label &iLabel=es::Label())
void get(HolderT &iHolder) const
~L1RCTOmdsFedVectorProducer()
std::shared_ptr< RunInfo > ReturnType
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
coral::ISessionProxy & coralSession()
ReturnType produce(const RunInfoRcd &)
void setAuthenticationPath(const std::string &p)
T const * product() const