CMS 3D CMS Logo

visualizeHFPhase1PMTParams.h
Go to the documentation of this file.
1 #ifndef CONDTOOLS_HCAL_VISUALIZEHFPHASE1PMTPARAMS_H_
2 #define CONDTOOLS_HCAL_VISUALIZEHFPHASE1PMTPARAMS_H_
3 
4 #include <vector>
5 #include <sstream>
6 
10 
12  // Initialize the visualization options to some meaningful defaults
13  double minCharge{-1.0e2};
14  double maxCharge{1.0e3};
15  double minTDC{0.0};
16  double maxTDC{25.0};
17  double minAsymm{-5.0};
18  double maxAsymm{5.0};
19  unsigned plotPoints{1000};
20  bool verbose{false};
21 
23  cmdline.option(nullptr, "--minAsymm") >> minAsymm;
24  cmdline.option(nullptr, "--maxAsymm") >> maxAsymm;
25  cmdline.option(nullptr, "--minCharge") >> minCharge;
26  cmdline.option(nullptr, "--maxCharge") >> maxCharge;
27  cmdline.option(nullptr, "--minTDC") >> minTDC;
28  cmdline.option(nullptr, "--maxTDC") >> maxTDC;
29  cmdline.option(nullptr, "--plotPoints") >> plotPoints;
30  verbose = cmdline.has("-v");
31  }
32 
33  static const char* options() {
34  return "[-v] [--minAsymm a0] [--maxAsymm a1] [--minCharge Qmin] "
35  "[--maxCharge Qmax] [--minTDC t0] [--maxTDC t1] [--plotPoints n]";
36  }
37 
38  const char* description() const {
39  if (descr_.empty()) {
40  std::ostringstream os;
41 
42  os << " --minAsymm (default " << minAsymm << ") minimum value of charge asymmetry for plot axes\n\n";
43  os << " --maxAsymm (default " << maxAsymm << ") maximum value of charge asymmetry for plot axes\n\n";
44  os << " --minCharge (default " << minCharge << ") minimum value of charge for plot axes\n\n";
45  os << " --maxCharge (default " << maxCharge << ") maximum value of charge for plot axes\n\n";
46  os << " --maxTDC (default " << minTDC << ") minimum value of TDC time for plot axes\n\n";
47  os << " --maxTDC (default " << maxTDC << ") maximum value of TDC time for plot axes\n\n";
48  os << " -v (verbose) print various diagnostics "
49  << "to the standard output\n";
50 
51  descr_ = os.str();
52  }
53  return descr_.c_str();
54  }
55 
56 private:
58 };
59 
60 void visualizeHFPhase1PMTParams(const std::vector<HcalDetId>& idVec,
61  const HFPhase1PMTParams& cuts,
63  const HFPhase1PMTParams* reference = nullptr);
64 
65 #endif // CONDTOOLS_HCAL_VISUALIZEHFPHASE1PMTPARAMS_H_
void load(cmdline::CmdLine &cmdline)
static const char * options()
void visualizeHFPhase1PMTParams(const std::vector< HcalDetId > &idVec, const HFPhase1PMTParams &cuts, const VisualizationOptions &options, const HFPhase1PMTParams *reference=nullptr)
const char * description() const