13 #include <CoralBase/Attribute.h>
14 #include <CoralBase/AttributeList.h>
16 #include "RelationalAccess/SchemaException.h"
17 #include "RelationalAccess/ITransaction.h"
18 #include "RelationalAccess/ITable.h"
19 #include "RelationalAccess/ISchema.h"
20 #include "RelationalAccess/ICursor.h"
21 #include "RelationalAccess/IQuery.h"
32 unsigned int requestcounter,
36 vector< pair<unsigned int, unsigned int> > lb_psk;
42 unique_ptr< coral::IQuery >
q( m_session.nominalSchema().newQuery() );
45 q->addToTableList (
"HLT_PRESCALE_SET_COLL",
"PSC" );
49 bindings.extend<
uint>(
"req");
50 bindings.extend<
string>(
"part");
51 bindings[0].data<
uint>() = requestcounter;
54 string theCondition =
"HPSC_PARTITION=:part and :req>=0";
56 q->setCondition( theCondition, bindings );
60 attList.extend<
int>(
"PSC.HPSC_LB" );
61 attList.extend<
int>(
"PSC.HPSC_HLTPSK" );
65 q->addToOrderList(
"PSC.HPSC_LB" );
71 coral::ICursor&
cursor =
q->execute();
76 int lb =
row[
"PSC.HPSC_LB"].data<
int>();
77 int psk =
row[
"PSC.HPSC_HLTPSK"].data<
int>();
78 lb_psk.push_back( make_pair(
lb, psk) );
82 for(
uint i=0;
i< lb_psk.size();
i++) {
88 TRG_MSG_ERROR(
"HLTPrescaleSetCollectionLoader: caught exception: " <<
e.what());
105 bool loadsuccess =
true;
110 if(psinfo.pss!=0)
continue;
114 psinfo.pss->setId(psinfo.psk);
115 bool loadpss = pssloader.
load(*psinfo.pss);
118 TRG_MSG_ERROR(
"HLTPrescaleSetCollectionLoader::load(): Could not load HLT Prescales for key " << psinfo.psk);