16 <<
" --input-file <filename> Specify the input file\n" 17 <<
" --h or --help Show this help message\n" 18 <<
" <detid> Provide DetId (list of DetIds)\n";
23 std::vector<std::pair<uint32_t, float>> detidValues;
32 for (
int i = 1;
i <
argc; ++
i) {
35 if (
arg ==
"--h" ||
arg ==
"--help") {
38 }
else if (
arg ==
"--input-file" &&
i + 1 <
argc) {
39 gStyle->SetPalette(kRainbow);
40 gStyle->SetNumberContours(256);
43 gStyle->SetPalette(1);
47 detidValues.emplace_back(
detid, 1.0);
48 }
catch (
const std::invalid_argument&) {
66 std::istringstream iss(
line);
74 detidValues.emplace_back(
detid, 1.0);
81 theMap.
bookMap(
"Strip Tracker Map of Marked modules",
"input values");
83 for (
const auto& [
detid,
value] : detidValues) {
88 bool allSame = std::all_of(detidValues.begin(), detidValues.end(), [&](
const std::pair<uint32_t, float>&
p) {
89 return p.second == detidValues[0].second;
92 TCanvas
c = TCanvas(
"c",
"c");
99 c.SaveAs(
"SiStripsTkMaps.png");
101 std::cout <<
"Filled tracker map with " << detidValues.size() <<
" detids." << std::endl;
void showHelp(const std::string &scriptName)
int main(int argc, char *argv[])
void bookMap(const std::string mapTitle, const std::string zAxisTitle)
U second(std::pair< T, U > const &p)
void fill(long rawid, double val)
void setZAxisRange(double xmin, double xmax)
void drawMap(TCanvas &canvas, std::string option="")