pxar
 All Classes Namespaces Functions Variables Typedefs Friends
PixTestReadback.hh
1 #ifndef PIXTESTREADBACK_H
2 #define PIXTESTREADBACK_H
3 
4 #include "PixTest.hh"
5 #include "PHCalibration.hh"
6 
7 #include <TH1.h>
8 #include <TH2.h>
9 #include <TProfile2D.h>
10 
11 #include <TTree.h>
12 
13 class DLLEXPORT PixTestReadback: public PixTest {
14 public:
15  PixTestReadback(PixSetup *, std::string);
17  virtual ~PixTestReadback();
18  void init();
19  void setToolTips();
20  void bookHist(std::string);
21  void runCommand(std::string command);
22  virtual bool setParameter(std::string parName, std::string sval);
23  bool setTrgFrequency(uint8_t TrgTkDel);
24  void pgToDefault();
25  void setHistos();
26  void ProcessData(uint16_t numevents = 1000);
27  void FinalCleaning();
28  std::vector<uint8_t> daqReadback(std::string dac, uint8_t vana, int8_t parReadback);
29  std::vector<uint8_t> daqReadback(std::string dac, uint8_t vana, unsigned int roc, int8_t parReadback);
30  std::vector<uint8_t> daqReadback(std::string dac, double vana, int8_t parReadback);
31  std::vector<uint8_t> daqReadbackIa();
32  void CalibrateIa();
33  void CalibrateVana();
34  void CalibrateVd();
35  void CalibrateVa();
36  std::vector<double> getCalibratedVbg();
37  void readbackVbg();
38  void doTest();
39  std::vector<double> getCalibratedIa();
40  double getCalibratedIa(unsigned int roc);
41  void setVana();
42  void doDAQ();
43 
44 private:
45 
46  void stop();
47 
48 
49  uint8_t fParReadback;
50  uint16_t fParPeriod;
51  uint16_t fParStretch;
52  bool fParFillTree;
53  uint16_t fParTriggerFrequency;
54  bool fParResetROC;
55 
56  bool fPhCalOK;
57  PHCalibration fPhCal;
58  bool fParOutOfRange;
59  bool fDaq_loop;
60 
61  std::vector<double> fPar0VdCal;
62  std::vector<double> fPar1VdCal;
63  std::vector<double> fPar0VaCal;
64  std::vector<double> fPar1VaCal;
65  std::vector<double> fPar0RbIaCal;
66  std::vector<double> fPar1RbIaCal;
67  std::vector<double> fPar0TbIaCal;
68  std::vector<double> fPar1TbIaCal;
69  std::vector<double> fPar2TbIaCal;
70 
71  std::vector<std::vector<std::pair<std::string, double> > > fRbCal;
72 
73  bool fCalwVd;
74  bool fCalwVa;
75 
76  std::vector<double> fRbVbg;
77 
78 
79 
80  std::vector<std::pair<std::string, uint8_t> > fPg_setup;
81 
82  std::vector<TH2D*> fHits;
83  std::vector<TProfile2D*> fPhmap;
84  std::vector<TH1D*> fPh;
85  std::vector<TH1D*> fQ;
86  std::vector<TProfile2D*> fQmap;
87 
88  ClassDef(PixTestReadback, 1)
89 
90 };
91 #endif
virtual void runCommand(std::string command)
allow execution of any button in the test
Definition: PixTest.cc:129
virtual void doTest()
function connected to "DoTest" button of PixTab
Definition: PixTest.cc:602
void bookHist(std::string name)
use if you want, or define the histograms in the specific member functions
Definition: PixTest.cc:93
virtual void setToolTips()
implement this to provide updated tool tips if the user changes test parameters
Definition: PixTest.cc:85
virtual bool setParameter(std::string parName, std::string sval)
set the string value of a parameter
Definition: PixTest.cc:433
void init()
sets all test parameters
Definition: PixTest.cc:62