#include "dune/RunHistory/DetPedestalDUNE.h"
#include <getopt.h>
#include <iostream>
#include <boost/tokenizer.hpp>
#include <boost/lexical_cast.hpp>
Go to the source code of this file.
int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
Definition at line 116 of file getDUNEPedestals.cc.
uint64_t VldTimeUsed() const
virtual float PedMean(raw::ChannelID_t ch) const
Retrieve pedestal information.
virtual float PedRms(raw::ChannelID_t ch) const
bool ParseCLArgs(int argc, char *argv[])
std::vector< uint64_t > gChannelList
QTextStream & endl(QTextStream &s)
bool ParseCLArgs |
( |
int |
argc, |
|
|
char * |
argv[] |
|
) |
| |
Definition at line 29 of file getDUNEPedestals.cc.
32 if (argc < 2)
return false;
34 struct option long_options[] = {
37 {
"detector", 0, 0,
'd'},
39 {
"database", 0, 0,
'D'},
40 {
"pedestalRun", 0, 0,
'P'},
47 int c = getopt_long(argc,
argv,
"r:d:f:C:DPh",long_options,&optindx);
54 int run = atoi(optarg);
56 std::cout <<
"Invalid run number." <<
std::endl;
90 std::vector<std::string> cList;
92 boost::tokenizer< boost::escaped_list_separator<char> > tok(channels);
93 cList.assign(tok.begin(),tok.end());
94 for (
size_t i=0; i<cList.size(); ++i) {
96 gChannelList.push_back(boost::lexical_cast<uint64_t>(cList[i]));
98 catch (
const boost::bad_lexical_cast &) {
99 std::cout << cList[i] <<
" does not appear to be a channel id, skipping"
std::vector< uint64_t > gChannelList
QTextStream & endl(QTextStream &s)
Definition at line 17 of file getDUNEPedestals.cc.
19 std::cout <<
"Usage: RunInfo [options] -r|--run [run number] -d|--detector [detector name, eg, dune35t]" <<
std::endl;
21 std::cout <<
"-f (--file) [fhicl file] : use fhicl config file" <<
std::endl;
22 std::cout <<
"-D (--database) : get peds from database" <<
std::endl;
23 std::cout <<
"-P (--pedestalRun) : print pedestal run" <<
std::endl;
24 std::cout <<
"-C [chan1,chan2,...] : print only specific channels" <<
std::endl;
QTextStream & endl(QTextStream &s)
bool gPrintPedRun = false |