NAGASH 0.9.8
Next Generation Analysis System
Loading...
Searching...
No Matches
EventVector.h
Go to the documentation of this file.
1//***************************************************************************************
4//***************************************************************************************
5
6#pragma once
7
8#include "NAGASH/Global.h"
9#include "NAGASH/Result.h"
10
11namespace NAGASH
12{
16 class EventVector : public Result
17 {
18 public:
19 EventVector(std::shared_ptr<MSGTool> MSG, std::shared_ptr<ConfigTool> c, const TString &rname, const TString &fname = "") : Result(MSG, c, rname, fname) {}
20
21 void BookVariable(const TString &name, int *value);
22 void BookVariable(const TString &name, long *value);
23 void BookVariable(const TString &name, double *value);
24 void BookVariable(const TString &name, bool *value);
25 void BookVariable(const TString &name, TString *value);
26 void BookVariable(const TString &name, TLorentzVector *value);
27 void BookVariable(const TString &name, std::vector<int> *value);
28 void BookVariable(const TString &name, std::vector<long> *value);
29 void BookVariable(const TString &name, std::vector<double> *value);
30 void BookVariable(const TString &name, std::vector<bool> *value);
31 void BookVariable(const TString &name, std::vector<TString> *value);
32 void BookVariable(const TString &name, std::vector<TLorentzVector> *value);
33
34 void SetVariableAddress(const TString &name, int *value);
35 void SetVariableAddress(const TString &name, long *value);
36 void SetVariableAddress(const TString &name, double *value);
37 void SetVariableAddress(const TString &name, bool *value);
38 void SetVariableAddress(const TString &name, TString *value);
39 void SetVariableAddress(const TString &name, TLorentzVector *value);
40 void SetVariableAddress(const TString &name, std::vector<int> *value);
41 void SetVariableAddress(const TString &name, std::vector<long> *value);
42 void SetVariableAddress(const TString &name, std::vector<double> *value);
43 void SetVariableAddress(const TString &name, std::vector<bool> *value);
44 void SetVariableAddress(const TString &name, std::vector<TString> *value);
45 void SetVariableAddress(const TString &name, std::vector<TLorentzVector> *value);
46
47 void GetEvent(int ie);
48 void Fill();
49 int Size();
50 void Combine(std::shared_ptr<Result> result) override;
51
52 private:
53 std::map<TString, std::vector<int>> ValueMapInt;
54 std::map<TString, std::vector<long>> ValueMapLong;
55 std::map<TString, std::vector<double>> ValueMapDouble;
56 std::map<TString, std::vector<bool>> ValueMapBool;
57 std::map<TString, std::vector<TString>> ValueMapTString;
58 std::map<TString, std::vector<TLorentzVector>> ValueMapTLorentzVector;
59 std::map<TString, std::vector<std::vector<int>>> ValueMapIntVec;
60 std::map<TString, std::vector<std::vector<long>>> ValueMapLongVec;
61 std::map<TString, std::vector<std::vector<double>>> ValueMapDoubleVec;
62 std::map<TString, std::vector<std::vector<bool>>> ValueMapBoolVec;
63 std::map<TString, std::vector<std::vector<TString>>> ValueMapTStringVec;
64 std::map<TString, std::vector<std::vector<TLorentzVector>>> ValueMapTLorentzVectorVec;
65
66 std::map<int *, std::vector<int> *> BookVarMapInt;
67 std::map<long *, std::vector<long> *> BookVarMapLong;
68 std::map<double *, std::vector<double> *> BookVarMapDouble;
69 std::map<bool *, std::vector<bool> *> BookVarMapBool;
70 std::map<TString *, std::vector<TString> *> BookVarMapTString;
71 std::map<TLorentzVector *, std::vector<TLorentzVector> *> BookVarMapTLorentzVector;
72 std::map<std::vector<int> *, std::vector<std::vector<int>> *> BookVarMapIntVec;
73 std::map<std::vector<long> *, std::vector<std::vector<long>> *> BookVarMapLongVec;
74 std::map<std::vector<double> *, std::vector<std::vector<double>> *> BookVarMapDoubleVec;
75 std::map<std::vector<bool> *, std::vector<std::vector<bool>> *> BookVarMapBoolVec;
76 std::map<std::vector<TString> *, std::vector<std::vector<TString>> *> BookVarMapTStringVec;
77 std::map<std::vector<TLorentzVector> *, std::vector<std::vector<TLorentzVector>> *> BookVarMapTLorentzVectorVec;
78
79 std::map<int *, std::vector<int> *> SetVarMapInt;
80 std::map<long *, std::vector<long> *> SetVarMapLong;
81 std::map<double *, std::vector<double> *> SetVarMapDouble;
82 std::map<bool *, std::vector<bool> *> SetVarMapBool;
83 std::map<TString *, std::vector<TString> *> SetVarMapTString;
84 std::map<TLorentzVector *, std::vector<TLorentzVector> *> SetVarMapTLorentzVector;
85 std::map<std::vector<int> *, std::vector<std::vector<int>> *> SetVarMapIntVec;
86 std::map<std::vector<long> *, std::vector<std::vector<long>> *> SetVarMapLongVec;
87 std::map<std::vector<double> *, std::vector<std::vector<double>> *> SetVarMapDoubleVec;
88 std::map<std::vector<bool> *, std::vector<std::vector<bool>> *> SetVarMapBoolVec;
89 std::map<std::vector<TString> *, std::vector<std::vector<TString>> *> SetVarMapTStringVec;
90 std::map<std::vector<TLorentzVector> *, std::vector<std::vector<TLorentzVector>> *> SetVarMapTLorentzVectorVec;
91
92 int size = 0;
93 };
94
95 inline int EventVector::Size()
96 {
97 return size;
98 }
99} // namespace NAGASH
Some global definitions.
Deprecated. It's better to use user defined event vector.
Definition EventVector.h:17
std::map< std::vector< TLorentzVector > *, std::vector< std::vector< TLorentzVector > > * > SetVarMapTLorentzVectorVec
Definition EventVector.h:90
std::map< std::vector< TString > *, std::vector< std::vector< TString > > * > SetVarMapTStringVec
Definition EventVector.h:89
EventVector(std::shared_ptr< MSGTool > MSG, std::shared_ptr< ConfigTool > c, const TString &rname, const TString &fname="")
Definition EventVector.h:19
std::map< TString, std::vector< TString > > ValueMapTString
Definition EventVector.h:57
void GetEvent(int ie)
std::map< double *, std::vector< double > * > BookVarMapDouble
Definition EventVector.h:68
std::map< std::vector< int > *, std::vector< std::vector< int > > * > SetVarMapIntVec
Definition EventVector.h:85
std::map< TString, std::vector< std::vector< long > > > ValueMapLongVec
Definition EventVector.h:60
std::map< long *, std::vector< long > * > SetVarMapLong
Definition EventVector.h:80
std::map< std::vector< bool > *, std::vector< std::vector< bool > > * > BookVarMapBoolVec
Definition EventVector.h:75
std::map< TString, std::vector< std::vector< TLorentzVector > > > ValueMapTLorentzVectorVec
Definition EventVector.h:64
std::map< TString, std::vector< std::vector< TString > > > ValueMapTStringVec
Definition EventVector.h:63
std::map< int *, std::vector< int > * > BookVarMapInt
Definition EventVector.h:66
std::map< TString *, std::vector< TString > * > SetVarMapTString
Definition EventVector.h:83
std::map< TString *, std::vector< TString > * > BookVarMapTString
Definition EventVector.h:70
std::map< TString, std::vector< std::vector< int > > > ValueMapIntVec
Definition EventVector.h:59
void SetVariableAddress(const TString &name, int *value)
std::map< double *, std::vector< double > * > SetVarMapDouble
Definition EventVector.h:81
std::map< std::vector< bool > *, std::vector< std::vector< bool > > * > SetVarMapBoolVec
Definition EventVector.h:88
std::map< TLorentzVector *, std::vector< TLorentzVector > * > SetVarMapTLorentzVector
Definition EventVector.h:84
std::map< TLorentzVector *, std::vector< TLorentzVector > * > BookVarMapTLorentzVector
Definition EventVector.h:71
void BookVariable(const TString &name, int *value)
std::map< std::vector< TLorentzVector > *, std::vector< std::vector< TLorentzVector > > * > BookVarMapTLorentzVectorVec
Definition EventVector.h:77
std::map< TString, std::vector< std::vector< double > > > ValueMapDoubleVec
Definition EventVector.h:61
std::map< bool *, std::vector< bool > * > SetVarMapBool
Definition EventVector.h:82
std::map< TString, std::vector< TLorentzVector > > ValueMapTLorentzVector
Definition EventVector.h:58
std::map< std::vector< TString > *, std::vector< std::vector< TString > > * > BookVarMapTStringVec
Definition EventVector.h:76
std::map< std::vector< long > *, std::vector< std::vector< long > > * > BookVarMapLongVec
Definition EventVector.h:73
std::map< std::vector< long > *, std::vector< std::vector< long > > * > SetVarMapLongVec
Definition EventVector.h:86
std::map< std::vector< int > *, std::vector< std::vector< int > > * > BookVarMapIntVec
Definition EventVector.h:72
std::map< int *, std::vector< int > * > SetVarMapInt
Definition EventVector.h:79
std::map< TString, std::vector< bool > > ValueMapBool
Definition EventVector.h:56
std::map< TString, std::vector< std::vector< bool > > > ValueMapBoolVec
Definition EventVector.h:62
std::map< TString, std::vector< double > > ValueMapDouble
Definition EventVector.h:55
std::map< TString, std::vector< int > > ValueMapInt
Definition EventVector.h:53
void Combine(std::shared_ptr< Result > result) override
Return the name of the output file.
std::map< TString, std::vector< long > > ValueMapLong
Definition EventVector.h:54
std::map< std::vector< double > *, std::vector< std::vector< double > > * > BookVarMapDoubleVec
Definition EventVector.h:74
std::map< std::vector< double > *, std::vector< std::vector< double > > * > SetVarMapDoubleVec
Definition EventVector.h:87
std::map< bool *, std::vector< bool > * > BookVarMapBool
Definition EventVector.h:69
std::map< long *, std::vector< long > * > BookVarMapLong
Definition EventVector.h:67
Provide virtual interface to manipulate all the results inside NAGASH.
Definition Result.h:68