MultiPdf.h
Go to the documentation of this file.
1 #ifndef WIRECELLTEST_MULTIPDF
2 #define WIRECELLTEST_MULTIPDF
3 
4 #include "TCanvas.h"
5 
6 namespace WireCell {
7  namespace Test {
8  struct MultiPdf {
9  TCanvas canvas;
10  const char* name;
11  MultiPdf(const char* name) : canvas("c","canvas",500,500), name(name) {
12  canvas.Print(Form("%s.pdf[", name), "pdf");
13  }
15  close();
16  }
17  void operator()() {
18  canvas.Print(Form("%s.pdf", name), "pdf");
19  canvas.Clear();
20  }
21  void close() {
22  if (name) {
23  canvas.Print(Form("%s.pdf]", name), "pdf");
24  name = nullptr;
25  }
26  }
27  };
28 
29  }
30 }
31 
32 #endif
A Test class.
Definition: class.h:3
const char * name
Definition: MultiPdf.h:10
Definition: Main.h:22
MultiPdf(const char *name)
Definition: MultiPdf.h:11