StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StJanBarrelDbMaker.h
1 // $Id: StJanBarrelDbMaker.h,v 1.2 2014/08/06 11:43:06 jeromel Exp $
2 
3 #ifndef STAR_StJanBarrelDbMaker
4 #define STAR_StJanBarrelDbMaker
5 
17 #ifndef StMaker_H
18 #include "StMaker.h"
19 #endif
20 class TH2S;
21 class TH2I;
22 class TH1I;
23 class TObjArray ;
24 
25 class StEmcGeom;
26 class StEmcDecoder;
27 class StBemcTables;
28 
29 #include "JanBarrelConst.h"
30 
31 class StJanBarrelDbMaker : public StMaker {
32  private:
33  enum {kStarDb=0, kJanDb=1};
34  int par_dbType;
35 
36  // my private DB
37  TH2S *janDb_bprsPed2D, *janDb_bprsSigPed2D;
38  TH1S *janDb_bprsStat;
39  TH1I *janDb_bprsReMap, *janDb_btowReMap;
40  // TH1I *janDb_bprsSoft2Hard;
41 
42  // mip calibration
43  TH1F *janDb_mipMean[mxBTile];
44  TH1F *janDb_mipSig[mxBTile]; // width of the distribution
45  TH1F *janDb_mipStat[mxBTile]; // QA flag from MIP analysis
46 
47  TObjArray *HList;
48 
49  StBemcTables* mTables; // used to acBcess EMC status and pedestal info
50 
51  StEmcDecoder* mMappB;
52 
53  void initBprsGeometry();
54 
55  public:
56  StEmcGeom *mBtowGeom, *mBprsGeom, * mSmdEGeom, * mSmdPGeom;// tmp
57  StJanBarrelDbMaker(const char *name="janBarrelDb");
58  virtual ~StJanBarrelDbMaker();
59  virtual Int_t Init();
60  virtual Int_t Make();
61  virtual Int_t InitRun (int runumber);
62 
63  void setDbType(int i) {par_dbType=i;}
64  void setHList(TObjArray * x){HList=x;}
65 
66  int bprsCrate(int softID);
67 
68  float pedTile(int ibp, int softID, int capID);
69  float sigPedTile(int ibp, int softID, int capID);
70  int statTile(int ibp, int softID);
71  TH1I *bprsReMap() const{ return janDb_bprsReMap;}
72  TH1I *btowReMap() const{ return janDb_btowReMap;}
73  TH1F *mipMean(int ibp) const { assert(ibp>=0 && ibp<mxBTile); return janDb_mipMean[ibp];}
74  TH1F *mipSig(int ibp) const { assert(ibp>=0 && ibp<mxBTile); return janDb_mipSig[ibp];}
75  TH1F *mipStat(int ibp) const { assert(ibp>=0 && ibp<mxBTile); return janDb_mipStat[ibp];}
76 
77  float cut_mipAdcL[mxBTile][mxBtow];
78  float cut_mipAdcH[mxBTile][mxBtow];
79  void cut_mipAdcLH(int ibp, int id, float &L, float &H) {
80  assert(ibp>=0 && ibp<mxBTile); assert(id>0 && id<=mxBtow);
81  L=cut_mipAdcL[ibp][id-1]; H=cut_mipAdcH[ibp][id-1]; }
82 
83 
85  virtual const char *GetCVS() const {
86  static const char cvs[]="Tag $Name: $ $Id: StJanBarrelDbMaker.h,v 1.2 2014/08/06 11:43:06 jeromel Exp $ built " __DATE__ " " __TIME__ ;
87  return cvs;
88  }
89 
90  ClassDef(StJanBarrelDbMaker,0) //StAF chain virtual base class for Makers
91 };
92 
93 #endif
94 
95 
96 // $Log: StJanBarrelDbMaker.h,v $
97 // Revision 1.2 2014/08/06 11:43:06 jeromel
98 // Suffix on literals need to be space (later gcc compiler makes it an error) - first wave of fixes
99 //
100 // Revision 1.1 2008/11/24 23:06:37 balewski
101 // start
102 //
virtual const char * GetCVS() const
Displayed on session exit, leave it as-is please ...