clas12root
Loading...
Searching...
No Matches
vtp.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: vtp.h
9 * Author: dglazier
10 *
11 * Created on April 27, 2017, 10:01 AM
12 */
13
14#ifndef VTP_H
15#define VTP_H
16
17#include <hipo4/bank.h>
18#include <bitset>
19#include <memory>
20
21namespace clas12 {
22
23 class vtp : public hipo::bank {
24
25
26 public:
27 vtp(hipo::schema __schema);
28
29 int getCrate(int index){ return getInt(cr_order,index); }
30 int getWord(int index){ return getInt(wo_order,index); }
31 int getCrate(){ return getInt(cr_order,_index); }
32 int getWord(){ return getInt(wo_order,_index); }
33
39 long makeVTPTriggers();
40 void decodeVTPTrigger(int word1vtp, int word2vtp);
41 void addVTPTriggerToEvent(long pattern);
42
43 void setBankEntry(short i){ _index=i;} //faster for BankHist
44 void setEntry(int ind) const {_index=ind;}
45
46 private :
47
48 int cr_order{-1};
49 int wo_order{-1};
50 mutable int _index{0};
51
52 std::bitset<32> _VTPBitSet;
53 };
54
56 using vtp_uptr=std::unique_ptr<clas12::vtp>;
57
58}
59
60#endif /* UTILS_H */
Definition vtp.h:23
int getCrate()
Definition vtp.h:31
void addVTPTriggerToEvent(long pattern)
Definition vtp.cpp:70
void setEntry(int ind) const
Definition vtp.h:44
int getWord(int index)
Definition vtp.h:30
int getCrate(int index)
Definition vtp.h:29
void setBankEntry(short i)
Definition vtp.h:43
void decodeVTPTrigger(int word1vtp, int word2vtp)
Definition vtp.cpp:61
vtp(hipo::schema __schema)
Definition vtp.cpp:12
int getWord()
Definition vtp.h:32
long makeVTPTriggers()
Definition vtp.cpp:19
Definition calextras.cpp:10
std::unique_ptr< clas12::vtp > vtp_uptr
Definition vtp.h:56
clas12::vtp * vtp_ptr
Definition vtp.h:55