2016-05-31 06:42:27 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
|
|
|
// Copyright (C) 2016 Statoil ASA
|
2019-09-06 03:40:57 -05:00
|
|
|
//
|
2016-05-31 06:42:27 -05:00
|
|
|
// ResInsight is free software: you can redistribute it and/or modify
|
|
|
|
// it under the terms of the GNU General Public License as published by
|
|
|
|
// the Free Software Foundation, either version 3 of the License, or
|
|
|
|
// (at your option) any later version.
|
2019-09-06 03:40:57 -05:00
|
|
|
//
|
2016-05-31 06:42:27 -05:00
|
|
|
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
|
|
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
|
|
// FITNESS FOR A PARTICULAR PURPOSE.
|
2019-09-06 03:40:57 -05:00
|
|
|
//
|
|
|
|
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
2016-05-31 06:42:27 -05:00
|
|
|
// for more details.
|
|
|
|
//
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "RimSummaryCase.h"
|
2017-09-22 02:21:12 -05:00
|
|
|
|
2018-03-19 05:02:22 -05:00
|
|
|
#include "cafPdmField.h"
|
2019-09-06 03:40:57 -05:00
|
|
|
#include "cvfObject.h"
|
2017-09-22 02:11:39 -05:00
|
|
|
|
2019-07-25 00:38:46 -05:00
|
|
|
class RifReaderRftInterface;
|
2022-06-17 10:24:58 -05:00
|
|
|
class RifReaderOpmRft;
|
2017-09-22 02:11:39 -05:00
|
|
|
class RifReaderEclipseSummary;
|
2021-04-08 08:53:38 -05:00
|
|
|
class RiaThreadSafeLogger;
|
2021-12-14 04:10:19 -06:00
|
|
|
class RifOpmCommonEclipseSummary;
|
|
|
|
class RifEclipseSummaryAddress;
|
|
|
|
class RifMultipleSummaryReaders;
|
2022-08-16 05:40:25 -05:00
|
|
|
class RimRftCase;
|
2023-02-26 01:08:06 -06:00
|
|
|
class RifCalculatedSummaryCurveReader;
|
2017-09-22 02:11:39 -05:00
|
|
|
|
2016-05-31 06:42:27 -05:00
|
|
|
//==================================================================================================
|
|
|
|
//
|
2019-09-06 03:40:57 -05:00
|
|
|
//
|
2016-05-31 06:42:27 -05:00
|
|
|
//
|
|
|
|
//==================================================================================================
|
2019-09-06 03:40:57 -05:00
|
|
|
class RimFileSummaryCase : public RimSummaryCase
|
2016-05-31 06:42:27 -05:00
|
|
|
{
|
|
|
|
CAF_PDM_HEADER_INIT;
|
2019-09-06 03:40:57 -05:00
|
|
|
|
2016-05-31 06:42:27 -05:00
|
|
|
public:
|
|
|
|
RimFileSummaryCase();
|
2018-10-18 12:45:57 -05:00
|
|
|
~RimFileSummaryCase() override;
|
2016-05-31 06:42:27 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
QString summaryHeaderFilename() const override;
|
|
|
|
QString caseName() const override;
|
2016-05-31 06:42:27 -05:00
|
|
|
|
2021-04-08 08:53:38 -05:00
|
|
|
void createSummaryReaderInterfaceThreadSafe( RiaThreadSafeLogger* threadSafeLogger );
|
2019-09-06 03:40:57 -05:00
|
|
|
void createSummaryReaderInterface() override;
|
|
|
|
void createRftReaderInterface() override;
|
2018-10-18 12:45:57 -05:00
|
|
|
RifSummaryReaderInterface* summaryReader() override;
|
2019-07-25 00:38:46 -05:00
|
|
|
RifReaderRftInterface* rftReader() override;
|
2023-03-14 07:14:40 -05:00
|
|
|
void searchForWseglinkAndRecreateRftReader();
|
2016-05-31 06:42:27 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
void setIncludeRestartFiles( bool includeRestartFiles );
|
2018-03-19 05:02:22 -05:00
|
|
|
|
2021-12-14 04:10:19 -06:00
|
|
|
void setSummaryData( const std::string& keyword, const std::string& unit, const std::vector<float>& values );
|
|
|
|
void onProjectBeingSaved();
|
|
|
|
|
2023-02-26 03:48:40 -06:00
|
|
|
static RifSummaryReaderInterface*
|
|
|
|
findRelatedFilesAndCreateReader( const QString& headerFileName, bool includeRestartFiles, RiaThreadSafeLogger* threadSafeLogger );
|
2021-04-08 08:53:38 -05:00
|
|
|
|
2021-12-14 04:10:19 -06:00
|
|
|
protected:
|
2023-02-26 03:48:40 -06:00
|
|
|
void defineEditorAttribute( const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute ) override;
|
2021-12-14 04:10:19 -06:00
|
|
|
|
2022-08-16 05:40:25 -05:00
|
|
|
void defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName = "" ) override;
|
|
|
|
|
2017-09-22 02:11:39 -05:00
|
|
|
private:
|
2021-12-14 04:10:19 -06:00
|
|
|
void openAndAttachAdditionalReader();
|
|
|
|
QString additionalSummaryDataFilePath() const;
|
|
|
|
static QString createAdditionalSummaryFileName();
|
|
|
|
|
2023-03-14 07:14:40 -05:00
|
|
|
static RifReaderOpmRft* createOpmRftReader( const QString& rftFileName, const QString& dataDeckFileName );
|
2022-06-17 10:24:58 -05:00
|
|
|
|
2021-12-14 04:10:19 -06:00
|
|
|
private:
|
2023-02-26 01:08:06 -06:00
|
|
|
cvf::ref<RifSummaryReaderInterface> m_fileSummaryReader;
|
|
|
|
cvf::ref<RifCalculatedSummaryCurveReader> m_calculatedSummaryReader;
|
|
|
|
cvf::ref<RifMultipleSummaryReaders> m_multiSummaryReader;
|
|
|
|
cvf::ref<RifReaderOpmRft> m_summaryEclipseRftReader;
|
|
|
|
caf::PdmField<bool> m_includeRestartFiles;
|
2021-12-14 04:10:19 -06:00
|
|
|
|
|
|
|
caf::PdmField<caf::FilePath> m_additionalSummaryFilePath;
|
|
|
|
cvf::ref<RifOpmCommonEclipseSummary> m_additionalSummaryFileReader;
|
2022-08-16 05:40:25 -05:00
|
|
|
|
|
|
|
caf::PdmChildField<RimRftCase*> m_rftCase;
|
2023-03-14 07:14:40 -05:00
|
|
|
|
|
|
|
bool m_hasParsedForWeseglink;
|
2017-09-22 02:11:39 -05:00
|
|
|
};
|