DABC (Data Acquisition Backbone Core)  2.9.9
DabcProcMgr.cxx
Go to the documentation of this file.
1 // $Id: DabcProcMgr.cxx 4762 2021-04-19 08:59:25Z linev $
2 
3 /************************************************************
4  * The Data Acquisition Backbone Core (DABC) *
5  ************************************************************
6  * Copyright (C) 2009 - *
7  * GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
8  * Planckstr. 1, 64291 Darmstadt, Germany *
9  * Contact: http://dabc.gsi.de *
10  ************************************************************
11  * This software can be used under the GPL license *
12  * agreements as stated in LICENSE.txt file *
13  * which is part of the distribution. *
14  ************************************************************/
15 
16 #include "stream/DabcProcMgr.h"
17 
18 #include "dabc/Buffer.h"
19 #include "dabc/Iterator.h"
20 #include "dabc/Factory.h"
21 #include "dabc/Manager.h"
22 #include "dabc/BinaryFile.h"
23 #include "dabc/timing.h"
24 
25 #include <cstdlib>
26 #include <cmath>
27 
29  base::ProcMgr(),
30  fTop(),
31  fWorkingFlag(true),
32  fStore(),
33  fStoreInfo("no store created"),
34  fSortOrder(true),
35  fDefaultFill(3)
36 {
37 }
38 
40 {
41 }
42 
44 {
45  fTop = top;
46 
47  if (!withcmds) return;
48 
49  dabc::Hierarchy h = fTop.CreateHChild("Control/Clear");
50  h.SetField("_kind","Command");
51  h.SetField("_title", "Clear all histograms in the server");
52  h.SetField("_icon", "dabcsys/plugins/stream/icons/clear.png");
53  h.SetField("_fastcmd", "true");
54  h.SetField("_numargs", "0");
55 
56  h = fTop.CreateHChild("Control/Save");
57  h.SetField("_kind","Command");
58  h.SetField("_title", "Save all histograms in the dabc.root file");
59  h.SetField("_icon", "dabcsys/plugins/stream/icons/save.png");
60  h.SetField("_fastcmd", "true");
61  h.SetField("_numargs", "0");
62 
63  h = fTop.CreateHChild("Control/Start");
64  h.SetField("_kind","Command");
65  h.SetField("_title", "Start processing of data");
66  h.SetField("_icon", "dabcsys/plugins/stream/icons/start.png");
67  h.SetField("_fastcmd", "true");
68  h.SetField("_numargs", "0");
69 
70  h = fTop.CreateHChild("Control/Stop");
71  h.SetField("_kind","Command");
72  h.SetField("_title", "Stop processing of data");
73  h.SetField("_icon", "dabcsys/plugins/stream/icons/stop.png");
74  h.SetField("_fastcmd", "true");
75  h.SetField("_numargs", "0");
76 
77 
78  h = fTop.CreateHChild("Control/RunLog");
79  h.SetField(dabc::prop_kind, "log");
80  h.EnableHistory(1000);
81 
82  h = fTop.CreateHChild("Control/ErrLog");
83  h.SetField(dabc::prop_kind, "log");
84  h.EnableHistory(1000);
85 }
86 
87 
88 void stream::DabcProcMgr::AddRunLog(const char *msg)
89 {
90  dabc::Hierarchy h = fTop.GetHChild("Control/RunLog");
91  h.SetField("value", msg);
92  h.MarkChangedItems();
93 }
94 
95 void stream::DabcProcMgr::AddErrLog(const char *msg)
96 {
97  dabc::Hierarchy h = fTop.GetHChild("Control/ErrLog");
98  h.SetField("value", msg);
99  h.MarkChangedItems();
100 }
101 
102 void stream::DabcProcMgr::PrintLog(const char *msg)
103 {
104  DOUT0(msg);
105 }
106 
107 base::H1handle stream::DabcProcMgr::MakeH1(const char* name, const char* title, int nbins, double left, double right, const char* options)
108 {
109  std::string xtitle, ytitle, xlbls, fillcolor, drawopt, hmin, hmax;
110  bool reuse{false}, clear_protect{false};
111 
112  while (options) {
113  const char* separ = strchr(options,';');
114  std::string part = options;
115  if (separ) {
116  part.resize(separ-options);
117  options = separ+1;
118  } else {
119  options = nullptr;
120  }
121 
122  if (part.find("xbin:")==0) { xlbls = part; xlbls.erase(0, 5); } else
123  if (part.find("fill:")==0) { fillcolor = part; fillcolor.erase(0,5); } else
124  if (part.find("opt:")==0) { drawopt = part; drawopt.erase(0,4); } else
125  if (part.find("hmin:")==0) { hmin = part; hmin.erase(0,5); } else
126  if (part.find("hmax:")==0) { hmax = part; hmax.erase(0,5); } else
127  if (part.find("kind:")==0) { } else
128  if (part.find("reuse")==0) { reuse = true; } else
129  if (part.find("clear_protect")==0) { clear_protect = true; } else
130  if (xtitle.empty()) xtitle = part; else ytitle = part;
131  }
132 
133  dabc::LockGuard lock(fTop.GetHMutex());
134 
135  dabc::Hierarchy h = fTop.GetHChild(name);
136  if (!h.null() && reuse && h.GetFieldPtr("bins"))
137  return (base::H1handle) h.GetFieldPtr("bins")->GetDoubleArr();
138 
139  if (!h) {
140  std::string sname = name;
141  auto pos = sname.find_last_of("/");
142  if ((pos != std::string::npos) && fSortOrder)
143  h = fTop.CreateHChild(sname.substr(0,pos).c_str(), false, true).CreateHChild(sname.substr(pos+1).c_str());
144  else
145  h = fTop.CreateHChild(name);
146  }
147  if (!h) return nullptr;
148 
149  h.SetField("_kind","ROOT.TH1D");
150  h.SetField("_title", title);
151  h.SetField("_dabc_hist", true); // indicate for browser that it is DABC histogram
152  h.SetField("_make_request", "DABC.ReqH"); // provide proper request
153  h.SetField("_after_request", "DABC.ConvertH"); // convert object into ROOT histogram
154  h.SetField("nbins", nbins);
155  h.SetField("left", left);
156  h.SetField("right", right);
157  if (!xtitle.empty()) h.SetField("xtitle", xtitle);
158  if (!ytitle.empty()) h.SetField("ytitle", ytitle);
159  if (xlbls.length()>0) h.SetField("xlabels", xlbls);
160  h.SetField("fillcolor", fillcolor.empty() ? fDefaultFill : std::stoi(fillcolor));
161  if (drawopt.length() > 0) h.SetField("drawopt", drawopt);
162  if (!hmin.empty()) h.SetField("hmin", std::stof(hmin));
163  if (!hmax.empty()) h.SetField("hmax", std::stof(hmax));
164  if (clear_protect) h.SetField("_no_reset", "true");
165 
166  std::vector<double> bins;
167  bins.resize(nbins+5, 0.);
168  bins[0] = nbins;
169  bins[1] = left;
170  bins[2] = right;
171  h.SetField("bins", bins);
172 
173  fTop.MarkChangedItems();
174 
175  return (base::H1handle) h.GetFieldPtr("bins")->GetDoubleArr();
176 }
177 
178 base::H2handle stream::DabcProcMgr::MakeH2(const char* name, const char* title, int nbins1, double left1, double right1, int nbins2, double left2, double right2, const char* options)
179 {
180  std::string xtitle, ytitle, xlbls, ylbls, fillcolor, drawopt, hmin, hmax, h2poly;
181  bool reuse{false}, clear_protect{false};
182 
183  while (options != nullptr) {
184  const char* separ = strchr(options,';');
185  std::string part = options;
186  if (separ!=0) {
187  part.resize(separ-options);
188  options = separ+1;
189  } else {
190  options = nullptr;
191  }
192 
193  if (part.find("xbin:")==0) { xlbls = part; xlbls.erase(0, 5); } else
194  if (part.find("ybin:")==0) { ylbls = part; ylbls.erase(0, 5); } else
195  if (part.find("fill:")==0) { fillcolor = part; fillcolor.erase(0,5); } else
196  if (part.find("opt:")==0) { drawopt = part; drawopt.erase(0,4); } else
197  if (part.find("hmin:")==0) { hmin = part; hmin.erase(0,5); } else
198  if (part.find("hmax:")==0) { hmax = part; hmax.erase(0,5); } else
199  if (part.find("kind:")==0) { } else
200  if (part.find("h2poly:")==0) { h2poly = part; h2poly.erase(0,7); } else
201  if (part.find("reuse")==0) { reuse = true; } else
202  if (part.find("clear_protect")==0) { clear_protect = true; } else
203  if (xtitle.empty()) xtitle = part; else ytitle = part;
204  }
205 
206  dabc::LockGuard lock(fTop.GetHMutex());
207 
208  dabc::Hierarchy h = fTop.GetHChild(name);
209  if (!h.null() && reuse && h.GetFieldPtr("bins"))
210  return (base::H1handle) h.GetFieldPtr("bins")->GetDoubleArr();
211 
212  if (!h) {
213  std::string sname = name;
214  auto pos = sname.find_last_of("/");
215  if ((pos != std::string::npos) && fSortOrder)
216  h = fTop.CreateHChild(sname.substr(0,pos).c_str(), false, true).CreateHChild(sname.substr(pos+1).c_str());
217  else
218  h = fTop.CreateHChild(name);
219  }
220  if (!h) return nullptr;
221 
222  h.SetField("_kind", h2poly.empty() ? "ROOT.TH2D" : "ROOT.TH2Poly");
223  h.SetField("_title", title);
224  h.SetField("_dabc_hist", true); // indicate for browser that it is DABC histogram
225  h.SetField("_make_request", "DABC.ReqH"); // provide proper request
226  h.SetField("_after_request", "DABC.ConvertH"); // convert object into ROOT histogram
227  h.SetField("nbins1", nbins1);
228  h.SetField("left1", left1);
229  h.SetField("right1", right1);
230  h.SetField("nbins2", nbins2);
231  h.SetField("left2", left2);
232  h.SetField("right2", right2);
233  if (!xtitle.empty()) h.SetField("xtitle", xtitle);
234  if (!ytitle.empty()) h.SetField("ytitle", ytitle);
235  if (xlbls.length() > 0) h.SetField("xlabels", xlbls);
236  if (ylbls.length() > 0) h.SetField("ylabels", ylbls);
237  if (!fillcolor.empty()) h.SetField("fillcolor", std::stoi(fillcolor));
238  h.SetField("drawopt", drawopt.empty() ? std::string("colz") : drawopt);
239  if (!hmin.empty()) h.SetField("hmin", std::stof(hmin));
240  if (!hmax.empty()) h.SetField("hmax", std::stof(hmax));
241  if (!h2poly.empty()) h.SetField("h2poly", h2poly);
242  if (clear_protect) h.SetField("_no_reset", "true");
243 
244  std::vector<double> bins;
245  bins.resize(6+(nbins1+2)*(nbins2+2), 0.);
246  bins[0] = nbins1;
247  bins[1] = left1;
248  bins[2] = right1;
249  bins[3] = nbins2;
250  bins[4] = left2;
251  bins[5] = right2;
252  h.SetField("bins", bins);
253 
254  fTop.MarkChangedItems();
255 
256  return (base::H2handle) h.GetFieldPtr("bins")->GetDoubleArr();
257 }
258 
260 {
261  if (!handle) return nullptr;
262 
263  dabc::Iterator iter(fTop);
264  while (iter.next()) {
265  dabc::Hierarchy item = iter.ref();
266  if (item.HasField("_dabc_hist"))
267  if (item.GetFieldPtr("bins")->GetDoubleArr() == handle)
268  return item;
269  }
270  return nullptr;
271 }
272 
273 
274 void stream::DabcProcMgr::SetH1Title(base::H1handle h1, const char *title)
275 {
276  auto item = FindHistogram(h1);
277  if (!item.null())
278  item.SetField("_title", title);
279 }
280 
281 void stream::DabcProcMgr::TagH1Time(base::H1handle h1)
282 {
283  auto item = FindHistogram(h1);
284  if (!item.null()) {
285  auto now = dabc::DateTime().GetNow();
286  item.SetField("_humantime", now.AsString(3, true));
287  item.SetField("_time", now.AsUTCSeconds());
288  }
289 }
290 
291 void stream::DabcProcMgr::SetH2Title(base::H2handle h2, const char *title)
292 {
293  auto item = FindHistogram(h2);
294  if (!item.null())
295  item.SetField("_title", title);
296 }
297 
298 void stream::DabcProcMgr::TagH2Time(base::H2handle h2)
299 {
300  auto item = FindHistogram(h2);
301  if (!item.null()) {
302  auto now = dabc::DateTime().GetNow();
303  item.SetField("_humantime", now.AsString(3, true));
304  item.SetField("_time", now.AsUTCSeconds());
305  }
306 }
307 
308 
310 {
311  if (!item.HasField("_dabc_hist") || (item.GetFieldPtr("bins") == nullptr)) return false;
312 
313  if (item.HasField("_no_reset")) return true;
314 
315  int indx = item.GetField("_kind").AsStr()=="ROOT.TH1D" ? 3 : 6;
316 
317  double* arr = item.GetFieldPtr("bins")->GetDoubleArr();
318  int len = item.GetFieldPtr("bins")->GetArraySize();
319  while (indx<len) arr[indx++]=0.;
320  return true;
321 }
322 
324 {
325  ClearAllDabcHistograms(fTop);
326 }
327 
329 {
330  dabc::Iterator iter(folder);
331  bool isany = true;
332  while (iter.next()) {
333  dabc::Hierarchy item = iter.ref();
334  if (ClearHistogram(item)) isany = true;
335  }
336  return isany;
337 }
338 
340 {
341  dabc::Buffer buf = folder.SaveToBuffer();
342 
343  if (buf.GetTotalSize()==0) return false;
344 
345  DOUT0("store hierarchy size %d in temporary h.bin file", buf.GetTotalSize());
346  {
348  system("rm -f h.bin");
349  if (f.OpenWriting("h.bin")) {
350  if (f.WriteBufHeader(buf.GetTotalSize(), buf.GetTypeId()))
351  for (unsigned n=0;n<buf.NumSegments();n++)
352  f.WriteBufPayload(buf.SegmentPtr(n), buf.SegmentSize(n));
353  f.Close();
354  }
355  }
356 
357  dabc::DateTime dt;
358  dt.GetNow();
359 
360  std::string args = dabc::format("dabc_root -h h.bin -o dabc-%s-%s.root", dt.OnlyDateAsString("-", true).c_str(), dt.OnlyTimeAsString("-", true).c_str());
361 
362  DOUT0("Calling: %s", args.c_str());
363 
364  int res = system(args.c_str());
365 
366  if (res!=0) {
367  EOUT("Fail to convert DABC histograms in ROOT file, check h-date-time.bin file");
368  args = dabc::format("mv h.bin h-%s-%s.bin", dt.OnlyDateAsString("-", true).c_str(), dt.OnlyTimeAsString("-", true).c_str());
369  system(args.c_str());
370  } else {
371  system("rm -f h.bin");
372  }
373 
374  return res == 0;
375 }
376 
378 {
379  std::string name = cmd.GetName();
380 
381  if ((name.find("HCMD_")!=0) && (name!="ROOTCMD")) return false;
382 
383  dabc::Hierarchy item = cmd.GetRef("item");
384  if (item.null()) return false;
385  std::string res = "null";
386 
387  if (name == "ROOTCMD") {
388  if (item.IsName("Clear")) {
389  DOUT0("Call CLEAR");
390  ClearAllDabcHistograms(fTop);
391  res = "true";
392  } else if (item.IsName("Save")) {
393  DOUT0("Call SAVE");
394  SaveAllHistograms(fTop);
395  res = "true";
396  } else if (item.IsName("Start")) {
397  DOUT0("Call START");
398  fWorkingFlag = true;
399  res = "true";
400  } else if (item.IsName("Stop")) {
401  DOUT0("Call STOP");
402  fWorkingFlag = false;
403  res = "true";
404  } else {
405  res = "false";
406  }
407 
408  } else if (name == "HCMD_ClearHistos") {
409 
410  res = ClearAllDabcHistograms(item) ? "true" : "false";
411 
412  } else {
413  std::string kind = item.GetField("_kind").AsStr();
414  if ((kind != "ROOT.TH2D") && (kind != "ROOT.TH1D")) return false;
415 
416  double* bins = item.GetFieldPtr("bins")->GetDoubleArr();
417  if (bins==0) return false;
418 
419  name.erase(0,5); // remove HCMD_ prefix
420 
421  if ((name == "GetMean") || (name=="GetRMS") || (name=="GetEntries")) {
422  if (kind != "ROOT.TH1D") return false;
423  int nbins = item.GetField("nbins").AsInt();
424  double left = item.GetField("left").AsDouble();
425  double right = item.GetField("right").AsDouble();
426 
427  double sum0(0), sum1(0), sum2(0);
428 
429  for (int n=0;n<nbins;n++) {
430  double x = left + (right-left)/nbins*(n+0.5);
431  sum0 += bins[n+4];
432  sum1 += x*bins[n+4];
433  sum2 += x*x*bins[n+4];
434  }
435  double mean(0), rms(0);
436  if (sum0>0) {
437  mean = sum1/sum0;
438  rms = sqrt(sum2/sum0 - mean*mean);
439  }
440  if (name == "GetEntries") res = dabc::format("%14.7g",sum0);
441  else if (name == "GetMean") res = dabc::format("%8.6g",mean);
442  else res = dabc::format("%8.6g",rms);
443 
444  } else
445  if (name=="Clear") {
446  res = ClearHistogram(item) ? "true" : "false";
447  } else {
448  return false;
449  }
450  }
451 
452  cmd.SetStrRawData(res);
453 
454  return true;
455 }
456 
457 typedef void StreamCallFunc(void*);
458 
459 bool stream::DabcProcMgr::CallFunc(const char* funcname, void* arg)
460 {
461  if (funcname==0) return false;
462 
463  void* symbol = dabc::Factory::FindSymbol(funcname);
464  if (symbol == 0) return false;
465 
466  StreamCallFunc* func = (StreamCallFunc*) symbol;
467 
468  func(arg);
469 
470  return true;
471 }
472 
473 
474 bool stream::DabcProcMgr::CreateStore(const char* storename)
475 {
476  fStore = dabc::mgr.CreateObject("root::TreeStore","stream_store");
477  if (fStore.null()) {
478  fStoreInfo = "Fail to create root::TreeStore, check libDabcRoot plugin";
479  return false;
480  }
481 
482  dabc::Command cmd("Create");
483  cmd.SetStr("fname", storename);
484  cmd.SetStr("ftitle", "File with stored stream data");
485  cmd.SetStr("tname", "T");
486  cmd.SetStr("ttitle", "Tree with stream data");
487 
488  if (!fStore.Execute(cmd)) {
489  fStoreInfo = dabc::format("Fail to create ROOT file %s", storename);
490  return false;
491  }
492 
493  // set pointer to inform base class that storage exists
494  fTree = (TTree*) cmd.GetPtr("tree_ptr");
495 
496  fStoreInfo = dabc::format("Create ROOT file %s", storename);
497 
498  return true;
499 }
500 
502 {
503  fTree = 0;
504  fStore.Execute("Close");
505  fStore.Release();
506  fStoreInfo = "ROOT store closed";
507  return true;
508 }
509 
510 bool stream::DabcProcMgr::CreateBranch(const char* name, const char* class_name, void** obj)
511 {
512  DOUT3("Create Branch1 %s", name);
513 
514  dabc::Command cmd("CreateBranch");
515  cmd.SetStr("name", name);
516  cmd.SetStr("class_name", class_name);
517  cmd.SetPtr("obj", (void*) obj);
518  return fStore.Execute(cmd);
519 }
520 
521 bool stream::DabcProcMgr::CreateBranch(const char* name, void* member, const char* kind)
522 {
523  DOUT3("Create Branch2 %s", name);
524 
525  dabc::Command cmd("CreateBranch");
526  cmd.SetStr("name", name);
527  cmd.SetPtr("member", member);
528  cmd.SetStr("kind", kind);
529  return fStore.Execute(cmd);
530 }
531 
533 {
534  if (fStore.null()) return false;
535 
536  dabc::Command cmd("Fill");
537  if (!fStore.Execute(cmd)) return false;
538 
539  fStoreInfo = cmd.GetStr("StoreInfo");
540 
541  return true;
542 }
void StreamCallFunc(void *)
Generic file storage for DABC buffers.
Definition: BinaryFile.h:181
bool WriteBufPayload(const void *ptr, uint64_t sz)
Definition: BinaryFile.h:288
bool OpenWriting(const char *fname)
Definition: BinaryFile.h:227
bool WriteBufHeader(uint64_t size, uint64_t typ=0)
Definition: BinaryFile.h:266
Reference on memory from memory pool.
Definition: Buffer.h:135
unsigned NumSegments() const
Returns number of segment in buffer.
Definition: Buffer.h:163
unsigned SegmentSize(unsigned n=0) const
Returns size on the segment, no any boundary checks.
Definition: Buffer.h:174
unsigned GetTypeId() const
Definition: Buffer.h:152
BufferSize_t GetTotalSize() const
Return total size of all buffer segments.
Definition: Buffer.cxx:91
void * SegmentPtr(unsigned n=0) const
Returns pointer on the segment, no any boundary checks.
Definition: Buffer.h:171
Represents command with its arguments.
Definition: Command.h:99
void SetPtr(const std::string &name, void *p)
Set pointer argument for the command.
Definition: Command.cxx:151
bool SetStr(const std::string &name, const char *value)
Definition: Command.h:134
bool SetStrRawData(const std::string &str)
Set raw data with string content.
Definition: Command.cxx:340
std::string GetStr(const std::string &name, const std::string &dflt="") const
Definition: Command.h:136
Reference GetRef(const std::string &name)
Returns reference from the command, can be called only once.
Definition: Command.cxx:175
void * GetPtr(const std::string &name, void *deflt=0) const
Get pointer argument from the command.
Definition: Command.cxx:158
Class for holding GMT time with precision of nanoseconds.
Definition: timing.h:190
std::string OnlyTimeAsString(const char *separ=nullptr, bool localtime=false) const
Fills only time as string.
Definition: timing.cxx:273
DateTime & GetNow()
Definition: timing.cxx:147
std::string OnlyDateAsString(const char *separ=nullptr, bool localtime=false) const
Fills only date as string.
Definition: timing.cxx:257
static void * FindSymbol(const std::string &symbol)
Definition: Factory.cxx:49
Represents objects hierarchy of remote (or local) DABC process.
Definition: Hierarchy.h:285
void MarkChangedItems(uint64_t tm=0)
If any field was modified, item will be marked with new version.
Definition: Hierarchy.h:330
Hierarchy CreateHChild(const std::string &name, bool allowslahes=false, bool sortorder=false)
Create child item in hierarchy with specified name If allowslahes enabled, instead of subfolders item...
Definition: Hierarchy.h:392
dabc::Buffer SaveToBuffer(unsigned kind=stream_Full, uint64_t version=0, unsigned hlimit=0)
Save hierarchy in binary form, relative to specified version.
Definition: Hierarchy.cxx:873
Hierarchy GetHChild(const std::string &name, bool allowslahes=false, bool force=false, bool sortorder=false)
Return child, if necessary creates with full subfolder If force specified, missing childs and folders...
Definition: Hierarchy.cxx:944
void EnableHistory(unsigned length=100, bool withchilds=false)
Activate history production for selected element and its childs.
Definition: Hierarchy.cxx:837
Iterator over objects hierarchy
Definition: Iterator.h:36
Object * next(bool goinside=true)
Definition: Iterator.cxx:44
Reference ref() const
Definition: Iterator.h:50
Lock guard for posix mutex.
Definition: threads.h:127
Reference CreateObject(const std::string &classname, const std::string &objname)
Definition: Manager.cxx:2251
int64_t GetArraySize() const
Definition: Record.h:317
double * GetDoubleArr() const
Definition: Record.h:329
std::string AsStr(const std::string &dflt="") const
Definition: Record.cxx:749
int64_t AsInt(int64_t dflt=0) const
Definition: Record.cxx:501
double AsDouble(double dflt=0.) const
Definition: Record.cxx:549
RecordField GetField(const std::string &name) const
Definition: Record.h:510
RecordField * GetFieldPtr(const std::string &name) const
Definition: Record.h:513
bool HasField(const std::string &name) const
Definition: Record.h:498
bool SetField(const std::string &name, const RecordField &v)
Definition: Record.h:516
const char * GetName() const
Return name of referenced object, if object not assigned, returns "---".
Definition: Reference.cxx:167
bool IsName(const char *name) const
Returns true if object name is the same as specified one.
Definition: Reference.cxx:177
bool null() const
Returns true if reference contains nullptr.
Definition: Reference.h:151
void AddErrLog(const char *msg) override
Definition: DabcProcMgr.cxx:95
void SetH2Title(base::H2handle h2, const char *title) override
void SetTop(dabc::Hierarchy &top, bool withcmds=false)
Definition: DabcProcMgr.cxx:43
void AddRunLog(const char *msg) override
Definition: DabcProcMgr.cxx:88
bool ExecuteHCommand(dabc::Command cmd)
virtual ~DabcProcMgr()
Definition: DabcProcMgr.cxx:39
base::H2handle MakeH2(const char *name, const char *title, int nbins1, double left1, double right1, int nbins2, double left2, double right2, const char *options=nullptr) override
void SetH1Title(base::H1handle h1, const char *title) override
base::H1handle MakeH1(const char *name, const char *title, int nbins, double left, double right, const char *xtitle=nullptr) override
void ClearAllHistograms() override
bool CloseStore() override
bool CallFunc(const char *funcname, void *arg) override
void PrintLog(const char *msg) override
bool SaveAllHistograms()
Definition: DabcProcMgr.h:88
bool CreateBranch(const char *name, const char *class_name, void **obj) override
bool StoreEvent() override
bool CreateStore(const char *storename) override
bool ClearAllDabcHistograms(dabc::Hierarchy &folder)
dabc::Hierarchy FindHistogram(void *handle)
void TagH2Time(base::H2handle h2) override
bool ClearHistogram(dabc::Hierarchy &item)
void TagH1Time(base::H1handle h1) override
#define DOUT0(args ...)
Definition: logging.h:156
#define DOUT3(args ...)
Definition: logging.h:176
#define EOUT(args ...)
Definition: logging.h:150
ManagerRef mgr
Definition: Manager.cxx:42
std::string format(const char *fmt,...)
Definition: string.cxx:49
const char * prop_kind
Definition: Hierarchy.cxx:29