test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Functions
hcalInitDb.cc File Reference
#include <stdlib.h>
#include <iostream>
#include <fstream>
#include <vector>
#include <map>
#include <algorithm>
#include <string>
#include "DataFormats/Common/interface/Timestamp.h"
#include "CondCore/IOVService/interface/IOV.h"
#include "CondTools/Hcal/interface/HcalDbTool.h"
#include "CondFormats/HcalObjects/interface/HcalPedestals.h"
#include "CondFormats/HcalObjects/interface/HcalPedestalWidths.h"
#include "CondFormats/HcalObjects/interface/HcalGains.h"
#include "CondFormats/HcalObjects/interface/HcalGainWidths.h"
#include "CondFormats/HcalObjects/interface/HcalElectronicsMap.h"
#include "CondFormats/HcalObjects/interface/HcalChannelQuality.h"
#include "CondFormats/HcalObjects/interface/HcalQIEData.h"
#include "CondFormats/HcalObjects/interface/HcalCalibrationQIEData.h"

Go to the source code of this file.

Functions

int main (int argn, char *argv[])
 

Function Documentation

int main ( int  argn,
char *  argv[] 
)

Definition at line 100 of file hcalInitDb.cc.

References mps_alisetup::args, Args::arguments(), Args::defineOption(), Args::defineParameter(), Args::getParameter(), Args::optionIsSet(), Args::parse(), printHelp(), and AlCaHLTBitMon_QueryRunRegistry::string.

100  {
101 
102  Args args;
103  args.defineParameter ("-db", "DB connection string, POOL format, i.e. oracle://devdb10/CMS_COND_HCAL");
104  args.defineOption ("-help", "this help");
105  args.defineOption ("-verbose", "verbose");
106 
107  args.parse (argn, argv);
108 
109  std::vector<std::string> arguments = args.arguments ();
110 
111  if (args.getParameter ("-db").empty() || args.optionIsSet ("-help")) {
112  printHelp (args);
113  return -1;
114  }
115 
116  std::string inputdb = args.getParameter ("-db");
117  bool verbose = args.optionIsSet ("-verbose");
118 
119  initDb (inputdb, verbose);
120  return 0;
121 }
void defineOption(const std::string &fOption, const std::string &fComment="")
std::vector< std::string > arguments() const
void parse(int nArgs, char *fArgs[])
void printHelp(const Args &args)
list inputdb
Definition: align_cfg.py:8
void defineParameter(const std::string &fParameter, const std::string &fComment="")
bool optionIsSet(const std::string &fOption) const
std::string getParameter(const std::string &fKey)