LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
writeConditionsCSVToDB.cc
Go to the documentation of this file.
1 #include <iostream>
2 #include <iomanip>
3 #include <vector>
5 
6 using namespace std;
7 
8 int main(int argc, char *argv[])
9 {
10  if (argc != 5) {
11  cout << "Usage: writeConditionsCSVToDB [detector name] [data|mc|datamc] [table name] [CSV data file]"
12  << endl;
13  exit(1);
14  }
15 
17  t->SetDetector(argv[1]);
18  t->SetTableName(argv[3]);
20  t->GetColsFromDB();
21 
22  std::string dt = argv[2];
23  if (dt == "data")
25  else if (dt == "mc")
27  else if (dt == "datamc")
29 
30  t->SetVerbosity(100);
31 
32  if (t->LoadFromCSV(argv[4]))
33  t->Write();
34 
35  return 0;
36 
37 }
STL namespace.
bool LoadFromCSV(std::string fname)
Definition: Table.cpp:1298
bool Write(bool commit=true)
Definition: Table.cpp:2356
bool SetDetector(std::string det)
Definition: Table.cpp:500
void SetTableName(std::string tname)
Definition: Table.cpp:524
void SetVerbosity(int i)
Definition: Table.h:100
bool GetColsFromDB(std::vector< std::string > pkeyList={})
Definition: Table.cpp:245
bool SetTableType(int t)
Definition: Table.cpp:458
int main(int argc, char *argv[])
void SetDataTypeMask(int mask)
Definition: Table.h:76
map< int, array< map< int, double >, 2 >> Table
Definition: plot.C:18