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