IODA Bundle
BufrCollector.h
Go to the documentation of this file.
1 /*
2  * (C) Copyright 2020 NOAA/NWS/NCEP/EMC
3  *
4  * This software is licensed under the terms of the Apache Licence Version 2.0
5  * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
6  */
7 
8 #pragma once
9 
10 #include <set>
11 #include <string>
12 
13 #include "Eigen/Dense"
14 
15 #include "BufrParser/BufrTypes.h"
17 #include "BufrAccumulator.h"
18 
19 
20 namespace Ingester
21 {
22  /// \brief Collectors know how to use the BUFR interface to grab data associated with
23  /// configured mnemonicSets.
25  {
26  public:
27  BufrCollector(const int fortranFileId, const BufrMnemonicSet mnemonicSet);
28  virtual ~BufrCollector() = default;
29 
30  /// \brief Grab the data
31  virtual void collect() = 0;
32 
33  /// \brief Get the data we want from the accumulator and make our data map. Resets
34  /// the accumulator.
36 
37  protected:
38  /// \brief Fortran file ID for the open BUFR file
39  const int fortranFileId_;
40 
41  /// \brief Accumulator to collect the data we are collecting
43 
44  /// \brief Specifies the mnemonics and channels this collector gets from the BUFR file.
46  };
47 } // namespace Ingester
Accumulates provided data into a dynamically expanding Eigen Array.
Collectors know how to use the BUFR interface to grab data associated with configured mnemonicSets.
Definition: BufrCollector.h:25
virtual void collect()=0
Grab the data.
BufrCollector(const int fortranFileId, const BufrMnemonicSet mnemonicSet)
BufrDataMap finalize()
Get the data we want from the accumulator and make our data map. Resets the accumulator.
BufrAccumulator accumulator_
Accumulator to collect the data we are collecting.
Definition: BufrCollector.h:42
const BufrMnemonicSet mnemonicSet_
Specifies the mnemonics and channels this collector gets from the BUFR file.
Definition: BufrCollector.h:45
const int fortranFileId_
Fortran file ID for the open BUFR file.
Definition: BufrCollector.h:39
virtual ~BufrCollector()=default
Defenition of BUFR mnemonics and associated channels of interest.
IngesterArrayMap BufrDataMap
Definition: BufrTypes.h:21