44 if ( Watcher::GetFromTrigger(trigger,
"data:ranc0",
fFrame) ) {
48 else return Watcher::GetFromTrigger(trigger,
"data:ranc1",
fFrame);
54 fLog <<
info <<
"RancLegnaroWatcher::Exec is called 1 \n";
67 switch ( fWhichRanc ) {
97 fLength = MakeTH1<TH1F>(
"Length",
"Length Of the DisplayRancLegnaro buffer",100,0,200);
112 if ( option ==
"" ) {
115 if ( option ==
"mat" ) {
119 void DisplayRancLegnaro::AddMatrix(UShort_t ch1, UShort_t ch2, UShort_t dch1, UShort_t dch2, Int_t binx, Double_t xmin, Double_t xmax, Int_t biny, Double_t ymin, Double_t ymax)
131 for (Int_t ix = ch1; ix < ech1; ix++) {
132 for (Int_t jx = ch2; jx < ech2; jx++) {
135 Bool_t to_add =
true;
137 for (
size_t i = 0; i < fListAdded.size(); i++) {
138 if ( fListAdded[i].first.first == ix && fListAdded[i].first.second == jx )
139 { to_add =
false;
break;}
140 if ( fListAdded[i].first.first == jx && fListAdded[i].first.second == ix )
141 { to_add =
false;
break;}
144 std::pair < std::pair<UShort_t, UShort_t> , TH2F *> bidim;
145 bidim.first.first = ix;
146 bidim.first.second = jx;
148 TString
tmp = Form(
"DisplayRanc_%d_%d",ix,jx);
149 bidim.second = MakeTH2<TH2F>(tmp.Data(),tmp.Data(),binx,xmin,xmax,biny,ymin,ymax);
151 fListAdded.push_back( bidim );
161 fLog <<
info <<
"DisplayRancLegnaro::Exec is called \n";
179 for (
size_t i = 0; i < fListAdded.size(); i++) {
180 if ( !(fListAdded[i].first.first < lenrawBuf) )
182 if ( !(fListAdded[i].first.second < lenrawBuf) )
185 fListAdded[i].second->Fill(
rawBuf[fListAdded[i].first.first],
rawBuf[fListAdded[i].first.second]);
virtual Bool_t IsValid() const
true if it is a valid pointer
virtual Frame * GetFrame() const
virtual UInt_t Read()
It reads the content into dedicated structures from the Frame (data part)
static const UShort_t gMaxSlots
virtual const BufferIO * GetRealBuffer() const =0
give access to the underlying buffer of the data part
Base for a watcher on an ancillary (raw) frame.
virtual Bool_t SetTrigger(ADF::DFTrigger *=0x0)
Set the trigger attached to this watcher.
To Display the content of raw ancillary frames ranc0 and ranc1 as defined @ Legnaro.
void SetLastExecStatus(Short_t s=0)
reset last status. 0 means no error, 0 < means error, > 0 means ok with conditions ...
DisplayRancLegnaro(const char *, const char *, TDirectory *sp_dir=0x0, TDirectory *tag_dir=0x0)
LogMessage & info(LogMessage &)
manipulator to modify the LogMessage
static const UShort_t gExtraSize
virtual UInt_t Export(Char_t *, UInt_t) const
Export this buffer to an array.
static const UShort_t gMaxChannels
UInt_t rawBufI[gMaxSlots *gMaxChannels+gExtraSize]
virtual ~RancLegnaroWatcher()
Float_t rawBuf[gMaxSlots *gMaxChannels+gExtraSize]
Base class for a trigger on a data flow.
virtual void Exec(Option_t *option="")
watch the current frame
virtual void Exec(Option_t *option="")
watch the current frame
virtual void DoCanvas(TCanvas *c, Option_t *)
To be overwritten by real implementation if a canvas is produced.
Short_t GetLastExecStatus() const
to get the last status
RancLegnaroWatcher(const char *, const char *, TDirectory *sp_dir=0x0, TDirectory *tag_dir=0x0)
ClassImp(RancLegnaroWatcher)
void AddMatrix(UShort_t ch1, UShort_t ch2, UShort_t DeltaCh1=1, UShort_t DeltaCh2=1, Int_t binx=512, Double_t xmin=0, Double_t xmax=4096, Int_t biny=512, Double_t ymin=0, Double_t ymax=4096)
Add a matrix between two elements.
UInt_t SetOffset(UInt_t off=0u) const
change the current position.