Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:52:24

0001 #include "CondTools/RunInfo/interface/L1TriggerScalerRead.h"
0002 
0003 #include "RelationalAccess/ISession.h"
0004 #include "RelationalAccess/ITransaction.h"
0005 #include "RelationalAccess/ISchema.h"
0006 #include "RelationalAccess/ITable.h"
0007 #include "RelationalAccess/ITableDataEditor.h"
0008 #include "RelationalAccess/TableDescription.h"
0009 #include "RelationalAccess/IQuery.h"
0010 #include "RelationalAccess/ICursor.h"
0011 #include "CoralBase/AttributeList.h"
0012 #include "CoralBase/Attribute.h"
0013 #include "CoralBase/AttributeSpecification.h"
0014 //#include "SealBase/TimeInfo.h"
0015 
0016 #include "CondCore/CondDB/interface/Time.h"
0017 
0018 #include "CoralBase/TimeStamp.h"
0019 
0020 #include "boost/date_time/posix_time/posix_time.hpp"
0021 #include "boost/date_time.hpp"
0022 
0023 #include <iostream>
0024 #include <stdexcept>
0025 #include <vector>
0026 #include <cmath>
0027 
0028 L1TriggerScalerRead::L1TriggerScalerRead(
0029 
0030     const std::string& connectionString, const std::string& user, const std::string& pass)
0031     : TestBase(),
0032 
0033       m_connectionString(connectionString),
0034       m_user(user),
0035       m_pass(pass) {
0036   m_tableToDrop = "";
0037   //  m_tableToRead="";
0038   //m_columnToRead="";
0039 }
0040 
0041 L1TriggerScalerRead::~L1TriggerScalerRead() {}
0042 
0043 void L1TriggerScalerRead::run() {}
0044 
0045 void L1TriggerScalerRead::dropTable(const std::string& table) {
0046   m_tableToDrop = table;
0047   coral::ISession* session = this->connect(m_connectionString, m_user, m_pass);
0048   session->transaction().start();
0049   std::cout << "connected succesfully to omds" << std::endl;
0050   coral::ISchema& schema = session->nominalSchema();
0051   schema.dropIfExistsTable(m_tableToDrop);
0052 }
0053 
0054 std::vector<L1TriggerScaler::Lumi> L1TriggerScalerRead::readData(const int r_number) {
0055   //  m_tableToRead = table; // to be  cms_runinfo.runsession_parameter
0056   // m_columnToRead= column;  // to be string_value;
0057 
0058   /* query to execute
0059 select * from runsession_parameter where string_value like '%[%' and name like 'CMS.TR%' order by time;
0060 
0061 % gets you the parameters of l1 trg
0062 select * from runsession_parameter where string_value like '%[%' and name like 'CMS.TR%' and runnumber=51384 order by time;
0063 
0064 %what is the type?
0065 select * from runsession_parameter_meta where name like 'CMS.TRG:GTLumiSegInfo';
0066 
0067 %what is the table for that type?
0068 select * from runsession_type_meta where type like 'rcms.fm.fw.parameter.type.VectorT';
0069 
0070 % give me the data... value_id is the parent_id for the element
0071 select * from runsession_vector where runsession_parameter_id = 3392114;
0072 
0073 % where is the table for that element type?
0074 select * from runsession_type_meta where type like 'rcms.fm.fw.parameter.type.IntegerT';
0075 
0076 % what is the value of the element (of the vector)
0077 select * from runsession_integer where parent_id = 3392118;
0078 
0079 */
0080 
0081   /* let's begin with a query to obtain the number of lumi section and the corresponding string value:
0082 select string_value from runsession_parameter where string_value like '%[51384]' and name='CMS.TRG:GTLumiSegInfo' and runnumber=51384 order by time;   
0083 
0084 */
0085 
0086   std::cout << "entering readData" << std::endl;
0087   coral::ISession* session = this->connect(m_connectionString, m_user, m_pass);
0088   session->transaction().start();
0089   std::cout << "starting session " << std::endl;
0090   coral::ISchema& schema = session->nominalSchema();
0091   std::cout << " accessing schema " << std::endl;
0092 
0093   // queryI to access the string_format_value
0094   coral::IQuery* query0 = schema.tableHandle("RUNSESSION_PARAMETER").newQuery();
0095   std::cout << "table handling " << std::endl;
0096   query0->addToOutputList("RUNSESSION_PARAMETER.STRING_VALUE", "STRING_VALUE");
0097 
0098   std::string condition0 =
0099       "RUNSESSION_PARAMETER.RUNNUMBER=:n_run  AND  RUNSESSION_PARAMETER.NAME='CMS.TRG:GTLumiSegInfo_format'";
0100   coral::AttributeList conditionData0;
0101   conditionData0.extend<int>("n_run");
0102   query0->setCondition(condition0, conditionData0);
0103   conditionData0[0].data<int>() = r_number;
0104   coral::ICursor& cursor0 = query0->execute();
0105 
0106   std::vector<L1TriggerScaler::Lumi> l1triggerscaler_array;
0107 
0108   std::string string_format;
0109   while (cursor0.next() != 0) {
0110     const coral::AttributeList& row = cursor0.currentRow();
0111     std::cout << " entering the query == " << std::endl;
0112     string_format = row["STRING_VALUE"].data<std::string>();
0113 
0114     std::cout << " string value extracted == " << string_format << std::endl;
0115   }
0116 
0117   // queryI to access the id_value
0118   coral::IQuery* queryI = schema.tableHandle("RUNSESSION_PARAMETER").newQuery();
0119 
0120   //  queryI->addToTableList( m_tableToRead );
0121   std::cout << "table handling " << std::endl;
0122   // implemating the query here.......
0123   //  queryI->addToOutputList("RUNSESSION_PARAMETER.STRING_VALUE" , "STRING_VALUE");
0124   queryI->addToOutputList("RUNSESSION_PARAMETER.ID", "ID");
0125   // to add the starting time of the lumisection
0126   queryI->addToOutputList("RUNSESSION_PARAMETER.TIME", "TIME");
0127 
0128   //  condition
0129   std::string condition =
0130       "RUNSESSION_PARAMETER.RUNNUMBER=:n_run  AND  RUNSESSION_PARAMETER.NAME LIKE 'CMS.TRG:GTLumiSegInfo%' ORDER BY "
0131       "TIME ";  //AND RUNSESSION_PARAMETER.STRING_VALUE LIKE '%[%'  ORDER BY TIME";
0132   // controllare...................
0133   coral::AttributeList conditionData;
0134   conditionData.extend<int>("n_run");
0135   queryI->setCondition(condition, conditionData);
0136   conditionData[0].data<int>() = r_number;
0137   coral::ICursor& cursorI = queryI->execute();
0138 
0139   std::vector<std::pair<int, long long> >
0140       v_vid;  // parent_id for value_id corresponding to each memeber of the lumi object, paired with his corresponding index to diceded the type
0141 
0142   if (cursorI.next() == 0) {
0143     std::cout << " run " << r_number << " not full  " << std::endl;
0144   }
0145   while (cursorI.next() != 0) {
0146     // 1 cicle for each lumi
0147     L1TriggerScaler::Lumi Itemp;
0148     // if cursor is null  setting null values
0149     Itemp.m_runnumber = r_number;
0150     // initializing the date string ...
0151     Itemp.m_date = "0";
0152     Itemp.m_string_format = string_format;
0153     const coral::AttributeList& row = cursorI.currentRow();
0154     std::cout << " entering the query == " << std::endl;
0155     //      Itemp.m_string_value= row["STRING_VALUE"].data<std::string>();
0156 
0157     //  std::cout<< " string value extracted == " << Itemp.m_string_value  << std::endl;
0158     Itemp.m_lumi_id = row["ID"].data<long long>();
0159     std::cout << " id value extracted == " << Itemp.m_lumi_id
0160               << std::endl;  // now we have the id and we  can search and fill the lumi odject
0161     // retrieving all the value_id one for each member of the lumi scaler
0162 
0163     coral::TimeStamp st = row["TIME"].data<coral::TimeStamp>();
0164     int year = st.year();
0165     int month = st.month();
0166     int day = st.day();
0167     int hour = st.hour();
0168 
0169     int minute = st.minute();
0170     int second = st.second();
0171     long nanosecond = st.nanosecond();
0172     std::cout << "  start time time extracted == "
0173               << "-->year " << year << "-- month " << month << "-- day " << day << "-- hour " << hour << "-- minute "
0174               << minute << "-- second " << second << std::endl;
0175     boost::gregorian::date dt(year, month, day);
0176     boost::posix_time::time_duration td(hour, minute, second, nanosecond / 1000);
0177     boost::posix_time::ptime pt(dt, td);
0178     Itemp.m_start_time = boost::posix_time::to_iso_extended_string(pt);
0179     std::cout << " time extracted == " << Itemp.m_start_time << std::endl;
0180 
0181     coral::IQuery* queryII = schema.newQuery();
0182     queryII->addToOutputList("RUNSESSION_VECTOR.VALUE_ID", "VALUE_ID");
0183     queryII->addToOutputList("RUNSESSION_VECTOR.VALUE_INDEX", "VALUE_INDEX");
0184 
0185     queryII->addToTableList("RUNSESSION_VECTOR");
0186     std::string condition2 = "RUNSESSION_VECTOR.PARENT_ID=:n_vid";
0187     coral::AttributeList conditionData2;
0188     conditionData2.extend<long>("n_vid");
0189     queryII->setCondition(condition2, conditionData2);
0190     conditionData2[0].data<long>() = Itemp.m_lumi_id + 1;
0191     coral::ICursor& cursorII = queryII->execute();
0192     while (cursorII.next() != 0) {
0193       const coral::AttributeList& row = cursorII.currentRow();
0194       std::cout << " entering the queryII == " << std::endl;
0195       long long vid_val = row["VALUE_ID"].data<long long>();
0196       int vid_id = (int)row["VALUE_INDEX"].data<long long>();
0197       v_vid.push_back(std::make_pair(vid_id, vid_val));
0198       std::cout << " value_id index extracted == " << v_vid.back().first << std::endl;
0199       std::cout << " value_id value extracted == " << v_vid.back().second << std::endl;
0200       // depending from the index, fill the object....
0201 
0202       coral::AttributeList conditionData3;
0203       conditionData3.extend<int>("n_vid_val");
0204       conditionData3[0].data<int>() = vid_val;
0205       switch (vid_id) {
0206         case 0: {
0207           std::cout << " caso 0" << std::endl;
0208           coral::IQuery* queryIII = schema.newQuery();
0209           queryIII->addToOutputList("RUNSESSION_INTEGER.VALUE", "VALUE");
0210           queryIII->addToTableList("RUNSESSION_INTEGER");
0211           std::string condition3 = "RUNSESSION_INTEGER.PARENT_ID=:n_vid_val";
0212           queryIII->setCondition(condition3, conditionData3);
0213           coral::ICursor& cursorIII = queryIII->execute();
0214 
0215           while (cursorIII.next() != 0) {
0216             const coral::AttributeList& row = cursorIII.currentRow();
0217             //   std::cout<< " entering the queryIII  " << std::endl;
0218             Itemp.m_rn = row["VALUE"].data<long long>();
0219             std::cout << " run extracted == " << Itemp.m_rn << std::endl;
0220           }
0221           delete queryIII;
0222         } break;
0223         case 1: {
0224           std::cout << " caso 1" << std::endl;
0225           coral::IQuery* queryIII = schema.newQuery();
0226           queryIII->addToOutputList("RUNSESSION_INTEGER.VALUE", "VALUE");
0227           queryIII->addToTableList("RUNSESSION_INTEGER");
0228           std::string condition3 = "RUNSESSION_INTEGER.PARENT_ID=:n_vid_val";
0229           queryIII->setCondition(condition3, conditionData3);
0230           coral::ICursor& cursorIII = queryIII->execute();
0231           while (cursorIII.next() != 0) {
0232             const coral::AttributeList& row = cursorIII.currentRow();
0233             std::cout << " entering the queryIII  " << std::endl;
0234             Itemp.m_lumisegment = row["VALUE"].data<long long>();
0235             std::cout << " lumisegment extracted == " << Itemp.m_lumisegment << std::endl;
0236           }
0237           delete queryIII;
0238         } break;
0239         case 2: {
0240           std::cout << " caso 2" << std::endl;
0241           /*
0242            coral::IQuery* queryIII = schema.newQuery(); 
0243            queryIII->addToOutputList("RUNSESSION_STRING.VALUE" , "VALUE");
0244            queryIII->addToTableList("RUNSESSION_STRING");
0245            std::string  condition3 =  "RUNSESSION_STRING.PARENT_ID=:n_vid_val";
0246            queryIII->setCondition( condition3, conditionData3 );
0247            coral::ICursor& cursorIII = queryIII->execute();
0248            while ( cursorIII.next()!=0 ) {
0249            const coral::AttributeList& row = cursorIII.currentRow();
0250            std::cout<< " entering the queryIII  " << std::endl;
0251            Itemp.m_version = row["VALUE"].data<std::string>();
0252            std::cout<< "version extracted == " << Itemp.m_version << std::endl;
0253            
0254            }
0255            delete queryIII;
0256          */
0257         } break;
0258         case 3: {
0259           std::cout << " caso 3" << std::endl;
0260           /*
0261                coral::IQuery* queryIII = schema.newQuery(); 
0262            queryIII->addToOutputList("RUNSESSION_STRING.VALUE" , "VALUE");
0263            queryIII->addToTableList("RUNSESSION_STRING");
0264            std::string  condition3 =  "RUNSESSION_STRING.PARENT_ID=:n_vid_val";
0265            queryIII->setCondition( condition3, conditionData3 );
0266            coral::ICursor& cursorIII = queryIII->execute();
0267            while ( cursorIII.next()!=0 ) {
0268            const coral::AttributeList& row = cursorIII.currentRow();
0269            std::cout<< " entering the queryIII  " << std::endl;
0270            Itemp.m_context = row["VALUE"].data<std::string>();
0271            std::cout<< " context extracted == " << Itemp.m_context << std::endl;
0272            
0273            }
0274            delete queryIII;
0275          */
0276         } break;
0277         case 4: {
0278           std::cout << " caso 4" << std::endl;
0279           coral::IQuery* queryIII = schema.newQuery();
0280           queryIII->addToOutputList("RUNSESSION_DATE.VALUE", "VALUE");
0281           queryIII->addToTableList("RUNSESSION_DATE");
0282           std::string condition3 = "RUNSESSION_DATE.PARENT_ID=:n_vid_val";
0283           queryIII->setCondition(condition3, conditionData3);
0284           coral::ICursor& cursorIII = queryIII->execute();
0285           if (cursorIII.next() != 0) {
0286             const coral::AttributeList& row = cursorIII.currentRow();
0287             std::cout << " entering the queryIII  " << std::endl;
0288             coral::TimeStamp ts = row["VALUE"].data<coral::TimeStamp>();
0289             int year = ts.year();
0290             int month = ts.month();
0291             int day = ts.day();
0292             int hour = ts.hour();
0293 
0294             int minute = ts.minute();
0295             int second = ts.second();
0296             long nanosecond = ts.nanosecond();
0297             std::cout << "  start time time extracted == "
0298                       << "-->year " << year << "-- month " << month << "-- day " << day << "-- hour " << hour
0299                       << "-- minute " << minute << "-- second " << second << std::endl;
0300             boost::gregorian::date dt(year, month, day);
0301             boost::posix_time::time_duration td(hour, minute, second, nanosecond / 1000);
0302             boost::posix_time::ptime pt(dt, td);
0303             Itemp.m_date = boost::posix_time::to_iso_extended_string(pt);
0304             std::cout << " date extracted == " << Itemp.m_date << std::endl;
0305           } else {
0306             std::cout << "date  extracted == " << Itemp.m_date << std::endl;
0307           }
0308           delete queryIII;
0309         } break;
0310         case 5: {
0311           std::cout << " caso 5" << std::endl;
0312           coral::IQuery* queryIII = schema.newQuery();
0313           queryIII->addToOutputList("RUNSESSION_INTEGER.VALUE", "VALUE");
0314           queryIII->addToTableList("RUNSESSION_INTEGER");
0315           std::string condition3 = "RUNSESSION_INTEGER.PARENT_ID=:n_vid_val";
0316           queryIII->setCondition(condition3, conditionData3);
0317           coral::ICursor& cursorIII = queryIII->execute();
0318           int i = 0;
0319           while (cursorIII.next() != 0) {
0320             const coral::AttributeList& row = cursorIII.currentRow();
0321             std::cout << " entering the queryIII  " << std::endl;
0322             int v = (int)row["VALUE"].data<long long>();
0323             Itemp.m_GTAlgoCounts.push_back(v);
0324             // std::cout<< " m_GTAlgoCounts["<< i << "]" << " extracted == " << v << std::endl;
0325             i++;
0326           }
0327 
0328           delete queryIII;
0329 
0330         }
0331 
0332         break;
0333         case 6: {
0334           std::cout << " caso 6" << std::endl;
0335           coral::IQuery* queryIII = schema.newQuery();
0336           queryIII->addToOutputList("RUNSESSION_FLOAT.VALUE", "VALUE");
0337           queryIII->addToTableList("RUNSESSION_FLOAT");
0338           std::string condition3 = "RUNSESSION_FLOAT.PARENT_ID=:n_vid_val";
0339           queryIII->setCondition(condition3, conditionData3);
0340           coral::ICursor& cursorIII = queryIII->execute();
0341           int i = 0;
0342           while (cursorIII.next() != 0) {
0343             const coral::AttributeList& row = cursorIII.currentRow();
0344             std::cout << " entering the queryIII  " << std::endl;
0345             float v = (float)row["VALUE"].data<double>();
0346             Itemp.m_GTAlgoRates.push_back(v);
0347             // std::cout<< " m_GTAlgoRates["<< i << "]" << " extracted == " << v << std::endl;
0348             i++;
0349           }
0350 
0351           delete queryIII;
0352 
0353         }
0354 
0355         break;
0356 
0357         case 7: {
0358           std::cout << " caso 7" << std::endl;
0359           coral::IQuery* queryIII = schema.newQuery();
0360           queryIII->addToOutputList("RUNSESSION_INTEGER.VALUE", "VALUE");
0361           queryIII->addToTableList("RUNSESSION_INTEGER");
0362           std::string condition3 = "RUNSESSION_INTEGER.PARENT_ID=:n_vid_val";
0363           queryIII->setCondition(condition3, conditionData3);
0364           coral::ICursor& cursorIII = queryIII->execute();
0365           int i = 0;
0366           while (cursorIII.next() != 0) {
0367             const coral::AttributeList& row = cursorIII.currentRow();
0368             std::cout << " entering the queryIII  " << std::endl;
0369             int v = (int)row["VALUE"].data<long long>();
0370             Itemp.m_GTAlgoPrescaling.push_back(v);
0371             // std::cout<< " m_GTAlgoPrescaling["<< i << "]" << " extracted == " << v << std::endl;
0372             i++;
0373           }
0374 
0375           delete queryIII;
0376 
0377         }
0378 
0379         break;
0380         case 8: {
0381           std::cout << " caso 8" << std::endl;
0382           coral::IQuery* queryIII = schema.newQuery();
0383           queryIII->addToOutputList("RUNSESSION_INTEGER.VALUE", "VALUE");
0384           queryIII->addToTableList("RUNSESSION_INTEGER");
0385           std::string condition3 = "RUNSESSION_INTEGER.PARENT_ID=:n_vid_val";
0386           queryIII->setCondition(condition3, conditionData3);
0387           coral::ICursor& cursorIII = queryIII->execute();
0388           int i = 0;
0389           while (cursorIII.next() != 0) {
0390             const coral::AttributeList& row = cursorIII.currentRow();
0391             std::cout << " entering the queryIII  " << std::endl;
0392             int v = (int)row["VALUE"].data<long long>();
0393             Itemp.m_GTTechCounts.push_back(v);
0394             // std::cout<< " m_GTTechCounts["<< i << "]" << " extracted == " << v << std::endl;
0395             i++;
0396           }
0397 
0398           delete queryIII;
0399 
0400         }
0401 
0402         break;
0403         case 9: {
0404           std::cout << " caso 9" << std::endl;
0405           coral::IQuery* queryIII = schema.newQuery();
0406           queryIII->addToOutputList("RUNSESSION_FLOAT.VALUE", "VALUE");
0407           queryIII->addToTableList("RUNSESSION_FLOAT");
0408           std::string condition3 = "RUNSESSION_FLOAT.PARENT_ID=:n_vid_val";
0409           queryIII->setCondition(condition3, conditionData3);
0410           coral::ICursor& cursorIII = queryIII->execute();
0411           int i = 0;
0412           while (cursorIII.next() != 0) {
0413             const coral::AttributeList& row = cursorIII.currentRow();
0414             std::cout << " entering the queryIII  " << std::endl;
0415             float v = (float)row["VALUE"].data<double>();
0416             Itemp.m_GTTechRates.push_back(v);
0417             // std::cout<< " m_GTTechRates["<< i << "]" << " extracted == " << v << std::endl;
0418             i++;
0419           }
0420 
0421           delete queryIII;
0422 
0423         }
0424 
0425         break;
0426         case 10: {
0427           std::cout << " caso 10" << std::endl;
0428           coral::IQuery* queryIII = schema.newQuery();
0429           queryIII->addToOutputList("RUNSESSION_INTEGER.VALUE", "VALUE");
0430           queryIII->addToTableList("RUNSESSION_INTEGER");
0431           std::string condition3 = "RUNSESSION_INTEGER.PARENT_ID=:n_vid_val";
0432           queryIII->setCondition(condition3, conditionData3);
0433           coral::ICursor& cursorIII = queryIII->execute();
0434           int i = 0;
0435           while (cursorIII.next() != 0) {
0436             const coral::AttributeList& row = cursorIII.currentRow();
0437             std::cout << " entering the queryIII  " << std::endl;
0438             int v = (int)row["VALUE"].data<long long>();
0439             Itemp.m_GTTechPrescaling.push_back(v);
0440             //  std::cout<< " m_GTTechPrescaling["<< i << "]" << " extracted == " << v << std::endl;
0441             i++;
0442           }
0443 
0444           delete queryIII;
0445 
0446         }
0447 
0448         break;
0449         case 11: {
0450           std::cout << " caso 11" << std::endl;
0451           coral::IQuery* queryIII = schema.newQuery();
0452           queryIII->addToOutputList("RUNSESSION_INTEGER.VALUE", "VALUE");
0453           queryIII->addToTableList("RUNSESSION_INTEGER");
0454           std::string condition3 = "RUNSESSION_INTEGER.PARENT_ID=:n_vid_val";
0455           queryIII->setCondition(condition3, conditionData3);
0456           coral::ICursor& cursorIII = queryIII->execute();
0457           int i = 0;
0458           while (cursorIII.next() != 0) {
0459             const coral::AttributeList& row = cursorIII.currentRow();
0460             std::cout << " entering the queryIII  " << std::endl;
0461             int v = (int)row["VALUE"].data<long long>();
0462             Itemp.m_GTPartition0TriggerCounts.push_back(v);
0463             //   std::cout<< " m_GTPartition0TriggerCounts"<< i << "]" << " extracted == " << v << std::endl;
0464             i++;
0465           }
0466 
0467           delete queryIII;
0468 
0469         }
0470 
0471         break;
0472         case 12: {
0473           std::cout << " caso 12" << std::endl;
0474           coral::IQuery* queryIII = schema.newQuery();
0475           queryIII->addToOutputList("RUNSESSION_FLOAT.VALUE", "VALUE");
0476           queryIII->addToTableList("RUNSESSION_FLOAT");
0477           std::string condition3 = "RUNSESSION_FLOAT.PARENT_ID=:n_vid_val";
0478           queryIII->setCondition(condition3, conditionData3);
0479           coral::ICursor& cursorIII = queryIII->execute();
0480           int i = 0;
0481           while (cursorIII.next() != 0) {
0482             const coral::AttributeList& row = cursorIII.currentRow();
0483             std::cout << " entering the queryIII  " << std::endl;
0484             float v = (float)row["VALUE"].data<double>();
0485             Itemp.m_GTPartition0TriggerRates.push_back(v);
0486             // std::cout<< " m_GTPartition0TriggerRates["<< i << "]" << " extracted == " << v << std::endl;
0487             i++;
0488           }
0489 
0490           delete queryIII;
0491 
0492         }
0493 
0494         break;
0495         case 13: {
0496           std::cout << " caso 13" << std::endl;
0497           coral::IQuery* queryIII = schema.newQuery();
0498           queryIII->addToOutputList("RUNSESSION_INTEGER.VALUE", "VALUE");
0499           queryIII->addToTableList("RUNSESSION_INTEGER");
0500           std::string condition3 = "RUNSESSION_INTEGER.PARENT_ID=:n_vid_val";
0501           queryIII->setCondition(condition3, conditionData3);
0502           coral::ICursor& cursorIII = queryIII->execute();
0503           int i = 0;
0504           while (cursorIII.next() != 0) {
0505             const coral::AttributeList& row = cursorIII.currentRow();
0506             std::cout << " entering the queryIII  " << std::endl;
0507             int v = (int)row["VALUE"].data<long long>();
0508             Itemp.m_GTPartition0DeadTime.push_back(v);
0509             // std::cout<< "  m_GTPartition0DeadTime"<< i << "]" << " extracted == " << v << std::endl;
0510             i++;
0511           }
0512 
0513           delete queryIII;
0514 
0515         }
0516 
0517         break;
0518         case 14: {
0519           std::cout << " caso 14" << std::endl;
0520           coral::IQuery* queryIII = schema.newQuery();
0521           queryIII->addToOutputList("RUNSESSION_FLOAT.VALUE", "VALUE");
0522           queryIII->addToTableList("RUNSESSION_FLOAT");
0523           std::string condition3 = "RUNSESSION_FLOAT.PARENT_ID=:n_vid_val";
0524           queryIII->setCondition(condition3, conditionData3);
0525           coral::ICursor& cursorIII = queryIII->execute();
0526           int i = 0;
0527           while (cursorIII.next() != 0) {
0528             const coral::AttributeList& row = cursorIII.currentRow();
0529             std::cout << " entering the queryIII  " << std::endl;
0530             float v = (float)row["VALUE"].data<double>();
0531             Itemp.m_GTPartition0DeadTimeRatio.push_back(v);
0532             // std::cout<< " m_GTPartition0DeadTimeRatio["<< i << "]" << " extracted == " << v << std::endl;
0533             i++;
0534           }
0535 
0536           delete queryIII;
0537 
0538         }
0539 
0540         break;
0541 
0542         default:
0543           std::cout << "index out of range" << std::endl;
0544           break;
0545       }
0546 
0547       // l1triggerscaler_array.push_back(Itemp);
0548     }
0549     delete queryII;
0550 
0551     l1triggerscaler_array.push_back(Itemp);
0552   }
0553 
0554   delete queryI;
0555 
0556   session->transaction().commit();
0557   delete session;
0558 
0559   // std::cout<<"filling the lumi array to pass to the object" << std::endl;
0560 
0561   return l1triggerscaler_array;
0562 }