/home/bes3soft/bes3soft/Boss/7.0.2/dist/7.0.2/Calibration/calibUtil/calibUtil-00-00-43/src/test/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

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.

Referenced by lookup(), and soonest().

00104                                                                     {
00105 
00106   std::cout << "Success reading info for record #" << ser << std::endl;
00107   
00108   std::cout << "Data format = " <<  dataFmt << std::endl;
00109   std::cout << "Format version = " << fmtVersion << std::endl;
00110   std::cout << "Data ident = " << dataIdent << std::endl;
00111 }

int main ( int  ,
char **   
)

Definition at line 20 of file add_meta.cxx.

References meta.

00020                       {
00021   using calibUtil::Metadata;
00022   using facilities::Timestamp;
00023 
00024   Metadata  meta("*", "*", "calib_test");
00025 
00026   int ser = 
00027     meta.registerCalib("kazoo","mango", "Test_Gen", "notAFile.xml",
00028                        "XML", facilities::Timestamp("1990-1-5"),
00029                        facilities::Timestamp("2037-1-1"), "", 
00030                        "From add_meta test program in calibUtil package",
00031                        "TEST", "SLAC", "", "OK", "", "");
00032   if (ser) {
00033     std::cout << "Successfully added metadata record; returned serial no. is " 
00034               << ser << std::endl;
00035   }
00036   else std::cout << "Failed to register new metadata record" << std::endl;
00037 
00038   ser = 
00039     meta.registerCalib("kazoo","mango", "Test_Gen", "alsoNotAFile.xml",
00040                        "XML", facilities::Timestamp("1990-2-5"),
00041                        facilities::Timestamp("2037-1-1"), "", 
00042        "From add_meta test program in calibUtil package, overlaps previous",
00043                        "TEST", "SLAC", "", "OK", "", "");
00044   if (ser) {
00045     std::cout << "Successfully added metadata record; returned serial no. is " 
00046               << ser << std::endl;
00047   }
00048   else std::cout << "Failed to register new metadata record" << std::endl;
00049 
00050   /*
00051   ser = 
00052     meta.registerCalib("cello","rocky road", "Test_Gen", "notAnotherFile.root",
00053                        "ROOT", facilities::Timestamp("1993-1-5"),
00054                        facilities::Timestamp("2035-6-11"), "", 
00055                        "From add_meta test program in calibUtil package",
00056                        "TEST", "SLAC", "", "OK", "", "");
00057   if (ser) {
00058     std::cout << "Successfully added metadata record; returned serial no. is " 
00059               << ser << std::endl;
00060   }
00061   else std::cout << "Failed to register new metadata record" << std::endl;
00062 
00063   ser = meta.registerCalib("banjo","rocky road", "Test_Gen", 
00064                            "notAnotherFile.xml",
00065                            "XML", facilities::Timestamp("1997-1-5"), 
00066                            facilities::Timestamp("1998-6-11"), "", 
00067                            "From add_meta test program in calibUtil package",
00068                            "TEST", "SLAC", "", "ILLEGAL", "", "");
00069 
00070   if (ser) {
00071     std::cout << "Successfully added metadata record; returned serial no. is " 
00072               << ser << std::endl;
00073   }
00074   else std::cout << "Failed to register new metadata record" << std::endl;
00075   */
00076 
00077 }


Generated on Tue Nov 29 23:14:52 2016 for BOSS_7.0.2 by  doxygen 1.4.7