18 #include "TTimeStamp.h" 48 for (
int i = 0; i < 8; i++) {
49 TString hname = TString::Format(
"Crate1/Cr1Ch%02d", i + 1);
50 TString htitle = TString::Format(
"Crate 1 channel %2d", i+1);
51 fCr1Ch[i] =
MakeTH1(
'I', hname.Data(), htitle.Data(), 5000, 1., 5001.);
52 hname = TString::Format(
"Crate2/Cr2Ch%02d",i+1);
53 htitle = TString::Format(
"Crate 2 channel %2d",i+1);
54 fCr2Ch[i] =
MakeTH1(
'I', hname.Data(), htitle.Data(), 5000, 1., 5001.);
57 fCr1Ch1x2 =
MakeTH2(
'I',
"Cr1Ch1x2",
"Crate 1 channel 1x2", 200, 1., 5001., 200, 1., 5001.);
58 fHis1 =
MakeTH1(
'I',
"His1",
"Condition histogram", 5000, 1., 5001.);
59 fHis2 =
MakeTH1(
'I',
"His2",
"Condition histogram", 5000, 1., 5001.);
62 fHis3 =
MakeTH1(
'I',
"His3",
"Singular histogram", 20000, 0.999, 1.001);
68 Double_t cutpnts[3][2] = { {400, 800}, {700, 900}, {600, 1100} };
111 std::cout <<
"TXXXProc: no input MBS event found!" << std::endl;
118 std::cout <<
"**** TXXXProc: Skip trigger event" << std::endl;
131 for(Int_t i = 0; i<8; i++) {
142 Int_t * pdata = psubevt->GetDataField();
143 Int_t lwords = psubevt->GetIntLen();
144 if(lwords > 8) lwords = 8;
146 if(psubevt->GetSubcrate() == 1)
147 for(Int_t i = 0; i<lwords; i++)
148 Crate1[i] = (Float_t)*pdata++;
150 if(psubevt->GetSubcrate() == 2)
151 for(Int_t i = 0; i<lwords; i++)
152 Crate2[i] = (Float_t)*pdata++;
157 for(Int_t i = 0; i<8; i++) {
158 fCr1Ch[i]->Fill(Crate1[i]);
159 fCr2Ch[i]->Fill(Crate2[i]);
161 Float_t value1 = Crate1[0];
162 Float_t value2 = Crate1[1];
172 fHis3->Fill(1 + 0.0005*TMath::Cos(tm.AsDouble()/100));
TH1 * MakeTH1(char type, const char *fullname, const char *title, Int_t nbinsx, Double_t xlow, Double_t xup, const char *xtitle=nullptr, const char *ytitle=nullptr)
void AddCondition(TNamed *cond=nullptr)
TGo4Picture * GetPicture(const char *name)
static void Info(const char *text,...) GO4_PRINTF_ARGS
Bool_t AddPicture(TGo4Picture *pic, const char *subfolder=nullptr)
Bool_t BuildEvent(TGo4EventElement *target) override
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=nullptr, const char *ytitle=nullptr, const char *ztitle=nullptr)
void AddObject(TObject *obj, Option_t *DrawOption=nullptr)
Bool_t Test(Double_t x, Double_t y) override
TGo4Picture * Pic(Int_t posy, Int_t posx)
TGo4MbsSubEvent * NextSubEvent(Bool_t all=kFALSE)
void SetDivision(Int_t ndivy, Int_t ndivx)
TGo4Parameter * MakeParameter(const char *fullname, const char *classname, const char *newcmd=nullptr)
void SetLineAtt(Color_t color, Style_t style, Width_t width, Int_t index=UndefIndex)
TGo4EventElement * GetInputEvent()
void SetFillAtt(Color_t color, Style_t style, Int_t index=UndefIndex)
TGo4WinCond * MakeWinCond(const char *fullname, Double_t xmin, Double_t xmax, const char *HistoName=nullptr)
Bool_t Test(Double_t v1) override
Short_t GetTrigger() const
TGo4PolyCond * MakePolyCond(const char *fullname, Int_t npoints, Double_t(*points) [2], const char *HistoName=nullptr)