StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
EMCdsm2Tree.h
1 // -*- mode:c++ -*-
2 
3 #ifndef EMCdsm2Tree_h
4 #define EMCdsm2Tree_h
5 /**************************************************************
6  * $Id: EMCdsm2Tree.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 BEdsm2;
13 
14 class EMCdsm2Tree { // DSM0 tree emulators
15  public:
16  enum { Nbe2=4, Nbe2Cha=2, mxTxt=16}; // # of DSM2 for Endcap & Barrel
17  private:
18  BEdsm2 *be2; // Level-2 Endcap[0], Barrel[1,2,3] boards
19  char name[mxTxt];
20 
21  int mYear; // DSM algo changes w/ years
22  int BEsumthr8bit, EEsumthr6bit, JPSIthrSelc2bit, BarreSide2bit, EtotThr8bit;
23  int OutEndcapJP2bit;
24  int OutEndcapHT2bit;
25  int OutEndcapSum1bit;
26  int OutEndcapHTTP1bit;
27  int OutEndcapTP1bit;
28  int OutBarreJP2bit;
29  int OutBarreHT2bit;
30  int OutBarreSum1bit;
31  int OutBarreJPSi1bit;
32  int OutBarreHTTP1bit;
33  int OutBarreTP1bit;
34  int OutEtot1bit;
35 
36  int intBarreSum;
37  int intEndcapSum;
38  int intEtot;
39 
40 
41  public:
42 
43  EMCdsm2Tree(const char *);
44  void setYear(int x, int BEsumthr, int EEsumthr, int JPSIthrSelc, int BarreSide, int EtotThr);
45  ~EMCdsm2Tree();
46  void print(int k=0) const;
47  void clear();
48  void setInput16bit(int ibrd, int ch, unsigned short val); // words
49  void compute();
50  // int getNboards() { return Nee1;}
51  //int getInpTPsum(int ch /*0...11*/) const;// halfPatches, for both DSM1 boards
52 
53  //...... input..........
54  int getInpHT2bit(int ibr, int ch) const; // ibr=0=Endcap
55  int getInpHT2bit_2(int ibr, int ch) const; // ibr=0=Endcap
56  int getInpTP1bit(int ibr, int ch) const; // ibr=0=Endcap
57  int getInpHTTP1bit(int ibr, int ch) const; // ibr=0=Endcap
58  int getInpEsum5bit(int ibr, int ch) const; // ibr=0=Endcap
59  int getInpJP2bit(int ibr, int ch) const; // ibr=0=Endcap
60 
61  //........output........
62  int getOutEndcapJP2bit() const {return OutEndcapJP2bit;}
63  int getOutEndcapHT2bit() const {return OutEndcapHT2bit;}
64  int getOutEndcapSum1bit() const {return OutEndcapSum1bit;}
65  int getOutEndcapHTTP1bit() const {return OutEndcapHTTP1bit;}
66  int getOutEndcapTP1bit() const {return OutEndcapTP1bit;}
67  int getIntEndcapSum() const {return intEndcapSum;}
68 
69  int getOutBarreJP2bit() const {return OutBarreJP2bit;}
70  int getOutBarreHT2bit() const {return OutBarreHT2bit;}
71  int getOutBarreSum1bit() const {return OutBarreSum1bit;}
72  int getOutBarreJPSi1bit() const {return OutBarreJPSi1bit;}
73  int getOutBarreHTTP1bit() const {return OutBarreHTTP1bit;}
74  int getOutBarreTP1bit() const {return OutBarreTP1bit;}
75  int getIntBarreSum() const {return intBarreSum;}
76 
77  int getOutEtot1bit() const {return OutEtot1bit;}
78  int getIntEtot() const {return intEtot;}
79 };
80 
81 #endif
82 
83 /*
84  * $Log: EMCdsm2Tree.h,v $
85  * Revision 1.2 2009/11/18 15:50:59 pibero
86  * Address several compiler warnings of the type:
87  *
88  * warning: deprecated conversion from string constant 'char*'
89  *
90  * Revision 1.1 2009/10/12 18:04:27 pibero
91  * Moved StEEmcUtil/EEdsm to StTriggerUtilities/Eemc
92  *
93  * Revision 1.2 2009/02/24 03:56:19 ogrebeny
94  * Corrected const-ness
95  *
96  * Revision 1.1 2007/08/17 01:15:38 balewski
97  * full blown Endcap trigger simu, by Xin
98  *
99  *
100  **************************************************************/
101 
102 
Definition: BEdsm2.h:7