pxar
All Classes Namespaces Functions Variables Typedefs Friends
anaFullTest.hh
1 #ifndef ANAFULLTEST_H
2 #define ANAFULLTEST_H
3 
4 #include <iostream>
5 #include <map>
6 
7 #include "TString.h"
8 #include "TObject.h"
9 
10 #include "TH1.h"
11 #include "TF1.h"
12 #include "TCanvas.h"
13 
14 #include "pxardllexport.h"
15 
16 
17 struct moduleSummary {
18  std::string moduleName;
19  // one hist per ROC, filled n iterations times
20  std::vector<TH1D*> vana, caldel, vthrcomp, vtrim, phscale, phoffset;
21  std::vector<TH1D*> ndeadpixels, ndeadbumps, deadsep;
22 
23  // summary of module
24  TH1D *rmsVana, *rmsCaldel, *rmsVthrcomp, *rmsVtrim, *rmsPhscale, *rmsPhoffset;
25 
26  // absolute values that should be the same everywhere
27  TH1D *trimthrpos, *trimthrrms, *p1pos, *p1rms;
28 
29 };
30 
31 
32 
33 class DLLEXPORT anaFullTest {
34 
35  public:
36  anaFullTest();
37  ~anaFullTest();
38 
39  void addFullTests(std::string mname = "D14-0006", std::string mpattern = "-000");
40  void validateFullTests();
41  void readDacFile(std::string dir, std::string dac, std::vector<TH1D*> hists);
42  void readLogFile(std::string dir, std::string tag, std::vector<TH1D*> hists);
43  void readLogFile(std::string dir, std::string tag, TH1D* hist);
44 
45  void bookModuleSummary(std::string modulename);
46 
47  std::vector<double> splitIntoRocs(std::string line);
48  std::vector<std::string> glob(std::string basename);
49  double diff(TH1D*);
50 
51 
52 private:
53  TCanvas *c0;
54  int fNrocs, fTrimVcal;
55  int fDiffMetric; // 0: maxbin - minbin (~ difference), 1: RMS, 2: ??
56 
57  std::vector<std::string> fDacs;
58  std::map<std::string, moduleSummary*> fModSummaries;
59 
60  ClassDef(anaFullTest, 1); // testing anaFullTest
61 
62 };
63 
64 #endif