evio  6.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
EvioTagSegment.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_EVIOTAGSEGMENT_H
12 #define EVIO_6_0_EVIOTAGSEGMENT_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 "TagSegmentHeader.h"
23 #include "StructureType.h"
24 
25 
26 namespace evio {
27 
35  class EvioTagSegment : public BaseStructure {
36 
37 
38  private:
39 
44  explicit EvioTagSegment(std::shared_ptr<TagSegmentHeader> const & head) : BaseStructure(head) {}
45 
46  public:
47 
53  static std::shared_ptr<EvioTagSegment> getInstance(std::shared_ptr<TagSegmentHeader> const & head) {
54  std::shared_ptr<EvioTagSegment> pNode(new EvioTagSegment(head));
55  return pNode;
56  }
57 
64  static std::shared_ptr<EvioTagSegment> getInstance(uint16_t tag, DataType const & typ) {
65  std::shared_ptr<TagSegmentHeader> head(new TagSegmentHeader(tag, typ));
66  std::shared_ptr<EvioTagSegment> pNode(new EvioTagSegment(head));
67  return pNode;
68  }
69 
77  StructureType getStructureType() const override {
79  }
80 
81  };
82 
83 }
84 
85 
86 #endif //EVIO_6_0_EVIOTAGSEGMENT_H
StructureType getStructureType() const override
This implements the virtual method from BaseStructure.
Definition: EvioTagSegment.h:77
static const StructureType STRUCT_TAGSEGMENT
Tag segment.
Definition: StructureType.h:39
This is the base class for all evio structures: Banks, Segments, and TagSegments. ...
Definition: BaseStructure.h:347
This the header for an evio tagsegment structure (EvioTagSegment).
Definition: TagSegmentHeader.h:36
static std::shared_ptr< EvioTagSegment > getInstance(std::shared_ptr< TagSegmentHeader > const &head)
Method to return a shared pointer to a constructed object of this class.
Definition: EvioTagSegment.h:53
Numerical values associated with evio data types.
Definition: DataType.h:32
This holds a CODA TagSegment structure.
Definition: EvioTagSegment.h:35
static std::shared_ptr< EvioTagSegment > getInstance(uint16_t tag, DataType const &typ)
Method to return a shared pointer to a constructed object of this class.
Definition: EvioTagSegment.h:64
Numerical values associated with evio structure types.
Definition: StructureType.h:34
BaseStructure()
Constructor.
Definition: BaseStructure.cpp:28