evio  6.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
EvioBank.h
Go to the documentation of this file.
1 //
2 // Copyright 2020, Jefferson Science Associates, LLC.
3 // Subject to the terms in the LICENSE file found in the top-level directory.
4 //
5 // EPSCI Group
6 // Thomas Jefferson National Accelerator Facility
7 // 12000, Jefferson Ave, Newport News, VA 23606
8 // (757)-269-7100
9 
10 
11 #ifndef EVIO_6_0_EVIOBANK_H
12 #define EVIO_6_0_EVIOBANK_H
13 
14 
15 #include <cstring>
16 #include <memory>
17 
18 
19 #include "ByteBuffer.h"
20 #include "DataType.h"
21 #include "BaseStructure.h"
22 #include "BankHeader.h"
23 #include "StructureType.h"
24 
25 
26 namespace evio {
27 
28 
36  class EvioBank : public BaseStructure {
37 
38 
39  protected:
40 
43 
48  explicit EvioBank(std::shared_ptr<BankHeader> const & head) : BaseStructure(head) {}
49 
50  public:
51 
57  static std::shared_ptr<EvioBank> getInstance() {
58  std::shared_ptr<EvioBank> pNode(new EvioBank());
59  return pNode;
60  }
61 
67  static std::shared_ptr<EvioBank> getInstance(std::shared_ptr<BankHeader> const & head) {
68  std::shared_ptr<EvioBank> pNode(new EvioBank(head));
69  return pNode;
70  }
71 
79  static std::shared_ptr<EvioBank> getInstance(uint16_t tag, DataType const & typ, uint8_t num) {
80  std::shared_ptr<BankHeader> head(new BankHeader(tag, typ, num));
81  std::shared_ptr<EvioBank> pNode(new EvioBank(head));
82  return pNode;
83  }
84 
92  StructureType getStructureType() const override {
94  }
95 
96  };
97 
98 }
99 #endif //EVIO_6_0_EVIOBANK_H
100 
101 
102 
103 
static std::shared_ptr< EvioBank > getInstance(uint16_t tag, DataType const &typ, uint8_t num)
Method to return a shared pointer to a constructed object of this class.
Definition: EvioBank.h:79
EvioBank()
Constructor.
Definition: EvioBank.h:42
This is the base class for all evio structures: Banks, Segments, and TagSegments. ...
Definition: BaseStructure.h:347
static const StructureType STRUCT_BANK
Bank.
Definition: StructureType.h:41
StructureType getStructureType() const override
This implements the virtual method from BaseStructure.
Definition: EvioBank.h:92
This the header for an evio bank structure (EvioBank).
Definition: BankHeader.h:35
EvioBank(std::shared_ptr< BankHeader > const &head)
Constructor.
Definition: EvioBank.h:48
This holds a CODA Bank structure.
Definition: EvioBank.h:36
Numerical values associated with evio data types.
Definition: DataType.h:32
static std::shared_ptr< EvioBank > getInstance()
Method to return a shared pointer to a constructed object of this class.
Definition: EvioBank.h:57
static std::shared_ptr< EvioBank > getInstance(std::shared_ptr< BankHeader > const &head)
Method to return a shared pointer to a constructed object of this class.
Definition: EvioBank.h:67
Numerical values associated with evio structure types.
Definition: StructureType.h:34