#include "hgupstoreoptmed.h" #define SQLCA_STORAGE_CLASS extern #define ORACA_STORAGE_CLASS extern #include #include #define MAXOPTPAR 50 // ************************************************************************ // ---------------------- storeObj -------------------------------------- // ************************************************************************ long HGupStoreOptMed::storeObj() { // stores a new object in OPTIC_CHERENKOV if (mediumName.length() <= 0) { cerr << "error in HGupStoreMatlist::storeObj: materialName empty string" << endl; return -1; }; EXEC SQL BEGIN DECLARE SECTION; char Medium_Name[MAXOPTPAR][20]; float Ppckov[MAXOPTPAR]; float Absco[MAXOPTPAR]; float Effic[MAXOPTPAR]; float Rindex[MAXOPTPAR]; int Vers_Index[MAXOPTPAR]; int RowsToInsert; EXEC SQL END DECLARE SECTION; nOptParam=ppckov.length(); RowsToInsert=nOptParam; if (nOptParam>MAXOPTPAR) { cerr << "number of optical parameters for media= " << nOptParam << " too large" << endl; return -1; } for (int i=0;i