18#include "TTimeStamp.h"
46 fParam = (
TXXXParam*) MakeParameter(
"Par1",
"TXXXParam");
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.);
60 fHis1gate = MakeTH1(
'I',
"His1g",
"Gated histogram", 5000, 1., 5001.);
61 fHis2gate = MakeTH1(
'I',
"His2g",
"Gated histogram", 5000, 1., 5001.);
62 fHis3 = MakeTH1(
'I',
"His3",
"Singular histogram", 20000, 0.999, 1.001);
65 fconHis1 = MakeWinCond(
"cHis1", 100,2000,
"His1");
66 fconHis2 = MakeWinCond(
"cHis2", 100,2000,
"His2");
68 Double_t cutpnts[3][2] = { {400, 800}, {700, 900}, {600, 1100} };
69 fPolyCon = MakePolyCond(
"polycon", 3, cutpnts);
71 fcondSet = GetPicture(
"condSet");
75 fcondSet =
new TGo4Picture(
"condSet",
"Set conditions");
76 fcondSet->SetDivision(2,2);
77 fcondSet->Pic(0,0)->AddObject(fHis1);
78 fcondSet->Pic(0,1)->AddObject(fHis2);
79 fcondSet->Pic(0,0)->AddCondition(fconHis1);
80 fcondSet->Pic(0,1)->AddCondition(fconHis2);
81 fcondSet->Pic(1,0)->AddObject(fHis1gate);
82 fcondSet->Pic(1,1)->AddObject(fHis2gate);
84 fcondSet->Pic(1,0)->SetFillAtt(4, 1001);
85 fcondSet->Pic(1,0)->SetLineAtt(4,1,1);
86 fcondSet->Pic(1,1)->SetFillAtt(9, 1001);
87 fcondSet->Pic(1,1)->SetLineAtt(9,1,1);
111 std::cout <<
"TXXXProc: no input MBS event found!" << std::endl;
117 if(evnt->GetTrigger() > 11) {
118 std::cout <<
"**** TXXXProc: Skip trigger event" << std::endl;
131 for(Int_t i = 0; i<8; i++) {
140 evnt->ResetIterator();
141 while(
auto psubevt = evnt->NextSubEvent()) {
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));
The abstract base class for the data elements of which the unpacked events (or detector structure dat...
Abstract event processor.
TGo4EventElement * GetInputEvent()
Access to external raw event which is set as association member.
static void Info(const char *text,...) GO4_PRINTF_ARGS
User shortcut for message with prio 1.
Picture cconfiguration in Go4.
Bool_t BuildEvent(TGo4EventElement *target) override
Fill the destination event dest.