StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StSvtOnlineSeqAdjSimMaker.h
1 #ifndef STSVTONLINESEQADJSIM_HH
2 #define STSVTONLINESEQADJSIM_HH
3 
4 #include "Stiostream.h"
5 #include <cstdlib>
6 using namespace std;
7 #include "StMaker.h"
8 
9 class StSvtConfig;
10 class StSvtHybridPixelsC;
11 class StSvtHybridPixelsD;
12 //class StSvtHybridData;
14 class StSvtData;
15 class StSvtDaq;
16 
17 //used bad anode list is the same as in StSvtSeqAdjMaker => no difference between online and offline
18 
31 {
32 public:
33  StSvtOnlineSeqAdjSimMaker(const char* name = "SvtOnlineSeqAdj");
35 
36 
37  void SetKillBadAnodes(bool doit){mKillBadAnodes=doit;}
38  bool GetKillBadAnodes(){return mKillBadAnodes;}
39  void SetSaveAnode2Raw(bool doit){mSaveAnode2Raw=doit;}
40  bool GetSaveAnode2Raw(){return mSaveAnode2Raw;}
41  void SetSaveAnode239Raw(bool doit){mSaveAnode239Raw=doit;}
42  bool GetSaveAnode239Raw(){return mSaveAnode239Raw;}
43 
44  void SetNumberTBinsToClear(int n){mNumberTBinsToClear=n;}
45  int GetNumberTBinsToClear(){return mNumberTBinsToClear;}
46  void SetExtraPixelsBefore(int num){mExtraBefore=num;}
47  int GetExtraPixelsBefore(){return mExtraBefore;}
48  void SetExtraPixelsAfter(int num){mExtraAfter=num;}
49  int GetExtraPixelsAfter(){return mExtraAfter;}
50 
51  void Set_n_seq_lo(int num){m_n_seq_lo=num;}
52  int Get_n_seq_lo(){return m_n_seq_lo;}
53  void Set_n_seq_hi(int num){m_n_seq_hi=num;}
54  int Get_n_seq_hi(){return m_n_seq_hi;}
55  void Set_thresh_lo(int num){m_thresh_lo=num;}
56  int Get_thresh_lo(){return m_thresh_lo;}
57  void Set_thresh_hi(int num){m_thresh_hi=num;}
58  int Get_thresh_hi(){return m_thresh_hi;}
59  void SetPedOffset(int num){mPedOffset=num;}
60  int GetPedOffset(){return mPedOffset;}
61 
62  void SetAdjParams(int thresh_lo,int n_seq_lo,int thresh_hi,int n_seq_hi);
63 
65  virtual Int_t Init();
66  virtual Int_t Make();
67  virtual void Clear(const char *opt);
68  virtual Int_t Finish();
69  virtual Int_t InitRun(int runumber); //caled when run number changes
70 
71 private:
73  StSvtData *mPixelColl;
74  StSvtData *m8bitPixelColl;
76  StSvtData *mRawData;
77  StSvtHybridCollection *mSvtBadAnodes;
78  StSvtConfig *mConfig;
79  StSvtDaq *mDaq;
80 
81  bool mKillBadAnodes;
82  int mNumberTBinsToClear;
83  bool mSaveAnode2Raw;
84  bool mSaveAnode239Raw;
85  bool mRunSvtOnlineSeqAdj;
86 
88  int mExtraBefore;
89  int mExtraAfter;
90 
92  int m_n_seq_lo;
93  int m_n_seq_hi;
94  int m_thresh_lo;
95  int m_thresh_hi;
96  int mPedOffset;
97  int mPedOffsetAdjustment;
98  Bool_t mMask[128*240];
99 
101  StSvtHybridPixelsD *mCurrentPixelData;
102  StSvtHybridPixelsC *mCurrent8bitPixelData;
103  int mCurrentIndex;
104 
105  Int_t GetConfig();
106  Int_t GetDaqParams();
107  void GetBadAnodes();
108  Int_t GetPixelData();
109  void SetRawData();
110 
111  void Conversion10to8bit();
112  void KillBadAnodes();
113  void ClearMask();
114  void RawAnodes();
115  void ClearFirstTbins();
116  void SequenceSearch();
117  void WriteMask();
118  void WriteSequence(int anode,int begins, int ends, int NumOfHigh);
119  void FillRawData();
120  public:
121  virtual const char *GetCVS() const
122  {static const char cvs[]="Tag $Name: $ $Id: StSvtOnlineSeqAdjSimMaker.h,v 1.8 2014/08/06 11:43:46 jeromel Exp $ built " __DATE__ " " __TIME__ ; return cvs;}
123 
124  ClassDef(StSvtOnlineSeqAdjSimMaker,1)
125 };
126 
127 #endif
Simulates proceses in the DAQ for SVT Slow Simulator: 10 to 8 bit conversion, killing of bad anodes...