VTK
vtkPNetCDFPOPReader.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtPkNetCDFPOPReader.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
30 #ifndef __vtkPNetCDFPOPReader_h
31 #define __vtkPNetCDFPOPReader_h
32 
34 
36 class vtkCallbackCommand;
37 class vtkMPIController;
38 class vtkPNetCDFPOPReaderInternal;
39 
41 {
42 public:
44  static vtkPNetCDFPOPReader *New();
45  void PrintSelf(ostream& os, vtkIndent indent);
46 
48 
49  vtkSetStringMacro(FileName);
50  vtkGetStringMacro(FileName);
52 
54 
55  vtkSetVector3Macro(Stride, int);
56  vtkGetVector3Macro(Stride, int);
58 
60 
61  virtual int GetNumberOfVariableArrays();
62  virtual const char *GetVariableArrayName(int idx);
63  virtual int GetVariableArrayStatus(const char *name);
64  virtual void SetVariableArrayStatus(const char *name, int status);
66 
68 
70  vtkGetObjectMacro(Controller, vtkMPIController);
71  void SetController(vtkMPIController *controller);
73 
75  void SetReaderRanks(vtkIdList*);
76 
84  void SetNumberOfReaderProcesses(int number);
85 
86 protected:
89 
92  virtual int RequestInformation(vtkInformation* request,
93  vtkInformationVector** inputVector,
94  vtkInformationVector* outputVector);
95 
99  void AssignRoundRobin(int numReaders, vtkIdList* readerRanks);
100 
101  // Functions added by RGM....
102 
105  int ReadAndSend( vtkInformation* outInfo, int varID);
106 
109  int ReaderForDepth( unsigned depth);
110 
111  bool IsReaderRank();
112  bool IsFirstReaderRank();
113 
114  // end of functions added by RGM...
115 
116  static void SelectionModifiedCallback(vtkObject *caller, unsigned long eid,
117  void *clientdata, void *calldata);
118 
119  static void EventCallback(vtkObject* caller, unsigned long eid,
120  void* clientdata, void* calldata);
121 
123 
124  char *FileName;
126  vtkSetStringMacro(OpenedFileName);
127 
128  int NCDFFD; //netcdf file descriptor
129 
130  int Stride[3];
131 
133 
134 private:
135  vtkPNetCDFPOPReader(const vtkPNetCDFPOPReader&); // Not implemented.
136  void operator=(const vtkPNetCDFPOPReader&); // Not implemented.
137 
138  vtkPNetCDFPOPReaderInternal* Internals;
139 };
140 #endif