16#ifndef vtkFileSeriesHelper_h
17#define vtkFileSeriesHelper_h
21#include "vtkIOCGNSReaderModule.h"
27VTK_ABI_NAMESPACE_BEGIN
40 typedef bool (*FileNameFunctorType)(
vtkAlgorithm* reader,
const std::string& filename);
88 vtkSetMacro(IgnoreReaderTime,
bool);
89 vtkGetMacro(IgnoreReaderTime,
bool);
90 vtkBooleanMacro(IgnoreReaderTime,
bool);
122 const std::vector<double>&
GetTimeSteps()
const {
return this->AggregatedTimeSteps; }
127 const std::pair<double, double>&
GetTimeRange(
bool* isvalid =
nullptr)
const
129 if (isvalid !=
nullptr)
131 *isvalid = this->AggregatedTimeRangeValid;
133 return this->AggregatedTimeRange;
145 vtkGetMacro(PartitionedFiles,
bool);
170 const std::pair<double, double>&
GetTimeRange()
const {
return this->TimeRange; }
171 const std::vector<double>&
GetTimeSteps()
const {
return this->TimeSteps; }
179 std::pair<double, double> TimeRange;
180 std::vector<double> TimeSteps;
195 std::vector<std::string> SplitFiles(
196 const std::vector<std::string>& files,
int piece,
int numPieces)
const;
198 void Broadcast(
int srcRank);
200 std::vector<double> AggregatedTimeSteps;
201 bool AggregatedTimeRangeValid;
202 std::pair<double, double> AggregatedTimeRange;
Superclass for all sources, filters, and sinks in VTK.
Helper class to process file series.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void SetController(vtkMultiProcessController *)
Get/Set the parallel controller.
virtual bool ReadMetaFile(const char *metafilename)
Setup file names in the series using a meta-file.
const std::vector< double > & GetTimeSteps() const
Returns the timesteps determined.
void FillTimeInformation(vtkInformation *info) const
Fills up info with information about timesteps and timerange.
void AddFileName(const char *fname)
Specify the set of files that comprise the series.
std::vector< std::string > FileNames
void SetFileNames(const std::vector< std::string > &filenames)
Specify the set of files that comprise the series.
virtual bool UpdateInformation(vtkAlgorithm *reader, const FileNameFunctorType &ftor)
vtkFileSeriesHelper needs to collect information about the nature of the fileseries.
~vtkFileSeriesHelper() override
vtkMultiProcessController * Controller
void RemoveAllFileNames()
Specify the set of files that comprise the series.
static vtkFileSeriesHelper * New()
unsigned int GetNumberOfFiles() const
Get the number of files in the series.
std::vector< std::string > GetActiveFiles(vtkInformation *outInfo) const
Returns the list of files to read on current rank to satisfy the request.
std::vector< vtkTimeInformation > Information
const std::pair< double, double > & GetTimeRange(bool *isvalid=nullptr) const
Returns the time range determined.
a simple class to control print indentation
Multiprocessing communication superclass.
stream used to pass data across processes using vtkMultiProcessController.
abstract base class for most VTK objects
record modification and/or execution time
vtkTypeUInt32 vtkMTimeType