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;
INTS4 f_his_senddir(s_his_head *ps_head, INTS4 l_histos)
TGo4HisConnectorRunnable()
Int_t Run(void *) override
INTS4 f_his_sendhis(s_his_head *ps_head, INTS4 l_histos, CHARS *pc_histo, INTS4 *pl_data)
virtual ~TGo4HisConnectorRunnable()
INTS4 f_his_wait(INTS4 *pl_action, CHARS *pc_histo)
TH1 * GetHistogram(const char *name)
TGo4HistogramServer * fxHistogramServer
static const char * fgcSHUTDOWNNAME
void Message(Int_t prio, const char *text,...)
TNamed * GetObject(const char *name, const char *folder=nullptr)
TGo4Analysis * GetAnalysis() const
TFolder * GetObjectFolder()