00001 #ifndef EEMCDBITEM_H
00002 #define EEMCDBITEM_H
00003
00004 #include "StMessMgr.h"
00005 #if !defined(ST_NO_NAMESPACES)
00006 using std::ostream;
00007 #endif
00008
00009
00010 #define StEEmcNameLen 16 // to avoid dependency on "cstructs/eemcConstDB.hh"
00011
00012
00013 class EEmcDbItem {
00014
00015 public:
00016 int key;
00017
00018
00019
00020 char name[StEEmcNameLen];
00021 char tube[StEEmcNameLen];
00022
00023
00024 int sec,eta;
00025 char sub,plane;
00026 int strip;
00027
00028 int crate, chan;
00029 float gain;
00030 float ped,thr,sigPed;
00031 unsigned stat;
00032 unsigned fail;
00033
00034 EEmcDbItem();
00035 void clear();
00036 void print() const;
00037 void setName(char *text);
00038 void setTube(char *text);
00039 void setDefaultTube(int cr_off);
00040 int mapmtId()const;
00041 bool isEmpty() const;
00042 bool isSMD() const { return (plane=='U' || plane=='V');}
00043 bool isTower() const;
00044 void exportAscii(FILE *fd) const;
00045 int importAscii(FILE *fd);
00046
00047 ostream &print( ostream &out ) const;
00048
00049 };
00050
00051 ostream &operator<<(ostream &out, const EEmcDbItem &item );
00052
00053 #endif
00054
00055