clas12root
Loading...
Searching...
No Matches
runconfig.h
Go to the documentation of this file.
1/*
2 * To change this license header, choose License Headers in Project Properties.
3 * To change this template file, choose Tools | Templates
4 * and open the template in the editor.
5 */
6
7/*
8 * File: runconfig.h
9 * Author: dglazier
10 *
11 * Created on April 27, 2017, 10:01 AM
12 */
13
14#ifndef RUNCONFIG_H
15#define RUNCONFIG_H
16
17#include <iostream>
18#include <vector>
19#include <memory>
20#include <hipo4/bank.h>
21
22namespace clas12 {
23
24 class runconfig : public hipo::bank {
25
26
27 public:
28
29
30 runconfig(hipo::schema __schema);
31 virtual ~runconfig() = default;
32
33 int getRun() const noexcept{ return getInt(_run_order,0); }
34 int getEvent() const noexcept{ return getInt(_ev_order,0); }
35 int getUnixTime() const noexcept{ return getInt(_ut_order,0); }
36 long getTrigger() const noexcept{ return getLong(_tr_order,0); }
37 long getTimeStamp() const noexcept{ return getLong(_ts_order,0); }
38 int getType() const noexcept{ return getByte(_ty_order,0); }
39 int getMode() const noexcept{ return getByte(_mo_order,0); }
40 float getTorus() const noexcept{ return getFloat(_to_order,0); }
41 float getSolenoid() const noexcept{ return getFloat(_so_order,0); }
42
43
49 void notify() final{
50 bank::notify();
51 }
52 void setEntry(int i) const{}
53 void setBankEntry(int ind){}
54
55 private :
56
57
58 int _run_order{-1};
59 int _ev_order{-1};
60 int _ut_order{-1};
61 int _tr_order{-1};
62 int _ts_order{-1};
63 int _ty_order{-1};
64 int _mo_order{-1};
65 int _to_order{-1};
66 int _so_order{-1};
67
68
69 };
70
72 using runconfig_uptr=std::unique_ptr<clas12::runconfig>;
73
74}
75
76#endif /* UTILS_H */
Definition runconfig.h:24
int getRun() const noexcept
Definition runconfig.h:33
runconfig(hipo::schema __schema)
Definition runconfig.cpp:13
virtual ~runconfig()=default
int getMode() const noexcept
Definition runconfig.h:39
long getTrigger() const noexcept
Definition runconfig.h:36
void notify() final
Definition runconfig.h:49
float getTorus() const noexcept
Definition runconfig.h:40
int getUnixTime() const noexcept
Definition runconfig.h:35
void setEntry(int i) const
Definition runconfig.h:52
float getSolenoid() const noexcept
Definition runconfig.h:41
int getEvent() const noexcept
Definition runconfig.h:34
long getTimeStamp() const noexcept
Definition runconfig.h:37
void setBankEntry(int ind)
Definition runconfig.h:53
int getType() const noexcept
Definition runconfig.h:38
Definition calextras.cpp:10
clas12::runconfig * runconfig_ptr
Definition runconfig.h:71
std::unique_ptr< clas12::runconfig > runconfig_uptr
Definition runconfig.h:72