12 #ifndef ROOT_TRootSniffer 13 #define ROOT_TRootSniffer 154 Int_t WithCurrentUserName(
const char *option);
160 virtual Bool_t ProduceJson(
const std::string &path,
const std::string &options, std::string &res);
162 virtual Bool_t ProduceXml(
const std::string &path,
const std::string &options, std::string &res);
164 virtual Bool_t ProduceBinary(
const std::string &path,
const std::string &options, std::string &res);
166 virtual Bool_t ProduceImage(
Int_t kind,
const std::string &path,
const std::string &options, std::string &res);
168 virtual Bool_t ProduceExe(
const std::string &path,
const std::string &options,
Int_t reskind, std::string &res);
170 virtual Bool_t ExecuteCmd(
const std::string &path,
const std::string &options, std::string &res);
173 ProduceItem(
const std::string &path,
const std::string &options, std::string &res,
Bool_t asjson =
kTRUE);
176 ProduceMulti(
const std::string &path,
const std::string &options, std::string &res,
Bool_t asjson =
kTRUE);
189 void Restrict(
const char *path,
const char *options);
191 Bool_t HasRestriction(
const char *item_name);
193 Int_t CheckRestriction(
const char *item_name);
198 void SetAutoLoad(
const char *scripts =
"");
200 const char *GetAutoLoad()
const;
209 Bool_t RegisterCommand(
const char *cmdname,
const char *method,
const char *icon);
211 Bool_t CreateItem(
const char *fullname,
const char *title);
213 Bool_t SetItemField(
const char *fullname,
const char *name,
const char *value);
215 const char *GetItemField(
const char *fullname,
const char *name);
222 TObject *FindTObjectInHierarchy(
const char *path);
225 FindInHierarchy(
const char *path,
TClass **cl =
nullptr,
TDataMember **member =
nullptr,
Int_t *chld =
nullptr);
227 Bool_t CanDrawItem(
const char *path);
229 Bool_t CanExploreItem(
const char *path);
235 virtual ULong_t GetItemHash(
const char *itemname);
239 Bool_t Produce(
const std::string &path,
const std::string &file,
const std::string &options, std::string &res);
TString fItemName
! name of current item
virtual Bool_t IsStreamerInfoItem(const char *)
A TFolder object is a collection of objects and folders.
Bool_t GoInside(TRootSnifferScanRec &super, TObject *obj, const char *obj_name=nullptr, TRootSniffer *sniffer=nullptr)
Method verifies if new level of hierarchy should be started with provided object. ...
The concrete implementation of TBuffer for writing/reading to/from a ROOT file or socket...
UInt_t fMask
! defines operation kind
Bool_t IsReadOnly() const
Returns readonly mode.
void BeforeNextChild()
indicates that new child for current element will be started
Bool_t IsReadyForResult() const
Checks if result will be accepted.
All ROOT classes may have RTTI (run time type identification) support added.
virtual Bool_t CanDrawClass(TClass *)
Bool_t SetFoundResult(void *obj, TClass *cl, TDataMember *member=nullptr)
Set found element with class and datamember (optional)
Int_t fRestriction
! restriction 0 - default, 1 - read-only, 2 - full access
Abstract interface for storage of hierarchy scan in TRootSniffer.
TString fCurrentAllowedMethods
! list of allowed methods, extracted when analyzed object restrictions
Bool_t SetResult(void *obj, TClass *cl, TDataMember *member=nullptr)
Obsolete, use SetFoundResult instead.
void CloseNode()
close started node
Bool_t CanExpandItem()
Returns true when item can be expanded.
Bool_t IsReadOnly(Bool_t dflt=kTRUE)
Returns read-only flag for current item.
mask for actions, only actions copied to child rec
#define ClassDef(name, id)
The TNamed class is the base class for all named ROOT classes.
Bool_t ScanOnlyFields() const
return true when only fields are scanned by the sniffer
#define _R__DEPRECATED_618(REASON)
const char * fSearchPath
! current path searched
expand of specified item - allowed to scan object members
virtual ULong_t GetStreamerInfoHash()
Book space in a file, create I/O buffers, to fill them, (un)compress them.
void SetRootClass(TClass *cl)
Mark item with ROOT class and correspondent streamer info.
Int_t fNumChilds
! number of childs
search for specified item (only objects and collections)
Int_t fLevel
! current level of hierarchy
Collection abstract base class.
TString fObjectsPath
! default path for registered objects
Int_t fNumFields
! number of fields
The ROOT global object gROOT contains a list of all defined classes.
RooCmdArg Restrict(const char *catName, const char *stateNameList)
virtual ~TRootSnifferScanRec()
destructor
TString fAutoLoad
! scripts names, which are add as _autoload parameter to h.json request
TRootSnifferScanRec()
constructor
TList fItemsNames
! list of created items names, need to avoid duplication
check if there childs, very similar to search
void BuildFullName(TString &buf, TRootSnifferScanRec *prnt=nullptr)
Produces full name for the current item.
TRootSnifferStore * fStore
! object to store results
TRootSnifferScanRec * fParent
! pointer on parent record
Bool_t Done() const
Method indicates that scanning can be interrupted while result is set.
Mother of all ROOT objects.
Int_t Depth() const
Returns depth of hierarchy.
void SetField(const char *name, const char *value, Bool_t with_quotes=kTRUE)
Set item field only when creating is specified.
void SetReadOnly(Bool_t on=kTRUE)
When readonly on (default), sniffer is not allowed to change ROOT structures For instance, it is not allowed to read new objects from files.
friend class TRootSniffer
Bool_t CanSetFields() const
return true when fields could be set to the hierarchy item
Bool_t fHasMore
! indicates that potentially there are more items can be found
virtual Bool_t HasStreamerInfo() const
Bool_t fNodeStarted
! indicate if node was started
if set, only fields for specified item will be set (but all fields)
void MakeItemName(const char *objname, TString &itemname)
Construct item name, using object name as basis.
void SetScanGlobalDir(Bool_t on=kTRUE)
When enabled (default), sniffer scans gROOT for files, canvases, histograms.
Bool_t IsScanGlobalDir() const
Returns true when sniffer allowed to scan global directories.
void CreateNode(const char *_node_name)
Starts new node, must be closed at the end.
TList fRestrictions
! list of restrictions for different locations