20 #include <CoralBase/Attribute.h> 
   21 #include <CoralBase/AttributeList.h> 
   23 #include "RelationalAccess/SchemaException.h" 
   24 #include "RelationalAccess/ITransaction.h" 
   25 #include "RelationalAccess/ITable.h" 
   26 #include "RelationalAccess/ISchema.h" 
   27 #include "RelationalAccess/ICursor.h" 
   28 #include "RelationalAccess/IQuery.h" 
   38    msg() << 
"CaloSinCosLoader started loading data via ID. ID = " << cscTarget.
id() << std::endl;
 
   42       msg() << 
"Loading CaloSinCos " << cscTarget.
id() << std::endl;
 
   44       coral::ITable& 
table = 
m_session.nominalSchema().tableHandle( 
"L1_CALO_SIN_COS");
 
   46       query->setRowCacheSize( 5 );
 
   49       std::string 
condition = 
"L1CSC_ID = :l1cscid";
 
   53       boundvars.extend<
int>(
"l1cscid");
 
   54       boundvars[0].data<
int>() = (
int)cscTarget.
id();
 
   60       attList.extend<
int>( 
"L1CSC_VERSION" );
 
   61       attList.extend<std::string>( 
"L1CSC_NAME" ); 
 
   62       attList.extend<
int>( 
"L1CSC_VAL1" ); 
 
   63       attList.extend<
int>( 
"L1CSC_VAL2" ); 
 
   64       attList.extend<
int>( 
"L1CSC_VAL3" ); 
 
   65       attList.extend<
int>( 
"L1CSC_VAL4" ); 
 
   66       attList.extend<
int>( 
"L1CSC_VAL5" ); 
 
   67       attList.extend<
int>( 
"L1CSC_VAL6" );
 
   68       attList.extend<
int>( 
"L1CSC_VAL7" );      
 
   69       attList.extend<
int>( 
"L1CSC_VAL8" );
 
   70       attList.extend<
int>( 
"L1CSC_ETA_MIN" ); 
 
   71       attList.extend<
int>( 
"L1CSC_ETA_MAX" );
 
   72       attList.extend<
int>( 
"L1CSC_PHI_MIN" );
 
   73       attList.extend<
int>( 
"L1CSC_PHI_MAX" );
 
   74       query->defineOutput(attList);
 
   76       query->addToOutputList( 
"L1CSC_VERSION" );
 
   77       query->addToOutputList( 
"L1CSC_NAME" );
 
   78       query->addToOutputList( 
"L1CSC_VAL1" );
 
   79       query->addToOutputList( 
"L1CSC_VAL2" );
 
   80       query->addToOutputList( 
"L1CSC_VAL3" );
 
   81       query->addToOutputList( 
"L1CSC_VAL4" );
 
   82       query->addToOutputList( 
"L1CSC_VAL5" );
 
   83       query->addToOutputList( 
"L1CSC_VAL6" );
 
   84       query->addToOutputList( 
"L1CSC_VAL7" );
 
   85       query->addToOutputList( 
"L1CSC_VAL8" );
 
   86       query->addToOutputList( 
"L1CSC_ETA_MIN" );
 
   87       query->addToOutputList( 
"L1CSC_ETA_MAX" );
 
   88       query->addToOutputList( 
"L1CSC_PHI_MIN" );
 
   89       query->addToOutputList( 
"L1CSC_PHI_MAX" );
 
   91       query->addToOrderList( 
"L1CSC_ID" );
 
   96          msg() << 
"CaloSinCosLoader >> No such deadtime exists " << cscTarget.
id() << std::endl;
 
   99          throw std::runtime_error( 
"CaloSinCosLoader >> CaloSinCos not available" );
 
  103       std::string 
name = 
row[
"L1CSC_NAME"].data<std::string>();
 
  104       int version = 
row[
"L1CSC_VERSION"].data<
int>();
 
  105       int val1 = 
row[
"L1CSC_VAL1"].data<
int>();
 
  106       int val2 = 
row[
"L1CSC_VAL2"].data<
int>();
 
  107       int val3 = 
row[
"L1CSC_VAL3"].data<
int>();
 
  108       int val4 = 
row[
"L1CSC_VAL4"].data<
int>();
 
  109       int val5 = 
row[
"L1CSC_VAL5"].data<
int>();
 
  110       int val6 = 
row[
"L1CSC_VAL6"].data<
int>();
 
  111       int val7 = 
row[
"L1CSC_VAL7"].data<
int>();
 
  112       int val8 = 
row[
"L1CSC_VAL8"].data<
int>();
 
  113       int eta_min = 
row[
"L1CSC_ETA_MIN"].data<
int>();
 
  114       int eta_max = 
row[
"L1CSC_ETA_MAX"].data<
int>();
 
  115       int phi_min = 
row[
"L1CSC_PHI_MIN"].data<
int>();
 
  116       int phi_max = 
row[
"L1CSC_PHI_MAX"].data<
int>();
 
  119          msg() << 
"CaloSinCosLoader >> More than one CaloSinCos exists "  
  120                << cscTarget.
id() << std::endl;
 
  123          throw std::runtime_error( 
"CaloSinCosLoader >>  CaloSinCos not available" );
 
  145    } 
catch( 
const coral::SchemaException& 
e ) {
 
  146       msg() << 
"CaloSinCosLoader >> SchemaException: "  
  147             << 
e.what() << std::endl;
 
  151       msg() << 
"CaloSinCosLoader >> Standard C++ exception: " << 
e.what() << std::endl;
 
  155       msg() << 
"CaloSinCosLoader >> unknown C++ exception" << std::endl;