clas12root
Loading...
Searching...
No Matches
event.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: event.h
9 * Author: dglazier
10 *
11 */
12
13#ifndef CLAS12_EVENT_H
14#define CLAS12_EVENT_H
15
16#include <iostream>
17#include <vector>
18#include <memory>
19#include <hipo4/bank.h>
20#include "ftbevent.h"
21
22namespace clas12 {
23
24 class event : public hipo::bank {
25
26
27 public:
28
29
30 event(hipo::schema __schema);
31 event(hipo::schema __schema,ftbevent_ptr ftb);
32 virtual ~event() = default;
33
34 long getCategory() const noexcept{ return getLong(_cat_order,0); }
35 long getTopology() const noexcept{ return getLong(_top_order,0); }
36 float getBeamCharge() const noexcept{ return getFloat(_bch_order,0); }
37 int getHelicity() const noexcept{ return getByte(_hel_order,0); }
38 int getHelicityRaw() const noexcept{ return getByte(_helr_order,0); }
39 float getStartTime() const noexcept{ return getFloat(_st_order,0); }
40 float getRFTime() const noexcept{ return getFloat(_rf_order,0); }
41 float getProcTime() const noexcept{ return getFloat(_pt_order,0); }
42 double getLiveTime() const noexcept{ return getDouble(_lt_order,0); }
43
44 float getFTBStartTime() const noexcept{ if(_ftev) return _ftev->getStartTime();return 0; }
45
51 void notify() final{
52 bank::notify();
53 }
54 void setEntry(int ind) const{}
55 void setBankEntry(int ind){}
56
57 private :
58
59 ftbevent_ptr _ftev; //for FTbased start time
60
61 int _cat_order{-1};
62 int _top_order{-1};
63 int _bch_order{-1};
64 int _hel_order{-1};
65 int _helr_order{-1};
66 int _st_order{-1};
67 int _rf_order{-1};
68 int _pt_order{-1};
69 int _lt_order{-1};
70
71
72 };
73
75 using event_uptr=std::unique_ptr<clas12::event>;
76
77}
78
79#endif /* UTILS_H */
Definition event.h:24
float getFTBStartTime() const noexcept
Definition event.h:44
float getStartTime() const noexcept
Definition event.h:39
void setEntry(int ind) const
Definition event.h:54
long getTopology() const noexcept
Definition event.h:35
float getBeamCharge() const noexcept
Definition event.h:36
int getHelicityRaw() const noexcept
Definition event.h:38
double getLiveTime() const noexcept
Definition event.h:42
float getRFTime() const noexcept
Definition event.h:40
long getCategory() const noexcept
Definition event.h:34
virtual ~event()=default
void setBankEntry(int ind)
Definition event.h:55
float getProcTime() const noexcept
Definition event.h:41
event(hipo::schema __schema)
Definition event.cpp:26
int getHelicity() const noexcept
Definition event.h:37
void notify() final
Definition event.h:51
Definition calextras.cpp:10
std::unique_ptr< clas12::event > event_uptr
Definition event.h:75
clas12::event * event_ptr
Definition event.h:74
clas12::ftbevent * ftbevent_ptr
Definition ftbevent.h:55