Simple reader. More...
#include <arcane/std/internal/BasicReader.h>
Classes | |
| class | IItemGroupFinder |
| Interface to find the group associated with a variable based on this metadata. More... | |
Public Member Functions | |
| BasicReader (IApplication *app, IParallelMng *pm, Int32 forced_rank_to_read, const String &path, bool want_parallel) | |
| void | beginRead (const VariableCollection &vars) override |
| void | endRead () override |
| String | metaData () override |
| Metadata. | |
| void | read (IVariable *v, IData *data) override |
| Reads the data data of the variable var. | |
| void | fillMetaData (ByteArray &bytes) override |
| Fills bytes with the metadata content. | |
| void | beginRead (const DataReaderInfo &infos) override |
| Notifies the start of data reading. | |
| void | read (const VariableDataReadInfo &infos) override |
| Reads the data specified by infos. | |
| void | initialize () |
| void | setItemGroupFinder (IItemGroupFinder *group_finder) |
| void | fillComparisonHash (std::map< String, String > &comparison_hash_map) |
| Fills the argument with pairs (variable_name, hash_value). | |
| IHashAlgorithm * | comparisonHashAlgorithm () const |
| Public Member Functions inherited from Arcane::impl::BasicReaderWriterCommon | |
| BasicReaderWriterCommon (IApplication *app, IParallelMng *pm, const String &path, eOpenMode open_mode) | |
| Public Member Functions inherited from Arcane::TraceAccessor | |
| TraceAccessor (ITraceMng *m) | |
| Constructs an accessor via the trace manager m. | |
| TraceAccessor (const TraceAccessor &rhs) | |
| Copy constructor. | |
| TraceAccessor & | operator= (const TraceAccessor &rhs) |
| Copy assignment operator. | |
| virtual | ~TraceAccessor () |
| Frees resources. | |
| ITraceMng * | traceMng () const |
| Trace manager. | |
| TraceMessage | info () const |
| Flow for an information message. | |
| TraceMessage | pinfo () const |
| Flow for a parallel information message. | |
| TraceMessage | info (char category) const |
| Flow for an information message of a given category. | |
| TraceMessage | pinfo (char category) const |
| Flow for a parallel information message of a given category. | |
| TraceMessage | info (bool v) const |
| Flow for an information message. | |
| TraceMessage | warning () const |
| Flow for a warning message. | |
| TraceMessage | pwarning () const |
| TraceMessage | error () const |
| Flow for an error message. | |
| TraceMessage | perror () const |
| TraceMessage | log () const |
| Flow for a log message. | |
| TraceMessage | plog () const |
| Flow for a log message. | |
| TraceMessage | logdate () const |
| Flow for a log message preceded by the date. | |
| TraceMessage | fatal () const |
| Flow for a fatal error message. | |
| TraceMessage | pfatal () const |
| Flow for a parallel fatal error message. | |
| TraceMessageDbg | debug (Trace::eDebugLevel=Trace::Medium) const |
| Flow for a debug message. | |
| Trace::eDebugLevel | configDbgLevel () const |
| Debug level of the configuration file. | |
| TraceMessage | info (Int32 verbose_level) const |
| Flow for an information message of a given level. | |
| TraceMessage | linfo () const |
| Flow for an information message with the local information level of this instance. | |
| TraceMessage | linfo (Int32 relative_level) const |
| Flow for an information message with the local information level of this instance. | |
| void | fatalMessage (const StandaloneTraceMessage &o) const |
| Public Member Functions inherited from Arcane::IDataReader | |
| virtual | ~IDataReader ()=default |
| Frees resources. | |
| Public Member Functions inherited from Arcane::IDataReader2 | |
| virtual | ~IDataReader2 () |
| Releases resources. | |
Private Member Functions | |
| void | _directReadVal (VariableMetaData *varmd, IData *data) |
| Ref< ParallelDataReader > | _getReader (VariableMetaData *varmd) |
| void | _setRanksToRead () |
| Ref< IGenericReader > | _readOwnMetaDataAndCreateReader (Int32 rank) |
Private Attributes | |
| bool | m_want_parallel = false |
| Integer | m_nb_written_part = 0 |
| Int32 | m_version = -1 |
| Int32 | m_first_rank_to_read = -1 |
| Int32 | m_nb_rank_to_read = -1 |
| Int32 | m_forced_rank_to_read = -1 |
| std::map< String, Ref< ParallelDataReader > > | m_parallel_data_readers |
| UniqueArray< Ref< IGenericReader > > | m_global_readers |
| IItemGroupFinder * | m_item_group_finder |
| Ref< KeyValueTextReader > | m_forced_rank_to_read_text_reader |
| Reader for the first rank to read. | |
| Ref< IDataCompressor > | m_data_compressor |
| Ref< IHashAlgorithm > | m_comparison_hash_algorithm |
Additional Inherited Members | |
| Public Types inherited from Arcane::impl::BasicReaderWriterCommon | |
| enum | eOpenMode { OpenModeRead , OpenModeTruncate , OpenModeAppend } |
| Protected Member Functions inherited from Arcane::impl::BasicReaderWriterCommon | |
| String | _getMetaDataFileName (Int32 rank) const |
| Protected Member Functions inherited from Arcane::TraceAccessor | |
| void | _setLocalVerboseLevel (Int32 v) |
| Int32 | _localVerboseLevel () const |
| Static Protected Member Functions inherited from Arcane::impl::BasicReaderWriterCommon | |
| static String | _getArcaneDBTag () |
| static String | _getOwnMetatadaFile (const String &path, Int32 rank) |
| static String | _getArcaneDBFile (const String &path, Int32 rank) |
| static String | _getBasicVariableFile (Int32 version, const String &path, Int32 rank) |
| static String | _getBasicGroupFile (const String &path, const String &name, Int32 rank) |
| static Ref< IDataCompressor > | _createDeflater (IApplication *app, const String &name) |
| static Ref< IHashAlgorithm > | _createHashAlgorithm (IApplication *app, const String &name) |
| static void | _fillUniqueIds (const ItemGroup &group, Array< Int64 > &uids) |
| Protected Attributes inherited from Arcane::impl::BasicReaderWriterCommon | |
| IApplication * | m_application = nullptr |
| IParallelMng * | m_parallel_mng = nullptr |
| eOpenMode | m_open_mode = OpenModeRead |
| String | m_path |
| Integer | m_verbose_level = 0 |
Simple reader.
Definition at line 33 of file BasicReader.h.
| Arcane::impl::BasicReader::BasicReader | ( | IApplication * | app, |
| IParallelMng * | pm, | ||
| Int32 | forced_rank_to_read, | ||
| const String & | path, | ||
| bool | want_parallel ) |
Definition at line 38 of file BasicReader.cc.
|
private |
Definition at line 136 of file BasicReader.cc.
|
private |
Definition at line 211 of file BasicReader.cc.
|
private |
Definition at line 402 of file BasicReader.cc.
|
private |
Definition at line 352 of file BasicReader.cc.
|
overridevirtual |
Notifies the start of data reading.
Implements Arcane::IDataReader2.
Definition at line 439 of file BasicReader.cc.
References Arcane::TraceAccessor::info().
|
overridevirtual |
Implements Arcane::IDataReader.
Definition at line 429 of file BasicReader.cc.
|
inline |
Definition at line 76 of file BasicReader.h.
|
inlineoverridevirtual |
Implements Arcane::IDataReader.
Definition at line 60 of file BasicReader.h.
| void Arcane::impl::BasicReader::fillComparisonHash | ( | std::map< String, String > & | comparison_hash_map | ) |
Fills the argument with pairs (variable_name, hash_value).
This is only valid for rank 0
Definition at line 266 of file BasicReader.cc.
|
overridevirtual |
Fills bytes with the metadata content.
Implements Arcane::IDataReader2.
Definition at line 328 of file BasicReader.cc.
References Arcane::asWritableBytes(), Arcane::TraceAccessor::info(), m_forced_rank_to_read_text_reader, and Arcane::platform::readAllFile().
Referenced by metaData().
| void Arcane::impl::BasicReader::initialize | ( | ) |
Definition at line 55 of file BasicReader.cc.
|
overridevirtual |
Metadata.
Implements Arcane::IDataReader.
Definition at line 315 of file BasicReader.cc.
References fillMetaData(), and Arcane::TraceAccessor::info().
|
overridevirtual |
Reads the data specified by infos.
Implements Arcane::IDataReader2.
Definition at line 299 of file BasicReader.cc.
References Arcane::VariableMetaData::fullName(), and Arcane::TraceAccessor::info().
Reads the data data of the variable var.
Implements Arcane::IDataReader.
Definition at line 284 of file BasicReader.cc.
References Arcane::IVariable::createMetaDataRef(), Arcane::IVariable::fullName(), Arcane::RefImpl< InstanceType, RefClassType, ImplTagId >::get(), Arcane::TraceAccessor::info(), and Arcane::IVariable::isPartial().
|
inline |
Definition at line 71 of file BasicReader.h.
|
private |
Definition at line 93 of file BasicReader.h.
|
private |
Definition at line 92 of file BasicReader.h.
|
private |
Definition at line 84 of file BasicReader.h.
|
private |
Definition at line 86 of file BasicReader.h.
|
private |
Reader for the first rank to read.
Definition at line 91 of file BasicReader.h.
Referenced by fillMetaData().
|
private |
Definition at line 89 of file BasicReader.h.
|
private |
Definition at line 90 of file BasicReader.h.
|
private |
Definition at line 85 of file BasicReader.h.
|
private |
Definition at line 81 of file BasicReader.h.
|
private |
Definition at line 88 of file BasicReader.h.
|
private |
Definition at line 82 of file BasicReader.h.
|
private |
Definition at line 80 of file BasicReader.h.