casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Adios2StManImpl.h
Go to the documentation of this file.
1 //# Adios2StManImpl.h: Implementation class definition of the ADIOS2 Storage Manager
2 //
3 //# ICRAR - International Centre for Radio Astronomy Research
4 //# (c) UWA - The University of Western Australia, 2018
5 //# Copyright by UWA (in the framework of the ICRAR)
6 //#
7 //# This library is free software; you can redistribute it and/or modify it
8 //# under the terms of the GNU Library General Public License as published by
9 //# the Free Software Foundation; either version 2 of the License, or (at your
10 //# option) any later version.
11 //#
12 //# This library is distributed in the hope that it will be useful, but WITHOUT
13 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 //# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
15 //# License for more details.
16 //#
17 //# You should have received a copy of the GNU Library General Public License
18 //# along with this library; if not, write to the Free Software Foundation,
19 //# Inc., 675 Massachusettes Ave, Cambridge, MA 02139, USA.
20 //#
21 //# Correspondence concerning AIPS++ should be addressed as follows:
22 //# Internet email: aips2-request@nrao.edu.
23 //# Postal address: AIPS++ Project Office
24 //# National Radio Astronomy Observatory
25 //# 520 Edgemont Road
26 //# Charlottesville, VA 22903-2475 USA
27 //#
28 
29 #ifndef ADIOS2STMANIMPL_H
30 #define ADIOS2STMANIMPL_H
31 
32 #include <adios2.h>
33 
34 #include "Adios2StMan.h"
35 
36 namespace casacore
37 {
38 
39 class Adios2StManColumn;
40 
42 {
43 public:
45  impl(Adios2StMan &parent, MPI_Comm mpiComm, std::string engineType,
46  std::map<std::string, std::string> engineParams,
47  std::vector<std::map<std::string, std::string>> transportParams);
48 
49  ~impl();
50 
51  DataManager *clone() const;
52  String dataManagerType() const;
53  String dataManagerName() const;
54  void create(uInt aNrRows);
55  void open(uInt aRowNr, AipsIO &ios);
56  void resync(uInt aRowNr);
57  Bool flush(AipsIO &ios, Bool doFsync);
58  DataManagerColumn *makeColumnCommon(const String &aName, int aDataType,
59  const String &aDataTypeID);
61  int aDataType,
62  const String &aDataTypeID);
64  int aDataType,
65  const String &aDataTypeID);
67  int aDataType,
68  const String &aDataTypeID);
69  void deleteManager();
70  void addRow(uInt aNrRows);
71  static DataManager *makeObject(const String &aDataManType,
72  const Record &spec);
73  uInt getNrRows();
74 
75 private:
77  String itsDataManName = "Adios2StMan";
81 
82  std::shared_ptr<adios2::ADIOS> itsAdios;
83  std::shared_ptr<adios2::IO> itsAdiosIO;
84  std::shared_ptr<adios2::Engine> itsAdiosEngine;
85 
87 
88  static std::string itsAdiosEngineType;
89  static adios2::Params itsAdiosEngineParams;
90  static std::vector<adios2::Params> itsAdiosTransportParamsVec;
91 
93 
94  uInt ncolumn() const { return parent.ncolumn(); }
95  String fileName() const { return parent.fileName(); }
96 };
97 
98 } // namespace casacore
99 
100 #endif // ADIOS2STMANIMPL_H
std::shared_ptr< adios2::IO > itsAdiosIO
impl(Adios2StMan &parent, MPI_Comm mpiComm=MPI_COMM_WORLD)
DataManager * clone() const
std::shared_ptr< adios2::ADIOS > itsAdios
uInt ncolumn() const
Get the nr of columns in this data manager (can be zero).
Definition: DataManager.h:289
int MPI_Comm
Definition: MPIGlue.h:59
AipsIO is the object persistency mechanism of Casacore.
Definition: AipsIO.h:168
Abstract base class for a column in a data manager.
Definition: DataManager.h:611
void addRow(uInt aNrRows)
String fileName() const
Compose a unique filename from the table name and sequence number.
DataManagerColumn * makeDirArrColumn(const String &aName, int aDataType, const String &aDataTypeID)
DataManagerColumn * makeIndArrColumn(const String &aName, int aDataType, const String &aDataTypeID)
void resync(uInt aRowNr)
DataManagerColumn * makeScalarColumn(const String &aName, int aDataType, const String &aDataTypeID)
void create(uInt aNrRows)
Bool flush(AipsIO &ios, Bool doFsync)
A hierarchical collection of named fields of various types.
Definition: Record.h:180
bool Bool
Define the standard types used by Casacore.
Definition: aipstype.h:42
#define MPI_COMM_WORLD
Definition: MPIGlue.h:65
std::shared_ptr< adios2::Engine > itsAdiosEngine
void open(uInt aRowNr, AipsIO &ios)
A drop-in replacement for Block&lt;T*&gt;.
Definition: WProjectFT.h:54
String dataManagerName() const
Abstract base class for a data manager.
Definition: DataManager.h:224
String: the storage and methods of handling collections of characters.
Definition: String.h:223
static adios2::Params itsAdiosEngineParams
static DataManager * makeObject(const String &aDataManType, const Record &spec)
DataManagerColumn * makeColumnCommon(const String &aName, int aDataType, const String &aDataTypeID)
static std::string itsAdiosEngineType
static std::vector< adios2::Params > itsAdiosTransportParamsVec
String dataManagerType() const
unsigned int uInt
Definition: aipstype.h:51
PtrBlock< Adios2StManColumn * > itsColumnPtrBlk
#define casacore
&lt;X11/Intrinsic.h&gt; #defines true, false, casacore::Bool, and String.
Definition: X11Intrinsic.h:42