StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
EEdsm1Tree.h
1 // -*- mode:c++ -*-
2 
3 #ifndef EEdsm1Tree_h
4 #define EEdsm1Tree_h
5 /**************************************************************
6  * $Id: EEdsm1Tree.h,v 1.2 2009/11/18 15:50:59 pibero Exp $
7  * Emulates functionality of Endcap DSM1-tree
8  **************************************************************/
9 #include <stdlib.h>
10 #include <stdio.h>
11 #include <string.h>
12 class EEdsm1;
13 
14 class EEdsm1Tree { // DSM0 tree emulators
15 
16  public:
17  enum { Nee1=2, Nee1BoardInpCha=6, mxTxt=16}; // # of DSM, # of 1x1 JP
18 
19  private:
20  EEdsm1 *ee1; // Level-1 boards
21  char name[mxTxt];
22  int mYear; // DSM algo changes w/ years
23 
24  public:
25 
26  EEdsm1Tree(const char *);
27  void setYear(int x, int *JPth, int TPthrSelc, int HTTPthrSelc);
28  ~EEdsm1Tree();
29  void print(int k=0) const;
30  void clear();
31  void compute();
32  int getNboards() const { return Nee1;}
33 
34  //...... Input
35  void setInp16bit(int brd, int ch, unsigned short val); // words
36  int getInpTPsum(int ch /*ch=0...11*/) const;// halfPatches, for both DSM1 boards
37  int getInpHT2bit(int ch ) const;
38  int getInpTP2bit(int ch ) const;
39  int getInpHTTP2bit(int ch ) const;
40  int getInp16bit(int ch ) const;
41 
42  //... Output
43  int getOutEsum5bit(int ibr) const; /*ibr=0,1*/
44  int getOutHTTP1bit(int ibr) const;
45  int getOutTP1bit(int ibr) const;
46  int getOutJP2bit(int ibr) const;
47  int getOutHT2bit(int ibr) const;
48  int getOut16bit(int ibr) const;
49 
50 };
51 
52 #endif
53 
54 /*
55  * $Log: EEdsm1Tree.h,v $
56  * Revision 1.2 2009/11/18 15:50:59 pibero
57  * Address several compiler warnings of the type:
58  *
59  * warning: deprecated conversion from string constant 'char*'
60  *
61  * Revision 1.1 2009/10/12 18:04:26 pibero
62  * Moved StEEmcUtil/EEdsm to StTriggerUtilities/Eemc
63  *
64  * Revision 1.2 2009/02/24 03:56:18 ogrebeny
65  * Corrected const-ness
66  *
67  * Revision 1.1 2007/08/17 01:15:36 balewski
68  * full blown Endcap trigger simu, by Xin
69  *
70  *
71  **************************************************************/
72 
73 
Definition: EEdsm1.h:8