80 char *s =
new char[nch+1];
81 strlcpy(s,
name,nch+1);
82 char *
slash = (
char*)strrchr(s,
'/');
85 char *dot = (
char*)strchr(
slash,
'.');
102 while (
auto obj = next())
128 while (
auto obj = next())
178 if (opt ==
"Print") {
195 return (
TMD5 *)
nullptr;
200 const Int_t bufSize = 8192;
210 const char *
p =
line.Data();
212 strlcpy((
char *)&buf[pos],
p,
len+1);
215 }
else if (left ==
len) {
216 strlcpy((
char *)&buf[pos],
p,
len+1);
217 md5->
Update(buf, bufSize);
221 strlcpy((
char *)&buf[pos],
p, left+1);
222 md5->
Update(buf, bufSize);
227 strlcpy((
char *)&buf[pos],
p,
len+1);
246 std::stringstream ss;
250 ss << obj->GetName() << std::endl;
266 if (error) *error = 1;
280 exec +=
"(" +
p +
")";
289 Error(
"Exec",
"Macro does not contains function named %s.",
GetName());
290 if (error) *error = 1;
299 if (!
fLines)
return nullptr;
302 if (strstr(obj->GetName(),
text))
322 while (
auto obj = next())
323 printf(
"%s\n", obj->GetName());
338 char *
line =
new char[10000];
341 in.getline(
line,10000);
342 if (!in.good())
break;
363 while (
auto obj = next())
364 out << obj->GetName() << std::endl;
374 while (
auto obj = next())
375 fprintf(fp,
"%s\n", obj->GetName());
394 while (
auto obj = next()) {
398 out<<
" macro->Draw("<<quote<<
option<<quote<<
");"<<std::endl;
winID h TVirtualViewer3D TVirtualGLPainter p
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 filename
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
Option_t Option_t TPoint TPoint const char text
Using a TBrowser one can browse all ROOT objects.
virtual Int_t GetSize() const
Return the capacity of the collection, i.e.
virtual Int_t GetValue(const char *name, Int_t dflt) const
Returns the integer value for a resource.
void Add(TObject *obj) override
void Delete(Option_t *option="") override
Remove all objects from the list AND delete all heap based objects.
This code implements the MD5 message-digest algorithm.
void Update(const UChar_t *buf, UInt_t len)
Update TMD5 object to reflect the concatenation of another buffer full of bytes.
void Final()
MD5 finalization, ends an MD5 message-digest operation, writing the the message digest and zeroizing ...
Class supporting a collection of lines with C++ code.
virtual TMD5 * Checksum()
Returns checksum of the current content.
void Print(Option_t *option="") const override
Print contents of this macro.
virtual Bool_t Load() const
Load the macro into the interpreter.
virtual ~TMacro()
Delete this macro.
virtual void SetParams(const char *params=nullptr)
Set default parameters to execute this macro.
void SavePrimitive(std::ostream &out, Option_t *option="") override
Save macro source on stream out.
virtual TObjString * AddLine(const char *text)
Add line with text in the list of lines of this macro.
virtual Int_t ReadFile(const char *filename)
Read lines in filename in this macro.
void SaveSource(FILE *fp)
Save macro source in file pointer fp.
virtual Longptr_t Exec(const char *params=nullptr, Int_t *error=nullptr)
Execute this macro with params, if params is 0, default parameters (set via SetParams) are used.
TMacro()
Create an empty macro, use AddLine() or ReadFile() to fill this macro.
TMacro & operator=(const TMacro &)
Copy constructor.
TList * GetListOfLines() const
void Paint(Option_t *option="") override
Execute this macro (called by TPad::Paint).
void Browse(TBrowser *b) override
When clicking in the browser, the following action is performed on this macro, depending the content ...
virtual TObjString * GetLineWith(const char *text) const
Search the first line containing text.
The TNamed class is the base class for all named ROOT classes.
const char * GetName() const override
Returns name of object.
const char * GetTitle() const override
Returns title of object.
TNamed & operator=(const TNamed &rhs)
TNamed assignment operator.
Collectable string class.
virtual const char * ClassName() const
Returns name of class to which the object belongs.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
TString & ReplaceSpecialCppChars()
Find special characters which are typically used in printf() calls and replace them by appropriate es...
const char * Data() const
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const