11 int main(
int argc,
char **argv)
23 std::cout <<
" --Run " << run << std::endl <<
"inDataBase = "
24 << std::boolalpha << found
25 << std::noboolalpha << std::endl;
36 std::cout <<
"******** runconfig ************" << std::endl;
42 std::cout << std::endl;
43 std::cout <<
" Run " << run <<
" found " << found << std::endl;
44 std::cout << std::endl;
48 std::cout <<
"******** No Beam ************" << std::endl;
54 std::cout <<
" Run " << run <<
" found " << found << std::endl;
55 std::cout << std::endl;
58 std::cout <<
"RunConfig Type of Variable " << std::endl;
59 std::cout << std::endl;
61 std::cout <<
"RunConfig Values " << std::endl;
62 std::cout << std::endl;
65 std::cout <<
"--------------------------------" << std::endl;
67 if (info->
Lookup(
"dummy")) {
69 if (info->
GetVal(
"dummy",val)) {
70 std::cout <<
"dummy val " << val << std::endl;
72 std::cout <<
"dummy value not found" << std::endl;
75 if (info->
GetType(
"dummy",type)) {
76 std::cout <<
"dummy type " << type << std::endl;
78 std::cout<<
"dummy type not found" << std::endl;
82 std::cout <<
"dummy not found" << std::endl;
86 if (info->
Lookup(
"Temperature")) {
88 if (info->
GetVal(
"Temperature",val)) {
89 std::cout <<
"Temperature val " << val << std::endl;
91 std::cout <<
"Temperature value not found" << std::endl;
94 if (info->
GetType(
"Temperature",type)) {
95 std::cout <<
"Temperature type " << type << std::endl;
97 std::cout<<
"Temperature type not found" << std::endl;
101 std::cout <<
"Temperature not found" << std::endl;
107 std::cout <<
"******** In DataBase ************" << std::endl;
114 std::cout <<
" Run " << run <<
" found " << found << std::endl;
115 std::cout << std::endl;
118 std::cout <<
"RunConfig Type of Variable " << std::endl;
119 std::cout << std::endl;
121 std::cout <<
"RunConfig Values " << std::endl;
122 std::cout << std::endl;
126 std::cout <<
"--------------------------------" << std::endl;
127 if (info->
Lookup(
"dummy")) {
129 if (info->
GetVal(
"dummy",val)) {
130 std::cout <<
"dummy val " << val << std::endl;
132 std::cout <<
"dummy value not found" << std::endl;
135 if (info->
GetType(
"dummy",type)) {
136 std::cout <<
"dummy type " << type << std::endl;
138 std::cout<<
"dummy type not found" << std::endl;
142 std::cout <<
"dummy not found" << std::endl;
146 if (info->
Lookup(
"Temperature")) {
148 if (info->
GetVal(
"Temperature",val)) {
149 std::cout <<
"Temperature val " << val << std::endl;
151 std::cout <<
"Temperature value not found" << std::endl;
154 if (info->
GetType(
"Temperature",type)) {
155 std::cout <<
"Temperature type " << type << std::endl;
157 std::cout<<
"Temperature type not found" << std::endl;
161 std::cout <<
"Temperature not found" << std::endl;
165 std::cout <<
"******** NSBeam ************" << std::endl;
175 std::cout <<
" Run " << run <<
" found " << found << std::endl;
176 std::cout << std::endl;
179 std::cout <<
"RunConfig Type of Variable " << std::endl;
180 std::cout << std::endl;
182 std::cout <<
"RunConfig Values " << std::endl;
183 std::cout << std::endl;
185 std::cout <<
"--------------------------------" << std::endl;
188 if (info->
Lookup(
"dummy")) {
190 if (info->
GetVal(
"dummy",val)) {
191 std::cout <<
"dummy val " << val << std::endl;
193 std::cout <<
"dummy value not found" << std::endl;
196 if (info->
GetType(
"dummy",type)) {
197 std::cout <<
"dummy type " << type << std::endl;
199 std::cout<<
"dummy type not found" << std::endl;
203 std::cout <<
"dummy not found" << std::endl;
207 if (info->
Lookup(
"LaserElem")) {
209 if (info->
GetVal(
"LaserElem",val)) {
210 std::cout <<
"LaserElem val " << val << std::endl;
212 std::cout <<
"LaserElem value not found" << std::endl;
215 if (info->
GetType(
"LaserElem",type)) {
216 std::cout <<
"LaserElem type " << type << std::endl;
218 std::cout<<
"LaserElem type not found" << std::endl;
222 std::cout <<
"LaserElem not found" << std::endl;
void list()
list all filds found which his types
Bool_t GetRunConfig(Long_t nrun, const TString *dbUrl=NULL)
Query Db for given run Only this function in class interact wich DataBase. Must be called in HarpoRaw...
int main(int argc, char **argv)
Get Run Configuration info by run number. The class query MySQL databe use GetRunConfig Method Only t...
void print()
Print values of all founded fields.
Bool_t Lookup(const TString field)
Lookup filed exist.
Bool_t GetVal(const TString field, TString &val)
Return value of existing field in Tstring.
Bool_t GetType(const TString field, TString &type)
Return Type of field in Tstring.