21#include "TGo4LockGuard.h"
48 Bool_t histofromgraph = kFALSE;
68 if (ob && ob->InheritsFrom(TH1::Class())) {
69 his =
dynamic_cast<TH1 *
>(ob);
70 }
else if (ob && ob->InheritsFrom(TGraph::Class())) {
71 TGraph *gr =
dynamic_cast<TGraph *
>(ob);
72 his = gr->GetHistogram();
76 Int_t maxpoints = gr->GetN();
77 for (Int_t point = 0; point < maxpoints; ++point) {
80 gr->GetPoint(point, xg, yg);
81 Int_t xbin = his->FindBin(xg);
82 his->SetBinContent(xbin, yg);
83 histofromgraph = kTRUE;
92 if (his && histofromgraph)
97 hisname = his->GetName();
98 ana->
Message(0,
"Histogram server is sending histogram %s", hisname);
100 hisname =
"No such histogram";
125 ana->
Message(0,
"Histogram server: got unknown command");
129 std::cout <<
"Histogram Server: Error on connect request: " << result << std::endl;
The mother of all go4 analysis.
TFolder * GetObjectFolder()
Access to top level go4 folder.
void Message(Int_t prio, const char *text,...)
Display a user message.
TNamed * GetObject(const char *name, const char *folder=nullptr)
Searches for object by name in all directories.
TH1 * GetHistogram(const char *name)
Search histogram in histogram list (directory).
TGo4HistogramServer * fxHistogramServer
1 1
TGo4HisConnectorRunnable()
Int_t Run(void *) override
The working function which runs in the thread.
virtual ~TGo4HisConnectorRunnable()
Handles a histogram server (mbs histogram protocol) for the histograms registered in the analysis.
static const char * fgcSHUTDOWNNAME
This string is send as histogram name for termination connection.
Object container for the mbs histogram buffer structure.
TGo4Runnable(const TGo4Runnable &right)
INTS4 f_his_wait(INTS4 *pl_action, CHARS *pc_histo)
INTS4 f_his_senddir(s_his_head *ps_head, INTS4 l_histos)
INTS4 f_his_sendhis(s_his_head *ps_head, INTS4 l_histos, CHARS *pc_histo, INTS4 *pl_data)