StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
EEmcDbItem.h
1 #ifndef EEMCDBITEM_H
2 #define EEMCDBITEM_H
3 
4 #include "StMessMgr.h"
5 #if !defined(ST_NO_NAMESPACES)
6 using std::ostream;
7 #endif
8 
9 
10 #define StEEmcNameLen 16 // to avoid dependency on "cstructs/eemcConstDB.hh"
11 //class FILE;
12 
13 class EEmcDbItem {
14 
15  public:
16  int key; // unique internal ID in form 0 to EEindexMax-1
17  // of every active EEMC pixel
18  // see StEEmcUtil/EEfeeRaw/EEname2Index.h for definition
19 
20  char name[StEEmcNameLen];
21  char tube[StEEmcNameLen];
22  // for towers/pre/post use (sec,sub,eta)
23  // for SMD use sec,plane,strip)
24  int sec,eta; // 1-12, 1-12
25  char sub,plane; //A-E, U-V
26  int strip; // 1-288
27 
28  int crate, chan;
29  float gain;
30  float ped,thr,sigPed; // in ADC channals
31  unsigned stat; // bits, see eemcConstDB.hh for definitions
32  unsigned fail; // bits, see eemcConstDB.hh for definitions
33 
34  EEmcDbItem();
35  void clear();
36  void print() const;
37  void setName(char *text);
38  void setTube(char *text);
39  void setDefaultTube(int cr_off);
40  int mapmtId()const;
41  bool isEmpty() const;
42  bool isSMD() const { return (plane=='U' || plane=='V');}
43  bool isTower() const;
44  void exportAscii(FILE *fd) const;
45  int importAscii(FILE *fd);
46 
47  ostream &print( ostream &out ) const;
48 
49 };
50 
51 ostream &operator<<(ostream &out, const EEmcDbItem &item );
52 
53 #endif
54 
55 
char name[StEEmcNameLen]
ASCII name of the channel, see Readme.
Definition: EEmcDbItem.h:20
char tube[StEEmcNameLen]
name of PMT or MAPMT pixel
Definition: EEmcDbItem.h:21
int chan
hardware channel
Definition: EEmcDbItem.h:28