CGEM BOSS 6.6.5.i
BESIII Offline Software System
Loading...
Searching...
No Matches
Supersede.h
Go to the documentation of this file.
1// $Header: /bes/bes/BossCvs/Calibration/rdbModel/rdbModel/Tables/Supersede.h,v 1.1.1.1 2005/10/17 06:10:53 maqm Exp $
2#ifndef RDBMODEL_SUPSERSEDE_H
3#define RDBMODEL_SUPERSEDE_H
4#include <vector>
5#include <string>
7
8namespace rdbModel{
9
10 class Set;
11 class Table;
12 class Assertion;
13
14 /**
15 Supersede operation needs to
16 o change one or more column values in row being superseded
17 o set values in new, superseding row. Default is to assume
18 values come from the old row; only specify those that don't
19 */
20 class Supersede {
21 public:
22 Supersede(Table* table, Assertion* onlyIf=0);
23
24 ~Supersede();
25
26 const std::vector<Set*>& getSetOld() const {return m_setOld;}
27 const std::vector<Set*>& getSetNew() const {return m_setOld;}
28
29 void addSet(Set* s);
30
31 const Table* getTable() const {return m_myTable;}
32
34
35 Assertion* getOnlyIf() {return m_onlyIf;}
36
37 const std::vector<std::string>& getAsk() const {
38 return m_ask; }
39
40 const std::vector<std::string>& getOldDefaulted() const {
41 return m_oldDefaults; }
42
43 const std::vector<std::string>& getFromOld() const {
44 return m_fromOld;}
45
46 const std::vector<FieldVal>& getFixed() const { return m_fixed;}
47 const std::vector<std::string>& getFixedInterp() const {
48 return m_fixedInterp;}
49
50 const std::vector<std::string>& getForced() const { return m_oldForced;}
51
52
53
54
55 // Might want to get rid of this; should know assertion by constructor
56 // time.
57 void setOnlyIf(Assertion* onlyIf) {m_onlyIf = onlyIf;}
58
59 /**
60 Initialize m_oldDefaults, m_oldForced, m_ask and m_fixed if it
61 hasn't been done already
62 */
63 void normalize();
64
65 private:
66 Table* m_myTable;
67 // bool m_keepOp;
68 Assertion* m_onlyIf; // conditions row must meet to make it supersedable.
69 std::vector<Set*> m_setOld;
70 std::vector<Set*> m_setNew;
71 /** Always need to fetch the same set of columns from the row to be
72 superseded. Some of the values must be used in the new row;
73 others are just defaults.
74 */
75 /// column names where old-row value is to be used as default
76 std::vector<std::string> m_oldDefaults;
77 /// column names where old-row value is to be copied to new row
78 std::vector<std::string> m_oldForced;
79
80 /// Names of columns for which client must supply a value (no default)
81 std::vector<std::string> m_ask;
82
83 /// Names of columns for which <supersede> supplies fixed value for new row
84 std::vector<FieldVal> m_fixed;
85
86 /// Parallel vector to keep track of which among fixed columns
87 /// require further interpretation. May want to move this into FieldVal
88 std::vector<std::string> m_fixedInterp;
89
90 /// Name of all columns to be fetched from old row by Table::supersedeRow
91 std::vector<std::string> m_fromOld;
92
93 bool m_normalized;
94
95
96 };
97}
98#endif
99
XmlRpcServer s
**********Class see also m_nmax DOUBLE PRECISION m_amel DOUBLE PRECISION m_x2 DOUBLE PRECISION m_alfinv DOUBLE PRECISION m_Xenph INTEGER m_KeyWtm INTEGER m_idyfs DOUBLE PRECISION m_zini DOUBLE PRECISION m_q2 DOUBLE PRECISION m_Wt_KF DOUBLE PRECISION m_WtCut INTEGER m_KFfin *COMMON c_KarLud $ !Input CMS energy[GeV] $ !CMS energy after beam spread beam strahlung[GeV] $ !Beam energy spread[GeV] $ !z boost due to beam spread $ !electron beam mass *ff pair spectrum $ !minimum v
Definition KarLud.h:35
Supersede(Table *table, Assertion *onlyIf=0)
Definition Supersede.cxx:9
Assertion * getOnlyIf()
Definition Supersede.h:35
const std::vector< FieldVal > & getFixed() const
Definition Supersede.h:46
void setOnlyIf(Assertion *onlyIf)
Definition Supersede.h:57
const std::vector< std::string > & getFixedInterp() const
Definition Supersede.h:47
const std::vector< std::string > & getFromOld() const
Definition Supersede.h:43
const std::vector< std::string > & getOldDefaulted() const
Definition Supersede.h:40
const Table * getTable() const
Definition Supersede.h:31
void addSet(Set *s)
Definition Supersede.cxx:19
const std::vector< std::string > & getAsk() const
Definition Supersede.h:37
Visitor::VisitorState accept(Visitor *v)
Definition Supersede.cxx:90
const std::vector< Set * > & getSetNew() const
Definition Supersede.h:27
const std::vector< Set * > & getSetOld() const
Definition Supersede.h:26
const std::vector< std::string > & getForced() const
Definition Supersede.h:50