62 long long millisec =
gSystem->Now();
95 std::string expr2 = expr +
">>htemp_tree_draw";
98 std::unique_ptr<TTreeDrawMonitoring> monitoring;
101 monitoring = std::make_unique<TTreeDrawMonitoring>(50, ttree,
fHandle2);
105 ttree->
Draw(expr2.c_str(),
"",
"goff");
112 auto htemp =
dynamic_cast<TH1*
>(
gDirectory->FindObject(
"htemp_tree_draw"));
118 htemp->SetName(hname.c_str());
120 auto FixTitle = [](
TNamed *obj) {
121 TString title = obj->GetTitle();
122 title.ReplaceAll(
"\\/",
"/");
123 title.ReplaceAll(
"#",
"\\#");
124 obj->SetTitle(title.Data());
128 FixTitle(htemp->GetXaxis());
129 FixTitle(htemp->GetYaxis());
130 FixTitle(htemp->GetZaxis());
132 htemp->BufferEmpty();
151 if (
name.First(
'@') != 0)
164 while ((
pos > 0) && (expr[
pos] !=
'.'))
pos--;
184 if (
const_cast<TBranch *
>(tbranch)->GetListOfBranches()->GetEntriesFast() > 0)
202 if (tbranch && (tbranch->GetNleaves() == 1))
233 auto tleaf = obj->get_object<
TLeaf>();
240 return DrawTree(tleaf->GetBranch()->GetTree(), expr.Data(),
name.Data());
249 if (
const_cast<TBranchElement *
>(tbranch)->GetListOfBranches()->GetEntriesFast() > 0)
266 if (mothername(
len-1) !=
'.') {
271 TString doublename = mothername;
273 Int_t isthere = (expr.
Index(doublename) == 0);
278 doublename.
Append(mothername);
279 isthere = (expr.
Index(doublename) == 0);
313 return DrawTree(tbranch->GetTree(), expr.Data(),
name.Data());
323 bool can_draw = (!cl || (cl->GetCollectionProxy() && cl->GetCollectionProxy()->GetType() > 0));
355 return DrawTree(browsable->GetBranch()->GetTree(), expr.Data(),
name.Data());
bool Bool_t
Boolean (0=false, 1=true) (bool).
int Int_t
Signed integer 4 bytes (int).
double Double_t
Double 8 bytes.
constexpr Ssiz_t kNPOS
The equivalent of std::string::npos for the ROOT class TString.
static unsigned int total
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t UChar_t len
externTVirtualMonitoringWriter * gMonitoringWriter
Provider of different browsing methods for supported classes.
static bool ReportProgress(void *handle, float progress)
Report running progress Returns true if handling function was invoked Method can be used to detect if...
A Branch for the case of an object.
A TTree is a list of TBranches.
virtual TString GetFullName() const
Return the 'full' name of the branch.
virtual TBranch * FindBranch(const char *name)
Find the immediate sub-branch with passed name.
TBranch * GetMother() const
Get our top-level parent branch in the tree.
TH1 is the base class of all histogram classes in ROOT.
virtual void SetDirectory(TDirectory *dir)
Provider for drawing of branches / leafs in the TTree.
void * fHandle2
! used only for reporting progress
bool GetDrawExpr(const TBranch *tbranch, TString &expr, TString &name)
bool GetDrawExpr(const TVirtualBranchBrowsable *browsable, TString &expr, TString &name)
TH1 * DrawBranch(const TBranch *tbranch)
TH1 * DrawBranch(std::unique_ptr< RHolder > &obj)
void AdjustExpr(TString &expr, TString &name)
TH1 * DrawBranchBrowsable(std::unique_ptr< RHolder > &obj)
TH1 * DrawBranchElement(std::unique_ptr< RHolder > &obj)
TH1 * DrawTree(TTree *ttree, const std::string &expr, const std::string &hname)
TH1 * DrawLeaf(std::unique_ptr< RHolder > &obj)
bool GetDrawExpr(const TBranchElement *tbranch, TString &expr, TString &name)
bool GetDrawExpr(const TLeaf *tleaf, TString &expr, TString &name)
A TLeaf describes individual elements of a TBranch See TBranch structure in TTree.
TBranch * GetBranch() const
virtual TString GetFullName() const
Return the full name (including the parent's branch names) of the leaf.
The TNamed class is the base class for all named ROOT classes.
const char * GetName() const override
Returns name of object.
TString & Insert(Ssiz_t pos, const char *s)
Ssiz_t First(char c) const
Find first occurrence of a character c.
const char * Data() const
TString & ReplaceAll(const TString &s1, const TString &s2)
TString & Prepend(const char *cs)
TString & Remove(Ssiz_t pos)
TString & Append(const char *cs)
Ssiz_t Index(const char *pat, Ssiz_t i=0, ECaseCompare cmp=kExact) const
TTreeDrawMonitoring & operator=(const TTreeDrawMonitoring &)=delete
Bool_t SendFileReadProgress(TFile *) override
TTreeDrawMonitoring(const TTreeDrawMonitoring &)=delete
Bool_t SendFileWriteProgress(TFile *) override
Bool_t SendInfoStatus(const char *) override
TTreeDrawMonitoring(Int_t period, TTree *tree, void *handle2)
Bool_t SendProcessingStatus(const char *, Bool_t=kFALSE) override
Bool_t SendParameters(TList *, const char *=nullptr) override
Bool_t SendFileOpenProgress(TFile *, TList *, const char *, Bool_t=kFALSE) override
Bool_t SendProcessingProgress(Double_t nevent, Double_t, Bool_t=kFALSE) override
Bool_t SendFileCloseEvent(TFile *) override
void SetLogLevel(const char *="WARNING") override
long long fLastProgressSendTm
Bool_t SendInfoTime() override
Bool_t SendInfoDescription(const char *) override
void Verbose(Bool_t) override
Bool_t SendInfoUser(const char *=nullptr) override
A TTree represents a columnar dataset.
void Draw(Option_t *opt) override
Default Draw method for all objects.
TVirtualBranchBrowsable is a base class (not really abstract, but useless by itself) for helper objec...
const TBranch * GetBranch() const
return the parent branch (might be many levels up)
void GetScope(TString &scope) const
Returns the full name for TTree::Draw to draw *this.
TClass * GetClassType() const
return the type of this browsable object
TVirtualMonitoringWriter(const TVirtualMonitoringWriter &)=delete