56 ExecuteScript(
"histofill.C");
61 for (
int i = 0; i < 8; i++) {
62 TString hname = TString::Format(
"Crate1/Cr1Ch%02d", i + 1);
63 TString htitle = TString::Format(
"Crate 1 channel %2d", i+1);
64 fCr1Ch[i] = MakeTH1(
'I', hname.Data(), htitle.Data(), 5000, 1., 5001.);
65 hname = TString::Format(
"Crate2/Cr2Ch%02d",i+1);
66 htitle = TString::Format(
"Crate 2 channel %2d",i+1);
67 fCr2Ch[i] = MakeTH1(
'I', hname.Data(), htitle.Data(), 5000, 1., 5001.);
70 fCr1Ch1x2 = MakeTH2(
'I',
"Cr1Ch1x2",
"Crate 1 channel 1x2", 200, 1., 5001., 200, 1., 5001.);
71 fHis1 = MakeTH1(
'I',
"His1",
"Condition histogram", 5000, 1., 5001.);
72 fHis2 = MakeTH1(
'I',
"His2",
"Condition histogram", 5000, 1., 5001.);
73 fHis1gate = MakeTH1(
'I',
"His1g",
"Gated histogram", 5000, 1., 5001.);
74 fHis2gate = MakeTH1(
'I',
"His2g",
"Gated histogram", 5000, 1., 5001.);
77 fconHis1 = MakeWinCond(
"cHis1", 100, 2000,
"His1");
78 fconHis2 = MakeWinCond(
"cHis2", 100, 2000,
"His2");
80 Double_t cutpnts[3][2] = { {400, 800}, {700, 900}, {600, 1100} };
81 fPolyCon = MakePolyCond(
"polycon", 3, cutpnts);
87 Double_t xvalues[4] = { 1000, 2000, 1500, 1000 };
88 Double_t yvalues[4] = { 1000, 1000, 3000, 1000 };
89 TCutG *mycut =
new TCutG(
"cut2", 4, xvalues, yvalues);
91 fConArr->SetValues(mycut);
92 fConArr->Disable(
true);
94 AddAnalysisCondition(fConArr);
96 TGo4Log::Info(
"TXXXProc: Restore condition array from autosave");
97 fConArr->ResetCounts();
100 ((*fConArr)[0])->Enable();
101 ((*fConArr)[1])->Enable();
104 fcondSet = GetPicture(
"condSet");
108 fcondSet =
new TGo4Picture(
"condSet",
"Set conditions");
109 fcondSet->SetDivision(2,2);
110 fcondSet->Pic(0,0)->AddObject(fHis1);
111 fcondSet->Pic(0,1)->AddObject(fHis2);
112 fcondSet->Pic(0,0)->AddCondition(fconHis1);
113 fcondSet->Pic(0,1)->AddCondition(fconHis2);
114 fcondSet->Pic(1,0)->AddObject(fHis1gate);
115 fcondSet->Pic(1,1)->AddObject(fHis2gate);
116 fcondSet->Pic(1,0)->SetFillAtt(4, 1001);
117 fcondSet->Pic(1,0)->SetLineAtt(4,1,1);
118 fcondSet->Pic(1,1)->SetFillAtt(9, 1001);
119 fcondSet->Pic(1,1)->SetLineAtt(9,1,1);
120 AddPicture(fcondSet);
123 fPicture = GetPicture(
"Picture");
125 fPicture =
new TGo4Picture(
"Picture",
"Picture example");
126 fPicture->SetLinesDivision(3, 2,3,1);
127 fPicture->LPic(0,0)->AddObject(fCr1Ch[0]);
128 fPicture->LPic(0,0)->SetFillAtt(5, 3001);
129 fPicture->LPic(0,0)->SetLineAtt(5,1,1);
130 fPicture->LPic(0,1)->AddObject(fCr1Ch[1]);
131 fPicture->LPic(0,1)->SetFillAtt(4, 3001);
132 fPicture->LPic(0,1)->SetLineAtt(4,1,1);
133 fPicture->LPic(1,0)->AddObject(fCr1Ch[2]);
134 fPicture->LPic(1,0)->SetFillAtt(6, 1001);
135 fPicture->LPic(1,0)->SetLineAtt(6,1,1);
136 fPicture->LPic(1,1)->AddObject(fCr1Ch[3]);
137 fPicture->LPic(1,1)->SetFillAtt(7, 1001);
138 fPicture->LPic(1,1)->SetLineAtt(7,1,1);
139 fPicture->LPic(1,2)->AddObject(fCr1Ch[4]);
140 fPicture->LPic(3,0)->AddObject(fCr1Ch1x2);
141 fPicture->LPic(3,0)->SetDrawOption(
"CONT");
142 AddPicture(fPicture);
151 auto XXXEvent =
static_cast<TXXXEvent *
>(target);
158 if(source->GetTrigger() > 11) {
160 XXXEvent->SetValid(kFALSE);
171 source->ResetIterator();
172 while(
auto psubevt = source->NextSubEvent()) {
173 Int_t *pdata = psubevt->GetDataField();
174 Int_t lwords = psubevt->GetIntLen();
175 if(lwords > 8) lwords=8;
177 if(psubevt->GetSubcrate() == 1) {
178 for(Int_t i = 0; i<lwords; i++) {
181 Float_t value = (Float_t)*pdata++;
183 XXXEvent->fCrate1[index] = value;
186 if(psubevt->GetSubcrate() == 2)
187 for(Int_t i = 0; i<lwords; i++)
188 XXXEvent->fCrate2[i] = (Float_t)*pdata++;
193 for(Int_t i = 0; i<8; i++) {
194 fCr1Ch[i]->Fill(XXXEvent->fCrate1[i]);
195 fCr2Ch[i]->Fill(XXXEvent->fCrate2[i]);
197 Float_t value1 = XXXEvent->fCrate1[0];
198 Float_t value2 = XXXEvent->fCrate1[1];
208 XXXEvent->SetValid(kTRUE);
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.
static void Error(const char *text,...) GO4_PRINTF_ARGS
User shortcut for message with prio 3.
Picture cconfiguration in Go4.
Bool_t BuildEvent(TGo4EventElement *target) override
Fill the destination event dest.