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" 123 auto pRunInfo = std::make_unique<RunInfo>();
133 connection.configure();
143 coral::AttributeList conditionData;
144 conditionData.extend<
int>(
"n_run" );
145 conditionData[0].data<
int>() = runNumber;
150 coral::IQuery* queryV = schema.newQuery();
152 queryV->addToTableList(tableToRead_fed);
153 queryV->addToOutputList(tableToRead_fed +
"." + columnToRead_val, columnToRead_val);
156 std::string condition =
tableToRead +
".RUNNUMBER=:n_run AND " +
tableToRead +
".NAME='CMS.LVL0:FED_ENABLE_MASK' AND RUNSESSION_PARAMETER.ID = RUNSESSION_STRING.RUNSESSION_PARAMETER_ID";
158 queryV->setCondition(condition, conditionData);
159 coral::ICursor& cursorV = queryV->execute();
161 if ( cursorV.next() ) {
163 const coral::AttributeList& row = cursorV.currentRow();
173 std::stringstream stream(fed);
177 if ( !(stream >> word) ){
break;}
179 std::stringstream ss(word);
182 ss >> fedNumber >>
val;
185 if( (val & 0001) == 1 && (val != 5) && (val != 7) )
186 pRunInfo->m_fed_in.push_back(fedNumber);
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
L1RCTOmdsFedVectorProducer(const edm::ParameterSet &)
std::unique_ptr< RunInfo > ReturnType
void start(bool readOnly=true)
def replace(string, replacements)
Transaction & transaction()
std::string connectionString
~L1RCTOmdsFedVectorProducer() override
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
coral::ISessionProxy & coralSession()
ReturnType produce(const RunInfoRcd &)
void setAuthenticationPath(const std::string &p)
T const * product() const
bool get(HolderT &iHolder) const