95 const char* foo1 =
"CORAL_AUTH_USER=blaaah";
96 const char* foo2 =
"CORAL_AUTH_PASSWORD=blaaah";
97 if (!::getenv(
"CORAL_AUTH_USER")) ::putenv(const_cast<char*>(foo1));
98 if (!::getenv(
"CORAL_AUTH_PASSWORD")) ::putenv(const_cast<char*>(foo2));
115 std::vector<std::string> arguments = args.
arguments ();
127 int RawPedWidRun = RawPedRun;
129 std::string RefPedWidSource = args.
getParameter(
"-wref");
132 int RefPedRun = RawPedRun;
133 int RefPedWidRun = RefPedRun;
135 std::string outputPedWidDest = args.
getParameter(
"-wval");
136 std::string outputPedTag =
"";
137 std::string outputPedWidTag =
"";
138 int outputPedRun = RawPedRun;
139 int outputPedWidRun = outputPedRun;
144 if (!
getObject (RefPeds, RefPedSource, RefPedTag, RefPedRun)) {
145 std::cerr <<
"HcalPedestalValidator-> Failed to get reference Pedestals" << std::endl;
150 if (!
getObject (RefPedWids, RefPedWidSource, RefPedWidTag, RefPedWidRun)) {
151 std::cerr <<
"HcalPedestalValidator-> Failed to get reference PedestalWidths" << std::endl;
158 if (!
getObject (RawPeds, RawPedSource, RawPedTag, RawPedRun)) {
159 std::cerr <<
"HcalPedestalValidator-> Failed to get raw Pedestals" << std::endl;
164 if (!
getObject (RawPedWids, RawPedWidSource, RawPedWidTag, RawPedWidRun)) {
165 std::cerr <<
"HcalPedestalValidator-> Failed to get raw PedestalWidths" << std::endl;
176 int nstat[4]={2500,2500,2500,2500};
188 if (!putObject (&outputPeds, outputPedDest, outputPedTag, outputPedRun)) {
189 std::cerr <<
"HcalPedestalAnalyzer-> Failed to put output Pedestals" << std::endl;
194 if (!putObject (&outputPedWids, outputPedWidDest, outputPedWidTag, outputPedWidRun)) {
195 std::cerr <<
"HcalPedestalAnalyzer-> Failed to put output PedestalWidths" << std::endl;
201 delete outputPedWids;
void defineOption(const std::string &fOption, const std::string &fComment="")
TObject * getObject(TDirectory *fDir, const std::vector< std::string > &fObjectName)
std::vector< std::string > arguments() const
void printOptionsHelp() const
void parse(int nArgs, char *fArgs[])
static int HcalPedVal(int nstat[4], const HcalPedestals *fRefPedestals, const HcalPedestalWidths *fRefPedestalWidths, HcalPedestals *fRawPedestals, HcalPedestalWidths *fRawPedestalWidths, HcalPedestals *fValPedestals, HcalPedestalWidths *fValPedestalWidths)
void defineParameter(const std::string &fParameter, const std::string &fComment="")
bool optionIsSet(const std::string &fOption) const
std::string getParameter(const std::string &fKey)