46 for(
int i=0;i<8;i++) {
47 fCr1Ch[i] =
MakeTH1(
'I', Form(
"Crate1/Cr1Ch%02d",i+1), Form(
"Crate 1 channel %2d",i+1), 5000, 1., 5001.);
48 fCr2Ch[i] =
MakeTH1(
'I', Form(
"Crate2/Cr2Ch%02d",i+1), Form(
"Crate 2 channel %2d",i+1), 5000, 1., 5001.);
51 fCr1Ch1x2 =
MakeTH2(
'I',
"Cr1Ch1x2",
"Crate 1 channel 1x2", 200, 1., 5001., 200, 1., 5001.);
52 fHis1 =
MakeTH1(
'I',
"His1",
"Condition histogram", 5000, 1., 5001.);
53 fHis2 =
MakeTH1(
'I',
"His2",
"Condition histogram", 5000, 1., 5001.);
56 fHis3 =
MakeTH1(
'I',
"His3",
"Singular histogram", 20000, 0.999, 1.001);
61 Double_t cutpnts[3][2] = { {400, 800}, {700, 900}, {600, 1100} };
84 const char* mbsnode =
"x86l-9";
86 fHandle = mbs::MonitorHandle::Connect(mbsnode);
88 printf(
"Connect to MBS node %s\n", mbsnode);
90 printf(
"Fail to connect to MBS node %s\n", mbsnode);
113 std::cout <<
"TXXXProc: no input MBS event found!" << std::endl;
120 std::cout <<
"**** TXXXProc: Skip trigger event" << std::endl;
133 for(Int_t i = 0; i<8; i++) {
146 Int_t * pdata = psubevt->GetDataField();
147 Int_t lwords = psubevt->GetIntLen();
148 if(lwords > 8) lwords = 8;
150 if(psubevt->GetSubcrate() == 1)
151 for(Int_t i = 0; i<lwords; i++)
152 Crate1[i] = (Float_t)*pdata++;
154 if(psubevt->GetSubcrate() == 2)
155 for(Int_t i = 0; i<lwords; i++)
156 Crate2[i] = (Float_t)*pdata++;
160 for(Int_t i = 0; i<8; i++) {
161 fCr1Ch[i]->Fill(Crate1[i]);
162 fCr2Ch[i]->Fill(Crate2[i]);
164 Float_t value1 = Crate1[0];
165 Float_t value2 = Crate1[1];
Bool_t BuildEvent(TGo4EventElement *target)
TGo4Picture * GetPicture(const char *name)
TH2 * MakeTH2(char type, const char *fullname, const char *title, Int_t nbinsx, Double_t xlow, Double_t xup, Int_t nbinsy, Double_t ylow, Double_t yup, const char *xtitle=0, const char *ytitle=0, const char *ztitle=0)
virtual Bool_t Test(Double_t x, Double_t y)
TGo4WinCond * MakeWinCond(const char *fullname, Double_t xmin, Double_t xmax, const char *HistoName=0)
TGo4PolyCond * MakePolyCond(const char *fullname, Int_t npoints, Double_t(*points)[2], const char *HistoName=0)
mbs::MonitorHandle fHandle
TGo4Picture * Pic(Int_t posy, Int_t posx)
TGo4MbsSubEvent * NextSubEvent(Bool_t all=kFALSE)
void SetDivision(Int_t ndivy, Int_t ndivx)
void AddObject(TObject *obj, Option_t *DrawOption=0)
void AddCondition(TNamed *cond=0)
void SetLineAtt(Color_t color, Style_t style, Width_t width, Int_t index=UndefIndex)
TGo4EventElement * GetInputEvent()
virtual Bool_t Test(Double_t v1)
void SetFillAtt(Color_t color, Style_t style, Int_t index=UndefIndex)
Bool_t AddPicture(TGo4Picture *pic, const char *subfolder=0)
TH1 * MakeTH1(char type, const char *fullname, const char *title, Int_t nbinsx, Double_t xlow, Double_t xup, const char *xtitle=0, const char *ytitle=0)
Short_t GetTrigger() const
static void Info(const char *text,...)