NSCL DDAS  1.0
Support for XIA DDAS at the NSCL
 All Classes Namespaces Files Functions Variables Macros Pages
Csra.h
1 // Csra.h
2 //
3 // A class defining the dialogue to enable bit setting
4 // in the CSRA of Pixie16 modules.
5 //
6 // Author: Sean Liddick
7 // Modified by: Jeromy Tompkins
8 //
9 
10 #ifndef CSRA_H_
11 #define CSRA_H_ 1
12 #include <iostream>
13 #include <iomanip>
14 #include "TGFrame.h"
15 #include "TGTextEntry.h"
16 #include "TGLabel.h"
17 #include "TGButton.h"
18 #include "TGNumberEntry.h"
19 #include "MultCoincDialogue.h"
20 
21 class MultCoincDialogue;
22 
23 class Csra:public TGTransientFrame
24 {
25  private:
26  MultCoincDialogue* fMultDialogue;
27 
28  public:
29  Csra (const TGWindow * p, const TGWindow * main,int NumModules=13);
30  virtual ~ Csra ();
31 
32  void RegisterMultCoincDialogue(MultCoincDialogue* mcd);
33 
34  private:
35  int numModules;
36  TGHorizontalFrame * mn, *buttons;
37  TGVerticalFrame *mn_vert;
38  TGVerticalFrame *column1, *column2, *column3, *column4, *column5,
39  *column6, *column7, *column8, *column9, *column10, *column11,
40  *column12, *column13, *column14, *column15, *column16, *column17,
41  *column18;
43  TGLabel *Labels[17];
45  TGCheckButton *ckBtn[17][17] /* *ckBtn[17], *ckBtn_1[17], *ckBtn_2[17], *ckBtn_3[17],
46  *ckBtn_4[17], *ckBtn_5[17], *ckBtn_6[17], *ckBtn_7[17], *ckBtn_8[17],
47  *ckBtn_9[17], *ckBtn_10[17], *ckBtn_11[17], *ckBtn_12[17], *ckBtn_13[17],
48  *ckBtn_14[17], *ckBtn_15[17]*/;
49 
50  int make_columns (TGVerticalFrame * column, Int_t c, TGCheckButton * ckBtn_g[18],
51  /*char */ std::string title, /*char */ std::string tooltip, int id);
52 
54  TGTextButton *LoadButton, *CancelButton;
55  TGButton *ApplyButton, *ExitButton;
56  TGNumberEntry *numericMod;
57  public:
58  int load_info (Long_t, Bool_t verbose=true);
59  private:
60  int change_values (Long_t);
61  bool Load_Once;
62  Long_t module_number1;
63  Bool_t ProcessMessage (Long_t msg, Long_t parm1, Long_t parm2);
64  int CheckAll(Int_t, Bool_t);
65 
66  void OnBitsChanged();
67 
68  public:
69  void SetModuleNumber(int moduleNr) {
70  module_number1 = (long)moduleNr;
71  numericMod->SetIntNumber(module_number1);
72  load_info(module_number1, false);
73  };
74 
75  static int GetNBitsOn(unsigned int module, unsigned int bit);
76 };
77 
78 #endif /*CSRA_H_ */
Definition: MultCoincDialogue.h:32
Definition: Csra.h:23