BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
Calibration/rdbModel/include/rdbModel/Tables/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
2// 2005/10/17 06:10:53 maqm Exp $
3#ifndef RDBMODEL_SUPSERSEDE_H
4# define RDBMODEL_SUPERSEDE_H
5# include "Column.h"
6# include "rdbModel/Management/Visitor.h"
7# include <string>
8# include <vector>
9
10namespace rdbModel {
11
12 class Set;
13 class Table;
14 class Assertion;
15
16 /**
17 Supersede operation needs to
18 o change one or more column values in row being superseded
19 o set values in new, superseding row. Default is to assume
20 values come from the old row; only specify those that don't
21 */
22 class Supersede {
23 public:
24 Supersede( Table* table, Assertion* onlyIf = 0 );
25
26 ~Supersede();
27
28 const std::vector<Set*>& getSetOld() const { return m_setOld; }
29 const std::vector<Set*>& getSetNew() const { return m_setOld; }
30
31 void addSet( Set* s );
32
33 const Table* getTable() const { return m_myTable; }
34
36
37 Assertion* getOnlyIf() { return m_onlyIf; }
38
39 const std::vector<std::string>& getAsk() const { return m_ask; }
40
41 const std::vector<std::string>& getOldDefaulted() const { return m_oldDefaults; }
42
43 const std::vector<std::string>& getFromOld() const { return m_fromOld; }
44
45 const std::vector<FieldVal>& getFixed() const { return m_fixed; }
46 const std::vector<std::string>& getFixedInterp() const { return m_fixedInterp; }
47
48 const std::vector<std::string>& getForced() const { return m_oldForced; }
49
50 // Might want to get rid of this; should know assertion by constructor
51 // time.
52 void setOnlyIf( Assertion* onlyIf ) { m_onlyIf = onlyIf; }
53
54 /**
55 Initialize m_oldDefaults, m_oldForced, m_ask and m_fixed if it
56 hasn't been done already
57 */
58 void normalize();
59
60 private:
61 Table* m_myTable;
62 // bool m_keepOp;
63 Assertion* m_onlyIf; // conditions row must meet to make it supersedable.
64 std::vector<Set*> m_setOld;
65 std::vector<Set*> m_setNew;
66 /** Always need to fetch the same set of columns from the row to be
67 superseded. Some of the values must be used in the new row;
68 others are just defaults.
69 */
70 /// column names where old-row value is to be used as default
71 std::vector<std::string> m_oldDefaults;
72 /// column names where old-row value is to be copied to new row
73 std::vector<std::string> m_oldForced;
74
75 /// Names of columns for which client must supply a value (no default)
76 std::vector<std::string> m_ask;
77
78 /// Names of columns for which <supersede> supplies fixed value for new row
79 std::vector<FieldVal> m_fixed;
80
81 /// Parallel vector to keep track of which among fixed columns
82 /// require further interpretation. May want to move this into FieldVal
83 std::vector<std::string> m_fixedInterp;
84
85 /// Name of all columns to be fetched from old row by Table::supersedeRow
86 std::vector<std::string> m_fromOld;
87
88 bool m_normalized;
89 };
90} // namespace rdbModel
91#endif
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:10
const std::vector< FieldVal > & getFixed() const
const std::vector< std::string > & getFixedInterp() const
const std::vector< std::string > & getFromOld() const
const std::vector< std::string > & getOldDefaulted() const
void addSet(Set *s)
Definition Supersede.cxx:20
const std::vector< std::string > & getAsk() const
Visitor::VisitorState accept(Visitor *v)
Definition Supersede.cxx:87
const std::vector< std::string > & getForced() const