GSI Object Oriented Online Offline (Go4) GO4-6.4.0
Loading...
Searching...
No Matches
TGo4DabcProxy.cxx
Go to the documentation of this file.
1// $Id$
2//-----------------------------------------------------------------------
3// The GSI Online Offline Object Oriented (Go4) Project
4// Experiment Data Processing at EE department, GSI
5//-----------------------------------------------------------------------
6// Copyright (C) 2000- GSI Helmholtzzentrum fuer Schwerionenforschung GmbH
7// Planckstr. 1, 64291 Darmstadt, Germany
8// Contact: http://go4.gsi.de
9//-----------------------------------------------------------------------
10// This software can be used under the license agreements as stated
11// in Go4License.txt file which is part of the distribution.
12//-----------------------------------------------------------------------
13
14#include "TGo4DabcProxy.h"
15
16#ifndef WITHOUT_DABC
17
18#include "TROOT.h"
19#include "TGraph.h"
20#include "TClass.h"
21#include "TAxis.h"
22#include "TTimer.h"
23#include "TBufferFile.h"
24#include "TMemFile.h"
25#include "RZip.h"
26
27#include "TGo4Log.h"
28#include "TGo4Slot.h"
29#include "TGo4ObjectManager.h"
30
31#include "dabc/api.h"
32#include "dabc/version.h"
33#include "dabc/Hierarchy.h"
34#include "dabc/Manager.h"
35#include "dabc/Publisher.h"
36#include "dabc/Configuration.h"
37
38
39bool IsRateHistory(const dabc::Hierarchy& item)
40{
41 if ((item.GetField("dabc:kind").AsStr() == "rate") ||
42 (item.GetField("dabc:history").AsInt() > 0)) return kTRUE;
43 return kFALSE;
44}
45
46TString GetRootClassName(const dabc::Hierarchy& item)
47{
48 std::string kind = item.GetField("dabc:kind").AsStr();
49 if (kind.find("ROOT.") == 0) {
50 kind.erase(0,5);
51 return kind.c_str();
52 }
53 if (IsRateHistory(item)) return "TGraph";
54
55 return "";
56}
57
58// we use fake file only to correctly reconstruct streamer infos
59class TFakeFile : public TMemFile {
60 protected:
61 TList *mylist{nullptr};
62
63 InfoListRet GetStreamerInfoListImpl(bool) override
64 {
65 ROOT::Internal::RConcurrentHashColl::HashValue hash;
66 return { (TList *) mylist->Clone(), 0, hash };
67 }
68
69 public:
70
71 TFakeFile(TList *sinfo) : TMemFile("dummy.file", "RECREATE"), mylist(sinfo)
72 {
73 gROOT->GetListOfFiles()->Remove(this);
74 }
75
76 virtual ~TFakeFile() {}
77
78};
79
80
81class TGo4DabcAccess : public TGo4Access {
82 protected:
83 std::string fNodeName;
84 std::string fObjName;
85 std::string fItemName;
86 std::string fRootClassName;
87 std::string fMasterName;
88 std::string fMasterItemName;
89 bool fIsRate{false};
92 TString fxRecvPath;
93 dabc::Buffer fRawData;
94 Bool_t fCompression{false};
95
96 public:
97
98 TGo4DabcAccess(const std::string& node, const std::string& sinfoname) :
99 TGo4Access(),
100 fNodeName(node),
101 fObjName(),
102 fItemName(),
104 fMasterName(),
106 fIsRate(false),
108 fxReceiver(nullptr),
109 fxRecvPath(),
110 fRawData(),
111 fCompression(kTRUE)
112 {
113 fObjName = "StreamerInfo";
114 fItemName = sinfoname;
115 fRootClassName = "TList";
116
117 //printf("Create MASTER ACCESS %p\n", this);
118 }
119
120
121 TGo4DabcAccess(const std::string& node, const dabc::Hierarchy& item) :
122 TGo4Access(),
123 fNodeName(node),
124 fObjName(),
125 fItemName(),
127 fMasterName(),
129 fIsRate(false),
131 fxReceiver(nullptr),
132 fxRecvPath(),
133 fRawData(),
134 fCompression(kTRUE)
135 {
136 fObjName = item.GetName();
137 fItemName = item.ItemName();
138 std::string kind = item.GetField(dabc::prop_kind).AsStr();
139 fHistoryLength = item.GetField(dabc::prop_history).AsInt();
140
141 fMasterName = item.GetField(dabc::prop_masteritem).AsStr();
142 fMasterItemName = item.FindMaster().ItemName();
143
144 if (kind.find("ROOT.") == 0) {
145 kind.erase(0,5);
146 fRootClassName = kind;
147 } else
148 if (kind=="rate") {
149 fIsRate = true;
150 if (fHistoryLength > 0) fRootClassName = "TGraph";
151 }
152 }
153
155 {
156 }
157
158 Bool_t IsRemote() const override { return kTRUE; }
159
160 Bool_t CanGetObject() const override { return kFALSE; }
161
162 Bool_t GetObject(TObject *&obj, Bool_t &owner) const override { return kFALSE; }
163
164 TClass *GetObjectClass() const override
165 {
166 if (fRootClassName.length() > 0)
167 return TGo4Proxy::GetClass(fRootClassName.c_str());
168 return nullptr;
169 }
170
171 const char *GetObjectName() const override
172 {
173 return fObjName.c_str();
174 }
175
176 const char *GetObjectClassName() const override
177 {
178 if (fRootClassName.length()>0) return fRootClassName.c_str();
179
180 return "dabc::Hierarchy";
181 }
182
183 Int_t AssignObjectTo(TGo4ObjectManager *rcv, const char *path) override
184 {
185 if (!rcv) return 0;
186
187 dabc::WorkerRef wrk = dabc::mgr.FindItem("/Go4ReplWrk");
188 if (wrk.null()) return 0;
189
190 if (fIsRate && (fHistoryLength>0)) {
191 dabc::CmdGetBinary cmd2;
192 cmd2.SetStr("Item", fItemName);
193 cmd2.SetStr("Kind","hierarchy");
194 cmd2.SetStr("Query", TString::Format("history=%d",fHistoryLength).Data());
195 cmd2.SetTimeout(10.);
196 cmd2.SetReceiver(fNodeName + dabc::Publisher::DfltName());
197
198 cmd2.SetPtr("#DabcAccess", this);
199 fxReceiver = rcv;
200 fxRecvPath = path;
201 wrk()->Assign(cmd2);
202
203 if (dabc::mgr.GetCommandChannel().Submit(cmd2)) return 2;
204 } else
205
206 if (!fRootClassName.empty()) {
207
208 TClass *cl = TClass::GetClass(fRootClassName.c_str());
209 if (!cl) {
210 TGo4Log::Error("GetObject Unknown class %s", fRootClassName.c_str());
211 return 0;
212 }
213
214 if (!cl->InheritsFrom(TObject::Class())) {
215 // in principle user should call TKey::ReadObjectAny!
216 TGo4Log::Error("GetObject Class %s not derived from TObject", fRootClassName.c_str());
217 return 0;
218 }
219
220 dabc::CmdGetBinary cmd(fItemName, "root.bin", fCompression ? "zipped" : "");
221 // cmd.SetStr("Item", fItemName);
222 // cmd.SetUInt("version", version);
223 cmd.SetTimeout(10.);
224 cmd.SetReceiver(fNodeName + dabc::Publisher::DfltName());
225
226 cmd.SetPtr("#DabcAccess", this);
227 fxReceiver = rcv;
228 fxRecvPath = path;
229
230 //printf("Request for recv %p path %s master %s\n", rcv, path, fMasterName.c_str());
231 wrk()->Assign(cmd);
232
233 if (dabc::mgr.GetCommandChannel().Submit(cmd)) return 2;
234 }
235
236 return 0;
237 }
238
240 double ProcessCommandReply(dabc::Command cmd)
241 {
242 // DOUT0("ProcessCommandReply");
243
244 if (cmd.GetResult() != dabc::cmd_true) {
245 TGo4Log::Error("dabc::Command %s execution failed", cmd.GetName());
246 return -1;
247 }
248
249 if (fRawData.null())
250 fRawData = cmd.GetRawData();
251
252 if (fRawData.null() || (fRawData.NumSegments() == 0)) {
253 TGo4Log::Error("Did not get raw data from dabc::Command %s", cmd.GetName());
254 return -1;
255 }
256
257 if (fIsRate && (fHistoryLength>0)) {
258 dabc::Hierarchy res;
259 res.Create("get");
260 res.SetVersion(cmd.GetUInt("version"));
261 res.ReadFromBuffer(fRawData);
262
263 //DOUT0("GET:%s RES = \n%s", item.ItemName().c_str(), res.SaveToXml(dabc::xmlmask_History).c_str());
264
265 dabc::HistoryIter iter = res.MakeHistoryIter();
266 int cnt = 0;
267 while (iter.next()) cnt++;
268
269 // DOUT0("ITERATOR cnt %d", cnt);
270
271 if (cnt == 0) return kFALSE;
272
273 TGraph *gr = new TGraph(cnt);
274 gr->SetName(fObjName.c_str());
275 gr->SetTitle(TString::Format("%s ratemeter", fItemName.c_str()).Data());
276 int i = 0;
277 while (iter.next()) {
278
279 double v = iter.GetField("value").AsDouble();
280 uint64_t tm = iter.GetField("time").AsUInt();
281
282 // DOUT0("pnt %d tm %20u value %5.2f", i, tm / 1000, v);
283
284 i++;
285 gr->SetPoint(cnt-i, tm / 1000, v);
286 }
287
288 gr->GetXaxis()->SetTimeDisplay(1);
289 gr->GetXaxis()->SetTimeFormat("%H:%M:%S%F1970-01-01 00:00:00");
290
291 DoObjectAssignement(fxReceiver, fxRecvPath.Data(), gr, kTRUE);
292 return -1.;
293 }
294
295 if (!fRootClassName.empty()) {
296 TClass *cl = TClass::GetClass(fRootClassName.c_str());
297
298 // dabc::BinDataHeader* hdr = (dabc::BinDataHeader*) fRawData.SegmentPtr();
299
300 TGo4Slot *tgtslot = fxReceiver->GetSlot(fxRecvPath.Data());
301
302 TGo4Slot *masterslot = nullptr;
303
304 if (!fMasterName.empty() && tgtslot && tgtslot->GetParent())
305 masterslot = tgtslot->GetParent()->FindSlot(fMasterName.c_str());
306
307 if (masterslot) {
308 // always request master
309
310 Int_t local_master_version = 0;
311
312 if (!masterslot->GetIntPar("dabc_version", local_master_version))
313 local_master_version = 0;
314
315 if (local_master_version >= cmd.GetInt("MVersion")) {
316 //printf("MASTER version %d required %d EXISTS!!!\n", local_master_version, cmd.GetInt("MVersion"));
317 } else
318 if (masterslot->GetPar("dabc_loading")) {
319 // if master slot loading, we will try to check again 1 sec later
320 return 1.;
321 } else {
322
324
325 if (maccess->AssignObjectToSlot(fxReceiver) != 2) {
326 delete maccess;
327 TGo4Log::Error("Fail to request MASTER item %s from DABC node %s", fMasterItemName.c_str(), fNodeName.c_str());
328 return -1;
329 }
330
331 masterslot->SetPar("dabc_loading", "true");
332 return 1.; // try after 1 seconds
333 }
334 }
335
336 TGo4Log::Debug("Item %s raw_data size %u master_version %u", fItemName.c_str(), fRawData.GetTotalSize(), cmd.GetInt("MVersion"));
337
338 char *pobj = (char *) cl->New();
339
340 if (!pobj) {
341 TGo4Log::Error("ReadObj - Cannot create new object of class %s", cl->GetName());
342 return true;
343 }
344
345 Int_t baseOffset = cl->GetBaseClassOffset(TObject::Class());
346 if (baseOffset==-1) {
347 // cl does not inherit from TObject.
348 // Since this is not possible yet, the only reason we could reach this code
349 // is because something is screw up in the ROOT code.
350 TGo4Log::Error("ReadObj Incorrect detection of the inheritance from TObject for class %s.",
351 cl->GetName());
352 return -1;
353 }
354
355 TObject *tobj = (TObject *) (pobj+baseOffset);
356 // Create an instance of this class
357
358 char *rawbuf = nullptr;
359 Int_t rawbuflen = 0;
360
361 if (fCompression) {
362
363 int sizeinp = fRawData.GetTotalSize(), sizeout = 0, irep = 0;
364
365 if (R__unzip_header(&sizeinp, (unsigned char *) fRawData.SegmentPtr(), &sizeout)) {
366 printf("Fail to decode zip header\n");
367 } else {
368 rawbuf = (char*) malloc(sizeout);
369
370 R__unzip(&sizeinp, (unsigned char *) fRawData.SegmentPtr(), &sizeout, (unsigned char *) rawbuf, &irep);
371
372 rawbuflen = irep;
373 }
374 } else {
375 rawbuf = (char *) fRawData.SegmentPtr();
376 rawbuflen = fRawData.GetTotalSize();
377 }
378
379 if (rawbuflen>0) {
380 TBufferFile buf(TBuffer::kRead, rawbuflen, rawbuf, kFALSE);
381 buf.MapObject(pobj,cl);
382 tobj->Streamer(buf);
383 } else {
384 cl->Destructor(pobj);
385 pobj = nullptr;
386 tobj = nullptr;
387 }
388
389 if (fCompression) free(rawbuf);
390
391 if ((fObjName == "StreamerInfo") &&
392 (fRootClassName == "TList") &&
393 tobj && tobj->InheritsFrom(TList::Class()) &&
394 fMasterName.empty()) {
395
396 TFakeFile fff((TList *) tobj);
397 fff.ReadStreamerInfo();
398
399 TGo4Log::Debug("Get streamer infos from remote");
400 }
401
402 if (tobj) {
403 if (tgtslot) {
404 tgtslot->RemovePar("dabc_loading"); // indicate that loading is finished
405 tgtslot->SetIntPar("dabc_version", cmd.GetInt("BVersion"));
406 }
407 DoObjectAssignement(fxReceiver, fxRecvPath.Data(), tobj, kTRUE);
408 }
409 return -1;
410 }
411
412 return -1;
413 }
414
415};
416
417
418// ===================================================================================
419
420// Timer used to invoke reply in the main process
421
422class TReplyTimer : public TTimer {
423 public:
424 dabc::Command fCmd;
425
426 TReplyTimer(dabc::Command cmd) :
427 TTimer(0),
428 fCmd(cmd)
429 {
430 Add();
431 }
432
433 Bool_t Notify() override
434 {
435 double res_tm = -1.;
436
437 TGo4DabcAccess* acc = nullptr;
438
439 if (!fCmd.null()) {
440
441 acc = (TGo4DabcAccess*) fCmd.GetPtr("#DabcAccess");
442 TGo4DabcProxy* prox = (TGo4DabcProxy*) fCmd.GetPtr("#DabcProxy");
443
444 if (acc) {
445 res_tm = acc->ProcessCommandReply(fCmd);
446 } else
447 if (prox) {
448 prox->ReplyCommand(&fCmd);
449 fCmd.Reply();
450 }
451 }
452
453 if (res_tm < 0) {
454 fCmd.Release();
455 if (acc) delete acc;
456 Remove();
457 delete this;
458 return kFALSE;
459 }
460
461 Start((Long_t)res_tm*1000, kTRUE);
462
463 return kTRUE;
464 }
465};
466
467class ReplyWorker : public dabc::Worker {
468 protected:
469 bool ReplyCommand(dabc::Command cmd) override
470 {
471 if (cmd.GetPtr("#DabcAccess") || cmd.GetPtr("#DabcProxy")) {
472 // DOUT0("CreateReplTimer");
473 new TReplyTimer(cmd);
474 return false;
475 }
476
477 return dabc::Worker::ReplyCommand(cmd);
478 }
479
480 public:
481 ReplyWorker(const std::string& name) :
482 dabc::Worker(MakePair(name))
483 {
484 }
485};
486
487
488// ===================================================================================
489
491 protected:
492 dabc::Hierarchy fParent;
493 dabc::Hierarchy fChild;
494 TString fClNameBuf;
495 unsigned fCnt{0};
496
497 public:
498 TGo4DabcLevelIter(const dabc::Hierarchy& item) :
500 fParent(item),
501 fChild(),
502 fCnt(0)
503 {
504 }
505
507
508 Bool_t next() override
509 {
510 if (fParent.NumChilds() == 0) return kFALSE;
511
512 if (fChild.null()) {
513 fCnt = 0;
514 fChild = fParent.GetChild(fCnt);
515 } else {
516 fCnt++;
517 fChild.Release();
518 if (fCnt>=fParent.NumChilds()) return kFALSE;
519 fChild = fParent.GetChild(fCnt);
520 }
521
522 return !fChild.null();
523 }
524
525 Bool_t isfolder() override { return fChild.NumChilds() > 0; }
526
527 Int_t getflag(const char *flagname) override
528 {
529 if (strcmp(flagname,"IsRemote") == 0) return 1;
530 return -1;
531 }
532
534 {
535 return fChild.NumChilds() > 0 ? new TGo4DabcLevelIter(fChild) : nullptr;
536 }
537
538 TGo4Slot *getslot() override { return nullptr; }
539
540 const char *name() override { return fChild.GetName(); }
541 const char *info() override { return "item from dabc"; }
542 Int_t sizeinfo() override { return 0; }
543
544 Int_t GetKind() override
545 {
546 if (isfolder()) return TGo4Access::kndFolder;
547
549
551
552 if (fClNameBuf.Length()>0) return TGo4Access::kndObject;
553
554 return -1;
555 }
556
557 const char *GetClassName() override
558 {
559 if (IsRateHistory(fChild)) return "TGraph";
560
562
563 if (fClNameBuf.Length()>0) return fClNameBuf.Data();
564
565 return "dabc::Hierarchy";
566 }
567};
568
569
570// =====================================================================================
571
572
575 fNodeName(),
576 fxHierarchy(nullptr),
577 fxParentSlot(nullptr)
578{
579}
580
582{
583 if (fxHierarchy) {
584 delete ((dabc::Hierarchy*) fxHierarchy);
585 fxHierarchy = nullptr;
586 }
587}
588
590{
591 return DABC_RELEASE;
592}
593
594Bool_t TGo4DabcProxy::Connect(const char *nodename)
595{
596 if (!dabc::CreateManager("cmd", 0)) return kFALSE;
597
598 std::string node = dabc::MakeNodeName(nodename);
599
600 if (!dabc::ConnectDabcNode(node)) {
601 fNodeName = node;
602 return kFALSE;
603 }
604
605 dabc::WorkerRef wrk = dabc::mgr.FindItem("/Go4ReplWrk");
606
607 if (wrk.null()) {
608 wrk = new ReplyWorker("/Go4ReplWrk");
609 wrk()->AssignToThread(dabc::mgr.thread());
610 }
611
612 // printf("Connection to %s done\n", nodename);
613
614 fNodeName = node;
615
616 return UpdateHierarchy(kTRUE);
617}
618
620{
621 dabc::Command cmd = *((dabc::Command*)_cmd);
622
623 if (cmd.IsName(dabc::CmdGetNamesList::CmdName())) {
624
625 dabc::Buffer buf = cmd.GetRawData();
626
627 if (buf.null()) return kFALSE;
628
629 if (!fxHierarchy)
630 fxHierarchy = new dabc::Hierarchy();
631
632 dabc::Hierarchy& hierarchy = *((dabc::Hierarchy*) fxHierarchy);
633 hierarchy.Release();
634
635 // DOUT0("Get raw data %p %u", buf.SegmentPtr(), buf.GetTotalSize());
636 if (!hierarchy.ReadFromBuffer(buf)) return kFALSE;
637
638 if (fxParentSlot)
640 }
641
642 //printf("Read from DABC node %s done\n", fNodeName.Data());
643 return kTRUE;
644}
645
646
648{
649 if (fNodeName.IsNull()) return kFALSE;
650
651 dabc::CmdGetNamesList cmd2;
652 cmd2.SetReceiver(std::string(fNodeName.Data()) + dabc::Publisher::DfltName());
653 cmd2.SetTimeout(10.);
654
655 dabc::WorkerRef wrk = dabc::mgr.FindItem("/Go4ReplWrk");
656
657 if (!sync && !wrk.null()) {
658 cmd2.SetPtr("#DabcProxy", this);
659 wrk()->Assign(cmd2);
660
661 dabc::mgr.GetCommandChannel().Submit(cmd2);
662 return kTRUE;
663 }
664
665 if (dabc::mgr.GetCommandChannel().Execute(cmd2)!=dabc::cmd_true) {
666 TGo4Log::Error("Fail to get remote hierarchy");
667 return kFALSE;
668 }
669
670 return ReplyCommand(&cmd2);
671}
672
674{
675 fxParentSlot = slot;
676}
677
679{
680}
681
683{
684 if (!fxHierarchy) return kFALSE;
685
686 dabc::Hierarchy& hierarchy = *((dabc::Hierarchy*) fxHierarchy);
687
688 return hierarchy.NumChilds() > 0;
689}
690
691std::unique_ptr<TGo4Access> TGo4DabcProxy::ProvideAccess(const char *name)
692{
693 if (!fxHierarchy)
694 return nullptr;
695
696 dabc::Hierarchy& hierarchy = *((dabc::Hierarchy*) fxHierarchy);
697
698 if (hierarchy.null())
699 return nullptr;
700
701 if (!name || !*name)
702 return std::make_unique<TGo4DabcAccess>(fNodeName.Data(), hierarchy);
703
704 dabc::Hierarchy child = hierarchy.FindChild(name);
705
706 return child.null() ? nullptr : std::make_unique<TGo4DabcAccess>(fNodeName.Data(), child);
707}
708
710{
711 if (!fxHierarchy) return nullptr;
712
713 dabc::Hierarchy& hierarchy = *((dabc::Hierarchy*) fxHierarchy);
714
715 return hierarchy.null() ? nullptr : new TGo4DabcLevelIter(hierarchy);
716}
717
718void TGo4DabcProxy::WriteData(TGo4Slot *slot, TDirectory *dir, Bool_t onlyobjs)
719{
720}
721
722void TGo4DabcProxy::ReadData(TGo4Slot *slot, TDirectory *dir)
723{
724}
725
726void TGo4DabcProxy::Update(TGo4Slot *slot, Bool_t strong)
727{
728 if (strong) {
729 printf("GO4 WANTS update DABC hierarchy - do it\n");
730 UpdateHierarchy(kFALSE);
731 }
732}
733
735{
736 return UpdateHierarchy(kFALSE);
737}
738
739
740#else
741
744 fNodeName(),
745 fxHierarchy(nullptr),
746 fxParentSlot(nullptr)
747{
748}
749
751{
752}
753
755{
756 return nullptr;
757}
758
759Bool_t TGo4DabcProxy::Connect(const char *nodename)
760{
761 return kFALSE;
762}
763
764Bool_t TGo4DabcProxy::UpdateHierarchy(Bool_t sync)
765{
766 return kFALSE;
767}
768
769Bool_t TGo4DabcProxy::ReplyCommand(void *cmd)
770{
771 return kFALSE;
772}
773
774
776{
777}
778
780{
781}
782
783Bool_t TGo4DabcProxy::HasSublevels() const
784{
785 return kFALSE;
786}
787
788std::unique_ptr<TGo4Access> TGo4DabcProxy::ProvideAccess(const char *name)
789{
790 return nullptr;
791}
792
794{
795 return nullptr;
796}
797
798void TGo4DabcProxy::WriteData(TGo4Slot *slot, TDirectory *dir, Bool_t onlyobjs)
799{
800
801}
802
803void TGo4DabcProxy::ReadData(TGo4Slot *slot, TDirectory *dir)
804{
805
806}
807
808void TGo4DabcProxy::Update(TGo4Slot *slot, Bool_t strong)
809{
810}
811
813{
814 return kFALSE;
815}
816
817
818#endif
bool IsRateHistory(const dabc::Hierarchy &item)
TString GetRootClassName(const dabc::Hierarchy &item)
bool ReplyCommand(dabc::Command cmd) override
ReplyWorker(const std::string &name)
TList * mylist
InfoListRet GetStreamerInfoListImpl(bool) override
TFakeFile(TList *sinfo)
virtual ~TFakeFile()
void DoObjectAssignement(TGo4ObjectManager *rcv, const char *path, TObject *obj, Bool_t owner)
Definition TGo4Proxy.cxx:63
Int_t AssignObjectToSlot(TGo4Slot *slot)
Made for convenience - extracts OM and slot path and calls AssignObjectTo method.
Definition TGo4Proxy.cxx:54
std::string fMasterItemName
double ProcessCommandReply(dabc::Command cmd)
Returns repetition timeout, negative - delete access object.
TGo4ObjectManager * fxReceiver
const char * GetObjectClassName() const override
dabc::Buffer fRawData
Bool_t fCompression
raw data, get from command
std::string fRootClassName
Bool_t CanGetObject() const override
Returns kTRUE, when object can be directly obtained with GetObject() method.
TClass * GetObjectClass() const override
Bool_t GetObject(TObject *&obj, Bool_t &owner) const override
const char * GetObjectName() const override
Int_t AssignObjectTo(TGo4ObjectManager *rcv, const char *path) override
Have to assign object to provided receiver.
std::string fObjName
Bool_t IsRemote() const override
Indicate if object is remote.
TGo4DabcAccess(const std::string &node, const std::string &sinfoname)
request compression from server
std::string fNodeName
TGo4DabcAccess(const std::string &node, const dabc::Hierarchy &item)
std::string fMasterName
std::string fItemName
virtual ~TGo4DabcAccess()
const char * GetClassName() override
TGo4Slot * getslot() override
unsigned fCnt
buffer used for class name
TGo4LevelIter * subiterator() override
Int_t GetKind() override
Bool_t isfolder() override
const char * info() override
Int_t sizeinfo() override
Int_t getflag(const char *flagname) override
TGo4DabcLevelIter(const dabc::Hierarchy &item)
const char * name() override
virtual ~TGo4DabcLevelIter()
dabc::Hierarchy fChild
Bool_t next() override
dabc::Hierarchy fParent
TGo4Slot * fxParentSlot
pointer on dabc::Hierarchy class
Bool_t UpdateHierarchy(Bool_t sync=kTRUE)
void Update(TGo4Slot *slot, Bool_t strong) override
void Finalize(TGo4Slot *slot) override
Bool_t HasSublevels() const override
void Initialize(TGo4Slot *slot) override
TString fNodeName
void WriteData(TGo4Slot *slot, TDirectory *dir, Bool_t onlyobjs) override
Bool_t Connect(const char *nodename)
TGo4LevelIter * MakeIter() override
void ReadData(TGo4Slot *slot, TDirectory *dir) override
static const char * GetDabcVersion()
Bool_t RefreshNamesList() override
Bool_t ReplyCommand(void *cmd)
std::unique_ptr< TGo4Access > ProvideAccess(const char *name) override
virtual ~TGo4DabcProxy()
static void Debug(const char *text,...) GO4_PRINTF_ARGS
User shortcut for message with prio 0.
Definition TGo4Log.cxx:281
static void Error(const char *text,...) GO4_PRINTF_ARGS
User shortcut for message with prio 3.
Definition TGo4Log.cxx:320
static TClass * GetClass(const char *classname, Bool_t load=kFALSE)
Definition TGo4Proxy.cxx:73
special base class for remote data servers like DABC, HTTP, hist server
TGo4ServerProxy()
contained object info
TGo4Slot * GetParent() const
Definition TGo4Slot.h:58
Bool_t GetIntPar(const char *name, Int_t &value) const
Definition TGo4Slot.cxx:624
TGo4Slot * FindSlot(const char *fullpath, const char **subname=nullptr)
Definition TGo4Slot.cxx:469
@ evObjUpdated
Definition TGo4Slot.h:49
Int_t NumChilds() const
Definition TGo4Slot.h:76
void SetPar(const char *name, const char *value)
Definition TGo4Slot.cxx:586
void RemovePar(const char *name)
Definition TGo4Slot.cxx:606
void SetIntPar(const char *name, Int_t value)
Definition TGo4Slot.cxx:617
const char * GetPar(const char *name) const
Definition TGo4Slot.cxx:598
dabc::Command fCmd
TReplyTimer(dabc::Command cmd)
Bool_t Notify() override