25 #include "eventapiV50/s_filhe_swap.h"
26 #include "eventapiV50/s_ves10_1_swap.h"
27 #include "eventapiV50/s_vehe_swap.h"
28 #include "eventapiV50/s_evhe_swap.h"
29 #include "eventapiV50/s_ve10_1_swap.h"
30 #include "eventapiV50/s_bufhe_swap.h"
32 #include "eventapiV50/f_evt.h"
64 return Watcher::GetFromTrigger(trigger,
"data:ranc0",
fMBSFrame);
116 fEvent_dlen = Watcher::MakeTH1 <TH1F> (
"event_dlen",
"Data Length",500,0,2500);
117 fEvent_type = MakeTH1<TH1F>(
"event_type",
"Type number",100,0,200) ;
118 fEvent_subtype = MakeTH1<TH1F>(
"event_subtype",
"Subbtype",100,0,300) ;
119 fEvent_trigger = MakeTH1<TH1F>(
"event_trigger",
"Trigger Number",20,0,20) ;
120 fEvent_trigger->GetXaxis()->SetBinLabel(2,
"Pulser");
121 fEvent_trigger->GetXaxis()->SetBinLabel(3,
"LYC. Calib");
122 fEvent_trigger->GetXaxis()->SetBinLabel(4,
"AGA. Calib");
123 fEvent_trigger->GetXaxis()->SetBinLabel(5,
"HEC. Calib");
124 fEvent_trigger->GetXaxis()->SetBinLabel(6,
"FRS");
125 fEvent_trigger->GetXaxis()->SetBinLabel(7,
"Part.+#gamma(HEC.)");
126 fEvent_trigger->GetXaxis()->SetBinLabel(8,
"Part.+#gamma(AGA.)");
127 fEvent_trigger->GetXaxis()->SetBinLabel(9,
"Part.+#gamma(HEC.)+LYC.");
128 fEvent_trigger->GetXaxis()->SetBinLabel(10,
"Part.+#gamma(AGA.+LYC.)");
129 fEvent_trigger->GetXaxis()->SetBinLabel(11,
"Part.");
130 fEvent_trigger->GetXaxis()->SetBinLabel(12,
"P");
131 fEvent_trigger->GetXaxis()->SetBinLabel(13,
"Spill-on");
132 fEvent_trigger->GetXaxis()->SetBinLabel(14,
"Spill-off");
133 TagOn(fEvent_trigger);
134 fEvent_count = MakeTH1<TH1F>(
"event_count",
"Current event number",1000,0,1000) ;
135 fSubEvent_dlen = MakeTH1<TH1F>(
"subevent_dlen",
"SubEvent Data Length",1000,0,1000) ;
137 fSubEvent_type = MakeTH1<TH1F>(
"subevent_type",
"SubEvent Type number",20,0,20) ;
138 fSubEvent_control = MakeTH1<TH1F>(
"subevent_control",
"Processor type control",50,0,50) ;
140 fSubEvent_procid = MakeTH1<TH1F>(
"subevent_procid",
"Processor ID",150,0,150) ;
146 TString option = opt;
147 c->Divide(2,2,0.001,0.001);
157 return Watcher::GetFromTrigger(trigger,
"data:ranc0",
fMBSFrame);
186 if ( ADF_MBS_Key->
idmbs == 0x100 || ADF_MBS_Key->
idmbs == 0x200 ) {
187 event_type = 10 ; event_subtype = 1;
190 event_type = ADF_MBS_Key->
type; event_subtype = ADF_MBS_Key->
subtype;
205 cout <<
" ADF_MBS_Key->dlen " << ADF_MBS_Key->
dlen <<
" ADF_MBS_Key->idmbs 0x" << hex << ADF_MBS_Key->
idmbs <<
endl;
212 Int_t i_nrest = (ADF_MBS_Key->
dlen+4)/2 - 4 - 3;
219 while (i_nrest >= 3) {
222 const s_ves10_1* p_subhead = (
const s_ves10_1*)(pMBSData+i_offset);
223 Int_t i_size = (p_subhead->l_dlen-2)/2;
224 Int_t i_styp = p_subhead->i_subtype;
225 Int_t i_typ = p_subhead->i_type;
226 Int_t i_cont = p_subhead->h_control;
227 Int_t i_crate = p_subhead->h_subcrate;
228 Int_t i_proc = p_subhead->i_procid;
238 cout <<
endl <<
" **** Subevent, i_nrest " << i_nrest <<
" should be >= 3 " <<
endl;
239 cout <<
"i_size " << i_size <<
" i_styp " << i_styp <<
" i_typ " << i_typ
240 <<
" i_control " << i_cont <<
" i_subcrate " << i_crate <<
" i_proc " << i_proc <<
endl ;
246 i_nrest -= i_size + 3;
247 i_offset += i_size + 3;
virtual Bool_t IsValid() const
true if it is a valid pointer
virtual Frame * GetFrame() const
TH1F * fSubEvent_subcrate
void PrintOut(Bool_t ison=true)
Switch on/off PrintOut.
virtual void DoCanvas(TCanvas *c, Option_t *)
To be overwritten by real implementation if a canvas is produced.
virtual Key * GetKey()
To get the Key associated to this frame.
virtual void Exec(Option_t *option="")
watch the current frame
ADF::SharedFP * fMBSFrame
Pointer to the Ancillary Frame as delivered by the ADF Trigger.
void SetLastExecStatus(Short_t s=0)
reset last status. 0 means no error, 0 < means error, > 0 means ok with conditions ...
header file for Frame.cpp
virtual UInt_t GetEventNumber() const =0
To get the event number encoded.
MBSWatcher(const char *, const char *, TDirectory *sp_dir=0x0, TDirectory *tag_dir=0x0)
helper structure to decode the data content of the additional key following the ADF key ...
A RawFrame gives direct access to the underlying buffer.
virtual Bool_t SetTrigger(ADF::DFTrigger *=0x0)
Set the trigger attached to this watcher.
header file for AgataKeyFactory.cpp
virtual ~BaseGSIWatcher()
virtual Bool_t SetTrigger(ADF::DFTrigger *=0x0)
To set the Frames (through a trigger) associated to this watcher.
BaseGSIWatcher()
Make1D a la GO4.
virtual BufferIO & RawBuffer()
This method gives access in reading/writing mode to the underlying data buffer.
void TagOn(TObject *)
Add this histogram to the list of tagged histograms.
ADF::SharedFP * fMBSFrame
MBS data are encapsulated in an ADF Frame.
Base class for a trigger on a data flow.
ADF::LogMessage & endl(ADF::LogMessage &log)
Base for a watcher on an ancillary (raw) frame @ GSI.
A watcher filling TTree, Spectra under conditions.
Char_t * Address()
for classes that needs it to write directly data into it.
Bool_t fPrintOut
if true, print out information, otherwise just do spectra
MBSWatcher, to check the structure of the MBS Frame.