16 #include <CoralBase/Attribute.h> 
   17 #include <CoralBase/AttributeList.h> 
   19 #include "RelationalAccess/ITable.h" 
   20 #include "RelationalAccess/ISchema.h" 
   21 #include "RelationalAccess/ICursor.h" 
   22 #include "RelationalAccess/IQuery.h" 
   32    unsigned int smk = frame.
smk();
 
   33    if(
smk==0) 
return false;
 
   37    typedef pair<unsigned int, unsigned int> lbnpsk_t;
 
   47       set<unsigned int> connected_psk = GetConnectedPSKs(
smk);
 
   60       bool all_connected(
true);
 
   62       for( lbnpsk_t lbnpsk: reqested_prescale_keys) {
 
   63          unsigned int psk = lbnpsk.second;
 
   64          bool is_connected = psk!=0 && connected_psk.find(psk)!=connected_psk.end();
 
   65          TRG_MSG_INFO(
"LB " << setw(3) << right << lbnpsk.first << 
" : " << lbnpsk.second);
 
   67             TRG_MSG_ERROR(
"prescale key " << lbnpsk.second << 
" is not connected to SMK");
 
   68             all_connected = 
false;
 
   87                pair<bool, float> rrps = 
ch->rerun_prescale(
"");
 
   96          TRG_MSG_ERROR(
"Not all requested HLT prescale keys are connected to the SMK");
 
   98          for(
int psk: connected_psk) {
 
  101          TRG_MSG_INFO(
"these HLT PSK are connected to SMK " << 
smk << 
": " << 
s.str());
 
  102          throw runtime_error(
"HLTFrameLoader: not all requested HLT prescale keys are connected to the SMK");
 
  107         bool needMerging(
false);
 
  115           HLTTEUtils::mergeHLTChainList2(frame);
 
  136    unique_ptr< coral::IQuery > 
q( m_session.nominalSchema().tableHandle( 
"SUPER_MASTER_TABLE").newQuery() );
 
  138    std::string cond = 
"SMT_ID = :smId";
 
  140    bindings.extend<
int>(
"smId");
 
  141    bindings[0].data<
int>() = frame.
smk();
 
  142    q->setCondition( cond, bindings );
 
  145    attList.extend<std::string>( 
"SMT_NAME" );
 
  146    attList.extend<
int>        ( 
"SMT_VERSION" );
 
  147    attList.extend<std::string>( 
"SMT_COMMENT" );
 
  151    coral::ICursor& 
cursor = 
q->execute();
 
  154       string name    = 
row[
"SMT_NAME"   ].data<std::string>();
 
  156       string comment = 
row[
"SMT_COMMENT"].data<std::string>();
 
  168    set<unsigned int> connected_psks;
 
  171    unique_ptr< coral::IQuery > 
q( m_session.nominalSchema().newQuery() );
 
  173    q->addToTableList( 
"SUPER_MASTER_TABLE",    
"SMT"    );
 
  174    q->addToTableList( 
"HLT_MASTER_TABLE",      
"HMT"    );
 
  175    q->addToTableList( 
"HLT_TRIGGER_MENU",      
"HTM"    );
 
  176    q->addToTableList( 
"HLT_TM_TO_PS",          
"HM2PS"  );
 
  179    bindings.extend<
int>(
"smid");
 
  180    bindings[0].data<
int>() = 
smk;
 
  182    string theCondition(
"");
 
  183    theCondition += string( 
" SMT.SMT_ID     = :smid");
 
  184    theCondition += string( 
" AND SMT.SMT_HLT_MASTER_TABLE_ID = HMT.HMT_ID"       );
 
  185    theCondition += string( 
" AND HMT.HMT_TRIGGER_MENU_ID = HTM.HTM_ID"           );
 
  186    theCondition += string( 
" AND HTM.HTM_ID = HM2PS.HTM2PS_TRIGGER_MENU_ID"      );
 
  189    q->setCondition( theCondition, bindings );
 
  193    attList.extend<
int>( 
"HM2PS.HTM2PS_PRESCALE_SET_ID" );
 
  196    coral::ICursor& 
cursor = 
q->execute();
 
  200       int psk = 
row[
"HM2PS.HTM2PS_PRESCALE_SET_ID"].data<
int>();
 
  201       connected_psks.insert(psk);
 
  207    for(
int psk : connected_psks)
 
  210    TRG_MSG_INFO( 
"To SMK " << 
smk << 
" connected HLT prescale keys are " << 
ss.str() );
 
  212    return connected_psks;