string Item::getTitleKeywords() const 
{
	string retValue = "";
	retValue += getEntryRow(TITLE, getTitle()) + "\n";
	retValue += getEntryRow(KEYWORDS, printKeywords()) + "\n";

	return retValue; 
}
void
ArxDbgEdInputContextReactor::beginEntsel(const char* promptString,
					int initGetFlags,
					const char* pKeywords)
{
	printReactorMessage(_T("Begin Entsel"));

	if (printDetails()) {
		printPrompt(promptString);
		printInitGetFlags(initGetFlags);
		printKeywords(pKeywords);
	}
}
void
ArxDbgEdInputContextReactor::beginGetColor(const int* dfault,
					const char* promptString,
					int initGetFlags,
					const char* pKeywords)
{
	printReactorMessage(_T("Begin Get Color"));

	if (printDetails()) {
		printDefaultInt(dfault);
		printPrompt(promptString);
		printInitGetFlags(initGetFlags);
		printKeywords(pKeywords);
	}
}
void
ArxDbgEdInputContextReactor::beginGetScaleFactor(const AcGePoint3d* pointIn,
                    const char* promptString,
                    int initGetFlags,
                    const char* pKeywords)
{
	printReactorMessage(_T("Begin Get Scale Factor"));

	if (printDetails()) {
		printPointIn(pointIn);
		printPrompt(promptString);
		printInitGetFlags(initGetFlags);
		printKeywords(pKeywords);
	}
}
void
ArxDbgEdInputContextReactor::beginGetCorner(const AcGePoint3d* firstCorner,
                    const char* promptString,
                    int   initGetFlags,
                    const char* pKeywords)
{
	printReactorMessage(_T("Begin Get Corner"));

	if (printDetails()) {
		printFirstCorner(firstCorner);
		printPrompt(promptString);
		printInitGetFlags(initGetFlags);
		printKeywords(pKeywords);
	}
}
void
ArxDbgEdInputContextReactor::beginNentsel(const char* promptString,
					Adesk::Boolean pickFlag,
					int initGetFlags,
					const char* pKeywords)
{
	printReactorMessage(_T("Begin Nentsel"));

	if (printDetails()) {
		CString str;
		printPrompt(promptString);
		printValue(_T("PICK FLAG"), ArxDbgUtils::booleanToStr(pickFlag, str));
		printInitGetFlags(initGetFlags);
		printKeywords(pKeywords);
	}
}
void
ArxDbgEdInputContextReactor::beginSSGet(const char*  pPrompt,
					int  initGetFlags,
					const char* pKeywords,
					const char* pSSControls, // str in ADS
					const AcArray<AcGePoint3d>& points,
					const resbuf* entMask)
{
	printReactorMessage(_T("Begin SSGet"));

	if (printDetails()) {
		CString str;
		printPrompt(pPrompt);
		printInitGetFlags(initGetFlags);
		printKeywords(pKeywords);
		printValue(_T("SS CONTROLS"), pSSControls);
		printPoints(points);
		printResbufs(_T("ENT MASK"), entMask);
	}
}
void IntegrationTest::getIntegrationTest(){
    std::vector<double> timeVec1, timeVec2;
    setTimeVecs(timeVec1, timeVec2);  // Sets the time vectors, they are equal for all keywords (WPOR:PROD01 etc)
    setDataSets(timeVec1, timeVec2);

    int ivar = 0;
    if(!allowDifferentAmountOfKeywords){
        if(stringlist_get_size(keysShort) != stringlist_get_size(keysLong)){
            OPM_THROW(std::invalid_argument, "Different ammont of keywords in the two summary files.");
        }
    }
    if(printKeyword){
        printKeywords();
        return;
    }

    std::string keywordWithGreatestErrorRatio;
    double greatestRatio = 0;

    //Iterates over all keywords from the restricted file, use iterator "ivar". Searches for a  match in the file with more keywords, use the itarator "jvar".
    while(ivar < stringlist_get_size(keysShort)){
        const char* keyword = stringlist_iget(keysShort, ivar);

        if(oneOfTheMainVariables){
            std::string keywordString(keyword);
            std::string substr = keywordString.substr(0,4);
            if(substr!= mainVariable){
                ivar++;
                continue;
            }
        }
        for (int jvar = 0; jvar < stringlist_get_size(keysLong); jvar++){

            if (strcmp(keyword, stringlist_iget(keysLong, jvar)) == 0){ //When the keywords are equal, proceed in comparing summary files.
                /*	if(!checkUnits(keyword)){
                    OPM_THROW(std::runtime_error, "For keyword " << keyword << " the unit of the two files is not equal. Not possible to compare.");
                    } //Comparing the unit of the two vectors.*/
                checkForKeyword(timeVec1, timeVec2, keyword);
                if(findVectorWithGreatestErrorRatio){
                    WellProductionVolume volume = getSpecificWellVolume(timeVec1,timeVec2, keyword);
                    findGreatestErrorRatio(volume,greatestRatio, keyword, keywordWithGreatestErrorRatio);
                }
                break;
            }
            //will only enter here if no keyword match
            if(jvar == stringlist_get_size(keysLong)-1){
                if(!allowDifferentAmountOfKeywords){
                    OPM_THROW(std::invalid_argument, "No match on keyword");
                }
            }
        }
        ivar++;
    }
    if(findVectorWithGreatestErrorRatio){
        std::cout << "The keyword " << keywordWithGreatestErrorRatio << " had the greatest error ratio, which was " << greatestRatio << std::endl;
    }
    if((findVolumeError || oneOfTheMainVariables) && !findVectorWithGreatestErrorRatio){
        evaluateWellProductionVolume();
    }
    if(allowSpikes){
        std::cout << "checkWithSpikes succeeded." << std::endl;
    }
}