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

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 91 of file test_meta.cxx.

92 {
93
94 std::cout << "Success reading info for record #" << ser << std::endl;
95
96 std::cout << "Data format = " << dataFmt << std::endl;
97 std::cout << "Format version = " << fmtVersion << std::endl;
98 std::cout << "Data ident = " << dataIdent << std::endl;
99}

Referenced by lookup(), and soonest().

◆ main()

int main ( int ,
char **  )

Definition at line 21 of file add_meta.cxx.

21 {
24
25 Metadata meta( "*", "*", "calib_test" );
26
27 int ser = meta.registerCalib(
28 "kazoo", "mango", "Test_Gen", "notAFile.xml", "XML", facilities::Timestamp( "1990-1-5" ),
29 facilities::Timestamp( "2037-1-1" ), "",
30 "From add_meta test program in calibUtil package", "TEST", "SLAC", "", "OK", "", "" );
31 if ( ser )
32 {
33 std::cout << "Successfully added metadata record; returned serial no. is " << ser
34 << std::endl;
35 }
36 else std::cout << "Failed to register new metadata record" << std::endl;
37
38 ser = meta.registerCalib(
39 "kazoo", "mango", "Test_Gen", "alsoNotAFile.xml", "XML",
40 facilities::Timestamp( "1990-2-5" ), facilities::Timestamp( "2037-1-1" ), "",
41 "From add_meta test program in calibUtil package, overlaps previous", "TEST", "SLAC", "",
42 "OK", "", "" );
43 if ( ser )
44 {
45 std::cout << "Successfully added metadata record; returned serial no. is " << ser
46 << 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}
double meta