CGEM BOSS 6.6.5.g
BESIII Offline Software System
Loading...
Searching...
No Matches
add_meta.cxx File Reference
#include <string>
#include <iostream>
#include "calibUtil/Metadata.h"

Go to the source code of this file.

Functions

void gotIt (unsigned int ser, const std::string &dataFmt, const std::string &fmtVersion, const std::string &dataIdent)
 
int main (int, char **)
 

Function Documentation

◆ gotIt()

void gotIt ( unsigned int  ser,
const std::string &  dataFmt,
const std::string &  fmtVersion,
const std::string &  dataIdent 
)

Definition at line 103 of file test_meta.cxx.

104 {
105
106 std::cout << "Success reading info for record #" << ser << std::endl;
107
108 std::cout << "Data format = " << dataFmt << std::endl;
109 std::cout << "Format version = " << fmtVersion << std::endl;
110 std::cout << "Data ident = " << dataIdent << std::endl;
111}

Referenced by lookup(), and soonest().

◆ main()

int main ( int  ,
char **   
)

Definition at line 20 of file add_meta.cxx.

20 {
23
24 Metadata meta("*", "*", "calib_test");
25
26 int ser =
27 meta.registerCalib("kazoo","mango", "Test_Gen", "notAFile.xml",
28 "XML", facilities::Timestamp("1990-1-5"),
29 facilities::Timestamp("2037-1-1"), "",
30 "From add_meta test program in calibUtil package",
31 "TEST", "SLAC", "", "OK", "", "");
32 if (ser) {
33 std::cout << "Successfully added metadata record; returned serial no. is "
34 << ser << std::endl;
35 }
36 else std::cout << "Failed to register new metadata record" << std::endl;
37
38 ser =
39 meta.registerCalib("kazoo","mango", "Test_Gen", "alsoNotAFile.xml",
40 "XML", facilities::Timestamp("1990-2-5"),
41 facilities::Timestamp("2037-1-1"), "",
42 "From add_meta test program in calibUtil package, overlaps previous",
43 "TEST", "SLAC", "", "OK", "", "");
44 if (ser) {
45 std::cout << "Successfully added metadata record; returned serial no. is "
46 << ser << std::endl;
47 }
48 else std::cout << "Failed to register new metadata record" << std::endl;
49
50 /*
51 ser =
52 meta.registerCalib("cello","rocky road", "Test_Gen", "notAnotherFile.root",
53 "ROOT", facilities::Timestamp("1993-1-5"),
54 facilities::Timestamp("2035-6-11"), "",
55 "From add_meta test program in calibUtil package",
56 "TEST", "SLAC", "", "OK", "", "");
57 if (ser) {
58 std::cout << "Successfully added metadata record; returned serial no. is "
59 << ser << std::endl;
60 }
61 else std::cout << "Failed to register new metadata record" << std::endl;
62
63 ser = meta.registerCalib("banjo","rocky road", "Test_Gen",
64 "notAnotherFile.xml",
65 "XML", facilities::Timestamp("1997-1-5"),
66 facilities::Timestamp("1998-6-11"), "",
67 "From add_meta test program in calibUtil package",
68 "TEST", "SLAC", "", "ILLEGAL", "", "");
69
70 if (ser) {
71 std::cout << "Successfully added metadata record; returned serial no. is "
72 << ser << std::endl;
73 }
74 else std::cout << "Failed to register new metadata record" << std::endl;
75 */
76
77}
const double meta
Definition: TConstant.h:8