HIPO4 C++ Library 4.4.1
Columnar I/O library for CLAS12 physics data
Loading...
Searching...
No Matches
tuple.h
Go to the documentation of this file.
1//******************************************************************************
2//* ██╗ ██╗██╗██████╗ ██████╗ ██╗ ██╗ ██████╗ *
3//* ██║ ██║██║██╔══██╗██╔═══██╗ ██║ ██║ ██╔═████╗ *
4//* ███████║██║██████╔╝██║ ██║ ███████║ ██║██╔██║ *
5//* ██╔══██║██║██╔═══╝ ██║ ██║ ╚════██║ ████╔╝██║ *
6//* ██║ ██║██║██║ ╚██████╔╝ ██║██╗╚██████╔╝ *
7//* ╚═╝ ╚═╝╚═╝╚═╝ ╚═════╝ ╚═╝╚═╝ ╚═════╝ *
8//************************ Jefferson National Lab (2017) ***********************
9/*
10 * Copyright (c) 2017. Jefferson Lab (JLab). All rights reserved. Permission
11 * to use, copy, modify, and distribute this software and its documentation
12 * for educational, research, and not-for-profit purposes, without fee and
13 * without a signed licensing agreement.
14 *
15 * IN NO EVENT SHALL JLAB BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL
16 * INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, ARISING
17 * OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF JLAB HAS
18 * BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
19 *
20 * JLAB SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
21 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 * PURPOSE. THE HIPO DATA FORMAT SOFTWARE AND ACCOMPANYING DOCUMENTATION, IF
23 * ANY, PROVIDED HEREUNDER IS PROVIDED "AS IS". JLAB HAS NO OBLIGATION TO
24 * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
25 *
26 * This software was developed under the United States Government license.
27 * For more information contact author at gavalian@jlab.org
28 * Department of Experimental Nuclear Physics, Jefferson Lab.
29 */
30/*
31 * File: event.h
32 * Author: gavalian
33 *
34 * Created on August 15, 2022, 17:04 PM
35 */
36
37#ifndef HIPO_TUPLE_H
38#define HIPO_TUPLE_H
39
40#include <iostream>
41#include <vector>
42#include <cstring>
43#include <cstdint>
44#include <cstdio>
45#include <cstdlib>
46#include <map>
47#include "writer.h"
48
49// if the library is compiled with C++11
50// support we will use unordered map which
51// is faster than standard map
52#if __cplusplus > 199711L
53#include <unordered_map>
54#endif
55
56
57namespace hipo {
58
59 //typedef std::auto_ptr<hipo::generic_node> node_pointer;
60
61 class tuple {
62
63 private:
64 std::vector<hipo::structure *> branches;
65 int currentPosition = 0;
68
69 protected:
70
71 void writeAndUpdate();
72
73 public:
74
75 tuple();
76 tuple(const char *format);
77 virtual ~tuple();
78
79 void open(const char *file);
80 void initBranches(int size);
81 void setVerbose(int level){ writer.setVerbose(level);}
82 void fill(const float *array);
83 void close();
84 };
85}
86
87#endif /* TUPLE_H */
Definition event.h:62
Definition tuple.h:61
virtual ~tuple()
Definition tuple.cpp:49
void fill(const float *array)
Definition tuple.cpp:62
void setVerbose(int level)
Definition tuple.h:81
void close()
Definition tuple.cpp:74
void open(const char *file)
Definition tuple.cpp:70
void initBranches(int size)
Definition tuple.cpp:56
tuple()
Definition tuple.cpp:42
void writeAndUpdate()
Definition tuple.cpp:78
READER index class is used to construct entire events sequence from all records, and provides ability...
Definition writer.h:135
void setVerbose(int level)
Definition writer.h:167
HIPO namespace is used for the classes that read/write files and records.
Definition bank.cpp:45