24 dabc::LocalWorker(name),
37 TFile* f = fTree->GetCurrentFile();
59 if (cmd.
IsName(
"CreateBranch")) {
62 if (cmd.
GetPtr(
"member") != 0)
63 fTree->Branch(cmd.
GetStr(
"name").c_str(), cmd.
GetPtr(
"member"), cmd.
GetStr(
"kind").c_str());
65 fTree->Branch(cmd.
GetStr(
"name").c_str(), cmd.
GetStr(
"class_name").c_str(), (
void**) cmd.
GetPtr(
"obj"));
68 if (cmd.
IsName(
"Create")) {
69 if (fTree) CloseTree();
75 TFile *f = TFile::Open(url.
GetFullName().c_str(),
"RECREATE", cmd.
GetStr(
"ftitle",
"ROOT file store").c_str());
77 if (maxsize>0) TTree::SetMaxTreeSize(maxsize*1024*1024);
78 fTree =
new TTree(cmd.
GetStr(
"tname",
"T").c_str(), cmd.
GetStr(
"ttitle",
"ROOT Tree").c_str());
79 cmd.
SetPtr(
"tree_ptr", fTree);
Represents command with its arguments.
void SetPtr(const std::string &name, void *p)
Set pointer argument for the command.
bool SetStr(const std::string &name, const char *value)
std::string GetStr(const std::string &name, const std::string &dflt="") const
int GetInt(const std::string &name, int dflt=0) const
void * GetPtr(const std::string &name, void *deflt=0) const
Get pointer argument from the command.
bool IsName(const char *name) const
Returns true if object name is the same as specified one.
Uniform Resource Locator interpreter.
std::string GetFullName() const
int GetOptionInt(const std::string &optname, int dflt=0) const
TreeStore(const std::string &name)
virtual int ExecuteCommand(dabc::Command)
Main method where commands are executed.
std::string format(const char *fmt,...)
std::string size_to_str(unsigned long sz, int prec=1, int select=0)
Convert size to string of form like 4.2 GB or 3.7 MB.