641 session->transaction().start(
true );
642 coral::ISchema&
schema = session->nominalSchema();
643 std::cout <<
">> creating FEB object..." << std::endl;
646 coral::IQuery* queryFVTH1 = schema.newQuery();
647 queryFVTH1->addToTableList(
"RPCFEB");
648 queryFVTH1->addToOutputList(
"RPCFEB.DPID",
"DPID" );
649 queryFVTH1->addToOutputList(
"RPCFEB.CHANGE_DATE",
"TSTAMP" );
650 queryFVTH1->addToOutputList(
"RPCFEB.VTH1",
"VTH1" );
653 coral::IQuery* queryFVTH2 = schema.newQuery();
654 queryFVTH2->addToTableList(
"RPCFEB");
655 queryFVTH2->addToOutputList(
"RPCFEB.DPID",
"DPID" );
656 queryFVTH2->addToOutputList(
"RPCFEB.CHANGE_DATE",
"TSTAMP" );
657 queryFVTH2->addToOutputList(
"RPCFEB.VTH2",
"VTH2" );
660 coral::IQuery* queryFVTH3 = schema.newQuery();
661 queryFVTH3->addToTableList(
"RPCFEB");
662 queryFVTH3->addToOutputList(
"RPCFEB.DPID",
"DPID" );
663 queryFVTH3->addToOutputList(
"RPCFEB.CHANGE_DATE",
"TSTAMP" );
664 queryFVTH3->addToOutputList(
"RPCFEB.VTH3",
"VTH3" );
667 coral::IQuery* queryFVTH4 = schema.newQuery();
668 queryFVTH4->addToTableList(
"RPCFEB");
669 queryFVTH4->addToOutputList(
"RPCFEB.DPID",
"DPID" );
670 queryFVTH4->addToOutputList(
"RPCFEB.CHANGE_DATE",
"TSTAMP" );
671 queryFVTH4->addToOutputList(
"RPCFEB.VTH4",
"VTH4" );
674 coral::IQuery* queryFVMON1 = schema.newQuery();
675 queryFVMON1->addToTableList(
"RPCFEB");
676 queryFVMON1->addToOutputList(
"RPCFEB.DPID",
"DPID" );
677 queryFVMON1->addToOutputList(
"RPCFEB.CHANGE_DATE",
"TSTAMP" );
678 queryFVMON1->addToOutputList(
"RPCFEB.VMON1",
"VMON1" );
681 coral::IQuery* queryFVMON2 = schema.newQuery();
682 queryFVMON2->addToTableList(
"RPCFEB");
683 queryFVMON2->addToOutputList(
"RPCFEB.DPID",
"DPID" );
684 queryFVMON2->addToOutputList(
"RPCFEB.CHANGE_DATE",
"TSTAMP" );
685 queryFVMON2->addToOutputList(
"RPCFEB.VMON2",
"VMON2" );
688 coral::IQuery* queryFVMON3 = schema.newQuery();
689 queryFVMON3->addToTableList(
"RPCFEB");
690 queryFVMON3->addToOutputList(
"RPCFEB.DPID",
"DPID" );
691 queryFVMON3->addToOutputList(
"RPCFEB.CHANGE_DATE",
"TSTAMP" );
692 queryFVMON3->addToOutputList(
"RPCFEB.VMON3",
"VMON3" );
695 coral::IQuery* queryFVMON4 = schema.newQuery();
696 queryFVMON4->addToTableList(
"RPCFEB");
697 queryFVMON4->addToOutputList(
"RPCFEB.DPID",
"DPID" );
698 queryFVMON4->addToOutputList(
"RPCFEB.CHANGE_DATE",
"TSTAMP" );
699 queryFVMON4->addToOutputList(
"RPCFEB.VMON4",
"VMON4" );
702 coral::IQuery* queryFTEMP1 = schema.newQuery();
703 queryFTEMP1->addToTableList(
"RPCFEB");
704 queryFTEMP1->addToOutputList(
"RPCFEB.DPID",
"DPID" );
705 queryFTEMP1->addToOutputList(
"RPCFEB.CHANGE_DATE",
"TSTAMP" );
706 queryFTEMP1->addToOutputList(
"RPCFEB.TEMPERATURE1",
"TEMP1" );
709 coral::IQuery* queryFTEMP2 = schema.newQuery();
710 queryFTEMP2->addToTableList(
"RPCFEB");
711 queryFTEMP2->addToOutputList(
"RPCFEB.DPID",
"DPID" );
712 queryFTEMP2->addToOutputList(
"RPCFEB.CHANGE_DATE",
"TSTAMP" );
713 queryFTEMP2->addToOutputList(
"RPCFEB.TEMPERATURE2",
"TEMP2" );
716 std::vector<RPCObFebmap::Feb_Item> febarray;
717 coral::TimeStamp tlast =
tMIN;
721 std::cout <<
"Processing VTH1..." << std::endl;
722 coral::AttributeList conditionData;
723 conditionData.extend<coral::TimeStamp>(
"tmin" );
724 conditionData.extend<coral::TimeStamp>(
"tmax" );
725 conditionData[
"tmin"].data<coral::TimeStamp>() =
tMIN;
726 conditionData[
"tmax"].data<coral::TimeStamp>() =
tMAX;
727 std::string conditionVTH1 =
"RPCFEB.VTH1 IS NOT NULL AND RPCFEB.CHANGE_DATE >:tmin AND RPCFEB.CHANGE_DATE <:tmax";
728 queryFVTH1->setCondition( conditionVTH1, conditionData );
729 coral::ICursor& cursorFVTH1 = queryFVTH1->execute();
730 while ( cursorFVTH1.next() ) {
733 const coral::AttributeList& row = cursorFVTH1.currentRow();
734 float idoub = row[
"DPID"].data<
float>();
735 int id =
static_cast<int>(idoub);
736 float vth1 = row[
"VTH1"].data<
float>();
737 coral::TimeStamp ts = row[
"TSTAMP"].data<coral::TimeStamp>();
738 int ndate = (ts.day() * 10000) + (ts.month() * 100) + (ts.year()-2000);
739 int ntime = (ts.hour() * 10000) + (ts.minute() * 100) + ts.second();
744 febarray.push_back(Itemp);
747 std::cout <<
">> Processing VTH1..." << std::endl;
748 coral::AttributeList conditionData;
749 conditionData.extend<coral::TimeStamp>(
"tmin" );
750 conditionData[
"tmin"].data<coral::TimeStamp>() =
tMIN;
751 std::string conditionVTH1 =
"RPCFEB.VTH1 IS NOT NULL AND RPCFEB.CHANGE_DATE >:tmin";
752 queryFVTH1->setCondition( conditionVTH1, conditionData );
753 coral::ICursor& cursorFVTH1 = queryFVTH1->execute();
754 while ( cursorFVTH1.next() ) {
757 const coral::AttributeList& row = cursorFVTH1.currentRow();
758 float idoub = row[
"DPID"].data<
float>();
759 int id =
static_cast<int>(idoub);
760 float vth1 = row[
"VTH1"].data<
float>();
761 coral::TimeStamp ts = row[
"TSTAMP"].data<coral::TimeStamp>();
762 int ndate = (ts.day() * 10000) + (ts.month() * 100) + (ts.year()-2000);
763 int ntime = (ts.hour() * 10000) + (ts.minute() * 100) + ts.second();
768 febarray.push_back(Itemp);
774 std::cout <<
"Processing VTH2..." << std::endl;
775 coral::AttributeList conditionData;
776 conditionData.extend<coral::TimeStamp>(
"tmin" );
777 conditionData.extend<coral::TimeStamp>(
"tmax" );
778 conditionData[
"tmin"].data<coral::TimeStamp>() =
tMIN;
779 conditionData[
"tmax"].data<coral::TimeStamp>() =
tMAX;
780 std::string conditionVTH2 =
"RPCFEB.VTH2 IS NOT NULL AND RPCFEB.CHANGE_DATE >:tmin AND RPCFEB.CHANGE_DATE <:tmax";
781 queryFVTH2->setCondition( conditionVTH2, conditionData );
782 coral::ICursor& cursorFVTH2 = queryFVTH2->execute();
783 while ( cursorFVTH2.next() ) {
786 const coral::AttributeList& row = cursorFVTH2.currentRow();
787 float idoub = row[
"DPID"].data<
float>();
788 int id =
static_cast<int>(idoub);
789 float vth2 = row[
"VTH2"].data<
float>();
790 coral::TimeStamp ts = row[
"TSTAMP"].data<coral::TimeStamp>();
791 int ndate = (ts.day() * 10000) + (ts.month() * 100) + (ts.year()-2000);
792 int ntime = (ts.hour() * 10000) + (ts.minute() * 100) + ts.second();
797 febarray.push_back(Itemp);
800 std::cout <<
">> Processing VTH2..." << std::endl;
801 coral::AttributeList conditionData;
802 conditionData.extend<coral::TimeStamp>(
"tmin" );
803 conditionData[
"tmin"].data<coral::TimeStamp>() =
tMIN;
804 std::string conditionVTH2 =
"RPCFEB.VTH2 IS NOT NULL AND RPCFEB.CHANGE_DATE >:tmin";
805 queryFVTH2->setCondition( conditionVTH2, conditionData );
806 coral::ICursor& cursorFVTH2 = queryFVTH2->execute();
807 while ( cursorFVTH2.next() ) {
810 const coral::AttributeList& row = cursorFVTH2.currentRow();
811 float idoub = row[
"DPID"].data<
float>();
812 int id =
static_cast<int>(idoub);
813 float vth2 = row[
"VTH2"].data<
float>();
814 coral::TimeStamp ts = row[
"TSTAMP"].data<coral::TimeStamp>();
815 int ndate = (ts.day() * 10000) + (ts.month() * 100) + (ts.year()-2000);
816 int ntime = (ts.hour() * 10000) + (ts.minute() * 100) + ts.second();
821 febarray.push_back(Itemp);
828 std::cout <<
"Processing VTH3..." << std::endl;
829 coral::AttributeList conditionData;
830 conditionData.extend<coral::TimeStamp>(
"tmin" );
831 conditionData.extend<coral::TimeStamp>(
"tmax" );
832 conditionData[
"tmin"].data<coral::TimeStamp>() =
tMIN;
833 conditionData[
"tmax"].data<coral::TimeStamp>() =
tMAX;
834 std::string conditionVTH3 =
"RPCFEB.VTH3 IS NOT NULL AND RPCFEB.CHANGE_DATE >:tmin AND RPCFEB.CHANGE_DATE <:tmax";
835 queryFVTH3->setCondition( conditionVTH3, conditionData );
836 coral::ICursor& cursorFVTH3 = queryFVTH3->execute();
837 while ( cursorFVTH3.next() ) {
840 const coral::AttributeList& row = cursorFVTH3.currentRow();
841 float idoub = row[
"DPID"].data<
float>();
842 int id =
static_cast<int>(idoub);
843 float vth3 = row[
"VTH3"].data<
float>();
844 coral::TimeStamp ts = row[
"TSTAMP"].data<coral::TimeStamp>();
845 int ndate = (ts.day() * 10000) + (ts.month() * 100) + (ts.year()-2000);
846 int ntime = (ts.hour() * 10000) + (ts.minute() * 100) + ts.second();
851 febarray.push_back(Itemp);
854 std::cout <<
">> Processing VTH3..." << std::endl;
855 coral::AttributeList conditionData;
856 conditionData.extend<coral::TimeStamp>(
"tmin" );
857 conditionData[
"tmin"].data<coral::TimeStamp>() =
tMIN;
858 std::string conditionVTH3 =
"RPCFEB.VTH3 IS NOT NULL AND RPCFEB.CHANGE_DATE >:tmin";
859 queryFVTH3->setCondition( conditionVTH3, conditionData );
860 coral::ICursor& cursorFVTH3 = queryFVTH3->execute();
861 while ( cursorFVTH3.next() ) {
864 const coral::AttributeList& row = cursorFVTH3.currentRow();
865 float idoub = row[
"DPID"].data<
float>();
866 int id =
static_cast<int>(idoub);
867 float vth3 = row[
"VTH3"].data<
float>();
868 coral::TimeStamp ts = row[
"TSTAMP"].data<coral::TimeStamp>();
869 int ndate = (ts.day() * 10000) + (ts.month() * 100) + (ts.year()-2000);
870 int ntime = (ts.hour() * 10000) + (ts.minute() * 100) + ts.second();
875 febarray.push_back(Itemp);
882 std::cout <<
"Processing VTH4..." << std::endl;
883 coral::AttributeList conditionData;
884 conditionData.extend<coral::TimeStamp>(
"tmin" );
885 conditionData.extend<coral::TimeStamp>(
"tmax" );
886 conditionData[
"tmin"].data<coral::TimeStamp>() =
tMIN;
887 conditionData[
"tmax"].data<coral::TimeStamp>() =
tMAX;
888 std::string conditionVTH4 =
"RPCFEB.VTH4 IS NOT NULL AND RPCFEB.CHANGE_DATE >:tmin AND RPCFEB.CHANGE_DATE <:tmax";
889 queryFVTH4->setCondition( conditionVTH4, conditionData );
890 coral::ICursor& cursorFVTH4 = queryFVTH4->execute();
891 while ( cursorFVTH4.next() ) {
894 const coral::AttributeList& row = cursorFVTH4.currentRow();
895 float idoub = row[
"DPID"].data<
float>();
896 int id =
static_cast<int>(idoub);
897 float vth4 = row[
"VTH4"].data<
float>();
898 coral::TimeStamp ts = row[
"TSTAMP"].data<coral::TimeStamp>();
899 int ndate = (ts.day() * 10000) + (ts.month() * 100) + (ts.year()-2000);
900 int ntime = (ts.hour() * 10000) + (ts.minute() * 100) + ts.second();
905 febarray.push_back(Itemp);
908 std::cout <<
">> Processing VTH4..." << std::endl;
909 coral::AttributeList conditionData;
910 conditionData.extend<coral::TimeStamp>(
"tmin" );
911 conditionData[
"tmin"].data<coral::TimeStamp>() =
tMIN;
912 std::string conditionVTH4 =
"RPCFEB.VTH4 IS NOT NULL AND RPCFEB.CHANGE_DATE >:tmin";
913 queryFVTH4->setCondition( conditionVTH4, conditionData );
914 coral::ICursor& cursorFVTH4 = queryFVTH4->execute();
915 while ( cursorFVTH4.next() ) {
918 const coral::AttributeList& row = cursorFVTH4.currentRow();
919 float idoub = row[
"DPID"].data<
float>();
920 int id =
static_cast<int>(idoub);
921 float vth4 = row[
"VTH4"].data<
float>();
922 coral::TimeStamp ts = row[
"TSTAMP"].data<coral::TimeStamp>();
923 int ndate = (ts.day() * 10000) + (ts.month() * 100) + (ts.year()-2000);
924 int ntime = (ts.hour() * 10000) + (ts.minute() * 100) + ts.second();
929 febarray.push_back(Itemp);
935 std::cout <<
"Processing VMON1..." << std::endl;
936 coral::AttributeList conditionData;
937 conditionData.extend<coral::TimeStamp>(
"tmin" );
938 conditionData.extend<coral::TimeStamp>(
"tmax" );
939 conditionData[
"tmin"].data<coral::TimeStamp>() =
tMIN;
940 conditionData[
"tmax"].data<coral::TimeStamp>() =
tMAX;
941 std::string conditionVMON1 =
"RPCFEB.VMON1 IS NOT NULL AND RPCFEB.CHANGE_DATE >:tmin AND RPCFEB.CHANGE_DATE <:tmax";
942 queryFVMON1->setCondition( conditionVMON1, conditionData );
943 coral::ICursor& cursorFVMON1 = queryFVMON1->execute();
944 while ( cursorFVMON1.next() ) {
947 const coral::AttributeList& row = cursorFVMON1.currentRow();
948 float idoub = row[
"DPID"].data<
float>();
949 int id =
static_cast<int>(idoub);
950 float vmon1 = row[
"VMON1"].data<
float>();
951 coral::TimeStamp ts = row[
"TSTAMP"].data<coral::TimeStamp>();
952 int ndate = (ts.day() * 10000) + (ts.month() * 100) + (ts.year()-2000);
953 int ntime = (ts.hour() * 10000) + (ts.minute() * 100) + ts.second();
958 febarray.push_back(Itemp);
961 std::cout <<
">> Processing VMON1..." << std::endl;
962 coral::AttributeList conditionData;
963 conditionData.extend<coral::TimeStamp>(
"tmin" );
964 conditionData[
"tmin"].data<coral::TimeStamp>() =
tMIN;
965 std::string conditionVMON1 =
"RPCFEB.VMON1 IS NOT NULL AND RPCFEB.CHANGE_DATE >:tmin";
966 queryFVMON1->setCondition( conditionVMON1, conditionData );
967 coral::ICursor& cursorFVMON1 = queryFVMON1->execute();
968 while ( cursorFVMON1.next() ) {
971 const coral::AttributeList& row = cursorFVMON1.currentRow();
972 float idoub = row[
"DPID"].data<
float>();
973 int id =
static_cast<int>(idoub);
974 float vmon1 = row[
"VMON1"].data<
float>();
975 coral::TimeStamp ts = row[
"TSTAMP"].data<coral::TimeStamp>();
976 int ndate = (ts.day() * 10000) + (ts.month() * 100) + (ts.year()-2000);
977 int ntime = (ts.hour() * 10000) + (ts.minute() * 100) + ts.second();
982 febarray.push_back(Itemp);
990 std::cout <<
"Processing VMON2..." << std::endl;
991 coral::AttributeList conditionData;
992 conditionData.extend<coral::TimeStamp>(
"tmin" );
993 conditionData.extend<coral::TimeStamp>(
"tmax" );
994 conditionData[
"tmin"].data<coral::TimeStamp>() =
tMIN;
995 conditionData[
"tmax"].data<coral::TimeStamp>() =
tMAX;
996 std::string conditionVMON2 =
"RPCFEB.VMON2 IS NOT NULL AND RPCFEB.CHANGE_DATE >:tmin AND RPCFEB.CHANGE_DATE <:tmax";
997 queryFVMON2->setCondition( conditionVMON2, conditionData );
998 coral::ICursor& cursorFVMON2 = queryFVMON2->execute();
999 while ( cursorFVMON2.next() ) {
1002 const coral::AttributeList& row = cursorFVMON2.currentRow();
1003 float idoub = row[
"DPID"].data<
float>();
1004 int id =
static_cast<int>(idoub);
1005 float vmon2 = row[
"VMON2"].data<
float>();
1006 coral::TimeStamp ts = row[
"TSTAMP"].data<coral::TimeStamp>();
1007 int ndate = (ts.day() * 10000) + (ts.month() * 100) + (ts.year()-2000);
1008 int ntime = (ts.hour() * 10000) + (ts.minute() * 100) + ts.second();
1010 Itemp.
vmon2 = vmon2;
1013 febarray.push_back(Itemp);
1016 std::cout <<
">> Processing VMON2..." << std::endl;
1017 coral::AttributeList conditionData;
1018 conditionData.extend<coral::TimeStamp>(
"tmin" );
1019 conditionData[
"tmin"].data<coral::TimeStamp>() =
tMIN;
1020 std::string conditionVMON2 =
"RPCFEB.VMON2 IS NOT NULL AND RPCFEB.CHANGE_DATE >:tmin";
1021 queryFVMON2->setCondition( conditionVMON2, conditionData );
1022 coral::ICursor& cursorFVMON2 = queryFVMON2->execute();
1023 while ( cursorFVMON2.next() ) {
1026 const coral::AttributeList& row = cursorFVMON2.currentRow();
1027 float idoub = row[
"DPID"].data<
float>();
1028 int id =
static_cast<int>(idoub);
1029 float vmon2 = row[
"VMON2"].data<
float>();
1030 coral::TimeStamp ts = row[
"TSTAMP"].data<coral::TimeStamp>();
1031 int ndate = (ts.day() * 10000) + (ts.month() * 100) + (ts.year()-2000);
1032 int ntime = (ts.hour() * 10000) + (ts.minute() * 100) + ts.second();
1034 Itemp.
vmon2 = vmon2;
1037 febarray.push_back(Itemp);
1044 std::cout <<
"Processing VMON3..." << std::endl;
1045 coral::AttributeList conditionData;
1046 conditionData.extend<coral::TimeStamp>(
"tmin" );
1047 conditionData.extend<coral::TimeStamp>(
"tmax" );
1048 conditionData[
"tmin"].data<coral::TimeStamp>() =
tMIN;
1049 conditionData[
"tmax"].data<coral::TimeStamp>() =
tMAX;
1050 std::string conditionVMON3 =
"RPCFEB.VMON3 IS NOT NULL AND RPCFEB.CHANGE_DATE >:tmin AND RPCFEB.CHANGE_DATE <:tmax";
1051 queryFVMON3->setCondition( conditionVMON3, conditionData );
1052 coral::ICursor& cursorFVMON3 = queryFVMON3->execute();
1053 while ( cursorFVMON3.next() ) {
1056 const coral::AttributeList& row = cursorFVMON3.currentRow();
1057 float idoub = row[
"DPID"].data<
float>();
1058 int id =
static_cast<int>(idoub);
1059 float vmon3 = row[
"VMON3"].data<
float>();
1060 coral::TimeStamp ts = row[
"TSTAMP"].data<coral::TimeStamp>();
1061 int ndate = (ts.day() * 10000) + (ts.month() * 100) + (ts.year()-2000);
1062 int ntime = (ts.hour() * 10000) + (ts.minute() * 100) + ts.second();
1064 Itemp.
vmon3 = vmon3;
1067 febarray.push_back(Itemp);
1070 std::cout <<
">> Processing VMON3..." << std::endl;
1071 coral::AttributeList conditionData;
1072 conditionData.extend<coral::TimeStamp>(
"tmin" );
1073 conditionData[
"tmin"].data<coral::TimeStamp>() =
tMIN;
1074 std::string conditionVMON3 =
"RPCFEB.VMON3 IS NOT NULL AND RPCFEB.CHANGE_DATE >:tmin";
1075 queryFVMON3->setCondition( conditionVMON3, conditionData );
1076 coral::ICursor& cursorFVMON3 = queryFVMON3->execute();
1077 while ( cursorFVMON3.next() ) {
1080 const coral::AttributeList& row = cursorFVMON3.currentRow();
1081 float idoub = row[
"DPID"].data<
float>();
1082 int id =
static_cast<int>(idoub);
1083 float vmon3 = row[
"VMON3"].data<
float>();
1084 coral::TimeStamp ts = row[
"TSTAMP"].data<coral::TimeStamp>();
1085 int ndate = (ts.day() * 10000) + (ts.month() * 100) + (ts.year()-2000);
1086 int ntime = (ts.hour() * 10000) + (ts.minute() * 100) + ts.second();
1088 Itemp.
vmon3 = vmon3;
1091 febarray.push_back(Itemp);
1098 std::cout <<
"Processing VMON4..." << std::endl;
1099 coral::AttributeList conditionData;
1100 conditionData.extend<coral::TimeStamp>(
"tmin" );
1101 conditionData.extend<coral::TimeStamp>(
"tmax" );
1102 conditionData[
"tmin"].data<coral::TimeStamp>() =
tMIN;
1103 conditionData[
"tmax"].data<coral::TimeStamp>() =
tMAX;
1104 std::string conditionVMON4 =
"RPCFEB.VMON4 IS NOT NULL AND RPCFEB.CHANGE_DATE >:tmin AND RPCFEB.CHANGE_DATE <:tmax";
1105 queryFVMON4->setCondition( conditionVMON4, conditionData );
1106 coral::ICursor& cursorFVMON4 = queryFVMON4->execute();
1107 while ( cursorFVMON4.next() ) {
1110 const coral::AttributeList& row = cursorFVMON4.currentRow();
1111 float idoub = row[
"DPID"].data<
float>();
1112 int id =
static_cast<int>(idoub);
1113 float vmon4 = row[
"VMON4"].data<
float>();
1114 coral::TimeStamp ts = row[
"TSTAMP"].data<coral::TimeStamp>();
1115 int ndate = (ts.day() * 10000) + (ts.month() * 100) + (ts.year()-2000);
1116 int ntime = (ts.hour() * 10000) + (ts.minute() * 100) + ts.second();
1118 Itemp.
vmon4 = vmon4;
1121 febarray.push_back(Itemp);
1124 std::cout <<
">> Processing VMON4..." << std::endl;
1125 coral::AttributeList conditionData;
1126 conditionData.extend<coral::TimeStamp>(
"tmin" );
1127 conditionData[
"tmin"].data<coral::TimeStamp>() =
tMIN;
1128 std::string conditionVMON4 =
"RPCFEB.VMON4 IS NOT NULL AND RPCFEB.CHANGE_DATE >:tmin";
1129 queryFVMON4->setCondition( conditionVMON4, conditionData );
1130 coral::ICursor& cursorFVMON4 = queryFVMON4->execute();
1131 while ( cursorFVMON4.next() ) {
1134 const coral::AttributeList& row = cursorFVMON4.currentRow();
1135 float idoub = row[
"DPID"].data<
float>();
1136 int id =
static_cast<int>(idoub);
1137 float vmon4 = row[
"VMON4"].data<
float>();
1138 coral::TimeStamp ts = row[
"TSTAMP"].data<coral::TimeStamp>();
1139 int ndate = (ts.day() * 10000) + (ts.month() * 100) + (ts.year()-2000);
1140 int ntime = (ts.hour() * 10000) + (ts.minute() * 100) + ts.second();
1142 Itemp.
vmon4 = vmon4;
1145 febarray.push_back(Itemp);
1152 std::cout <<
"Processing TEMP1..." << std::endl;
1153 coral::AttributeList conditionData;
1154 conditionData.extend<coral::TimeStamp>(
"tmin" );
1155 conditionData.extend<coral::TimeStamp>(
"tmax" );
1156 conditionData[
"tmin"].data<coral::TimeStamp>() =
tMIN;
1157 conditionData[
"tmax"].data<coral::TimeStamp>() =
tMAX;
1158 std::string conditionTEMP1 =
"RPCFEB.TEMPERATURE1 IS NOT NULL AND RPCFEB.CHANGE_DATE >:tmin AND RPCFEB.CHANGE_DATE <:tmax";
1159 queryFTEMP1->setCondition( conditionTEMP1, conditionData );
1160 coral::ICursor& cursorFTEMP1 = queryFTEMP1->execute();
1161 while ( cursorFTEMP1.next() ) {
1164 const coral::AttributeList& row = cursorFTEMP1.currentRow();
1165 float idoub = row[
"DPID"].data<
float>();
1166 int id =
static_cast<int>(idoub);
1167 float temp1 = row[
"TEMP1"].data<
float>();
1168 coral::TimeStamp ts = row[
"TSTAMP"].data<coral::TimeStamp>();
1169 int ndate = (ts.day() * 10000) + (ts.month() * 100) + (ts.year()-2000);
1170 int ntime = (ts.hour() * 10000) + (ts.minute() * 100) + ts.second();
1172 Itemp.
temp1 = temp1;
1175 febarray.push_back(Itemp);
1178 std::cout <<
">> Processing TEMP1..." << std::endl;
1179 coral::AttributeList conditionData;
1180 conditionData.extend<coral::TimeStamp>(
"tmin" );
1181 conditionData[
"tmin"].data<coral::TimeStamp>() =
tMIN;
1182 std::string conditionTEMP1 =
"RPCFEB.TEMPERATURE1 IS NOT NULL AND RPCFEB.CHANGE_DATE >:tmin";
1183 queryFTEMP1->setCondition( conditionTEMP1, conditionData );
1184 coral::ICursor& cursorFTEMP1 = queryFTEMP1->execute();
1185 while ( cursorFTEMP1.next() ) {
1188 const coral::AttributeList& row = cursorFTEMP1.currentRow();
1189 float idoub = row[
"DPID"].data<
float>();
1190 int id =
static_cast<int>(idoub);
1191 float temp1 = row[
"TEMP1"].data<
float>();
1192 coral::TimeStamp ts = row[
"TSTAMP"].data<coral::TimeStamp>();
1193 int ndate = (ts.day() * 10000) + (ts.month() * 100) + (ts.year()-2000);
1194 int ntime = (ts.hour() * 10000) + (ts.minute() * 100) + ts.second();
1196 Itemp.
temp1 = temp1;
1199 febarray.push_back(Itemp);
1206 std::cout <<
"Processing TEMP2..." << std::endl;
1207 coral::AttributeList conditionData;
1208 conditionData.extend<coral::TimeStamp>(
"tmin" );
1209 conditionData.extend<coral::TimeStamp>(
"tmax" );
1210 conditionData[
"tmin"].data<coral::TimeStamp>() =
tMIN;
1211 conditionData[
"tmax"].data<coral::TimeStamp>() =
tMAX;
1212 std::string conditionTEMP2 =
"RPCFEB.TEMPERATURE2 IS NOT NULL AND RPCFEB.CHANGE_DATE >:tmin AND RPCFEB.CHANGE_DATE <:tmax";
1213 queryFTEMP2->setCondition( conditionTEMP2, conditionData );
1214 coral::ICursor& cursorFTEMP2 = queryFTEMP2->execute();
1215 while ( cursorFTEMP2.next() ) {
1218 const coral::AttributeList& row = cursorFTEMP2.currentRow();
1219 float idoub = row[
"DPID"].data<
float>();
1220 int id =
static_cast<int>(idoub);
1221 float temp2 = row[
"TEMP2"].data<
float>();
1222 coral::TimeStamp ts = row[
"TSTAMP"].data<coral::TimeStamp>();
1223 int ndate = (ts.day() * 10000) + (ts.month() * 100) + (ts.year()-2000);
1224 int ntime = (ts.hour() * 10000) + (ts.minute() * 100) + ts.second();
1226 Itemp.
temp2 = temp2;
1229 febarray.push_back(Itemp);
1232 std::cout <<
">> Processing TEMP2..." << std::endl;
1233 coral::AttributeList conditionData;
1234 conditionData.extend<coral::TimeStamp>(
"tmin" );
1235 conditionData[
"tmin"].data<coral::TimeStamp>() =
tMIN;
1236 std::string conditionTEMP2 =
"RPCFEB.TEMPERATURE2 IS NOT NULL AND RPCFEB.CHANGE_DATE >:tmin";
1237 queryFTEMP2->setCondition( conditionTEMP2, conditionData );
1238 coral::ICursor& cursorFTEMP2 = queryFTEMP2->execute();
1239 while ( cursorFTEMP2.next() ) {
1242 const coral::AttributeList& row = cursorFTEMP2.currentRow();
1243 float idoub = row[
"DPID"].data<
float>();
1244 int id =
static_cast<int>(idoub);
1245 float temp2 = row[
"TEMP2"].data<
float>();
1246 coral::TimeStamp ts = row[
"TSTAMP"].data<coral::TimeStamp>();
1247 int ndate = (ts.day() * 10000) + (ts.month() * 100) + (ts.year()-2000);
1248 int ntime = (ts.hour() * 10000) + (ts.minute() * 100) + ts.second();
1250 Itemp.
temp2 = temp2;
1253 febarray.push_back(Itemp);
1257 std::cout <<
">> FEB array --> size: " << febarray.size() <<
" >> done." << std::endl;
1263 session->transaction().commit();
coral::TimeStamp UTtoT(long long utime)
coral::ISession * connect(const std::string &connectionString, const std::string &userName, const std::string &password)
std::string m_connectionString