12 #ifndef ROOT_TRootSniffer 13 #define ROOT_TRootSniffer 143 void CreateMemFile();
157 Int_t WithCurrentUserName(
const char *option);
172 void Restrict(
const char *path,
const char *options);
174 Bool_t HasRestriction(
const char *item_name);
176 Int_t CheckRestriction(
const char *item_name);
181 void SetAutoLoad(
const char *scripts =
"");
183 const char *GetAutoLoad()
const;
192 Bool_t RegisterCommand(
const char *cmdname,
const char *method,
const char *icon);
194 Bool_t CreateItem(
const char *fullname,
const char *title);
196 Bool_t SetItemField(
const char *fullname,
const char *
name,
const char *value);
198 const char *GetItemField(
const char *fullname,
const char *name);
205 TObject *FindTObjectInHierarchy(
const char *path);
207 virtual void *FindInHierarchy(
const char *path,
TClass **cl = 0,
TDataMember **member = 0,
Int_t *chld = 0);
209 Bool_t CanDrawItem(
const char *path);
211 Bool_t CanExploreItem(
const char *path);
213 Bool_t IsStreamerInfoItem(
const char *itemname);
217 ULong_t GetItemHash(
const char *itemname);
219 Bool_t ProduceJson(
const char *path,
const char *options,
TString &res);
221 Bool_t ProduceXml(
const char *path,
const char *options,
TString &res);
223 Bool_t ProduceBinary(
const char *path,
const char *options,
void *&ptr,
Long_t &length);
225 Bool_t ProduceImage(
Int_t kind,
const char *path,
const char *options,
void *&ptr,
Long_t &length);
227 Bool_t ProduceExe(
const char *path,
const char *options,
Int_t reskind,
TString *ret_str,
void **ret_ptr = 0,
230 Bool_t ExecuteCmd(
const char *path,
const char *options,
TString &res);
234 Bool_t ProduceMulti(
const char *path,
const char *options,
void *&ptr,
Long_t &length,
TString &str,
237 Bool_t Produce(
const char *path,
const char *
file,
const char *options,
void *&ptr,
Long_t &length,
TString &str);
TString fItemName
! name of current item
Bool_t SetResult(void *obj, TClass *cl, TDataMember *member=0)
Obsolete, use SetFoundResult instead.
A TFolder object is a collection of objects and folders.
Bool_t fScanGlobalDir
! when enabled (default), scan gROOT for histograms, canvases, open files
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.
TMemFile * fMemFile
! file used to manage streamer infos
All ROOT classes may have RTTI (run time type identification) support added.
Bool_t GoInside(TRootSnifferScanRec &super, TObject *obj, const char *obj_name=0, TRootSniffer *sniffer=0)
Method verifies if new level of hierarchy should be started with provided object. ...
Bool_t SetFoundResult(void *obj, TClass *cl, TDataMember *member=0)
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.
mask for actions, only actions copied to child rec
TString fCurrentAllowedMethods
! list of allowed methods, extracted when analyzed object restrictions
void CloseNode()
close started node
A TMemFile is like a normal TFile except that it reads and writes only from memory.
Bool_t CanExpandItem()
Returns true when item can be expanded.
Bool_t IsReadOnly(Bool_t dflt=kTRUE)
Returns read-only flag for current item.
#define ClassDef(name, id)
THttpCallArg * fCurrentArg
! current http arguments (if any)
The TNamed class is the base class for all named ROOT classes.
Bool_t fReadOnly
! indicate if sniffer allowed to change ROOT structures - for instance, read objects from files ...
Bool_t ScanOnlyFields() const
return true when only fields are scanned by the sniffer
const char * fSearchPath
! current path searched
void SetRootClass(TClass *cl)
Mark item with ROOT class and correspondent streamer info.
Int_t fNumChilds
! number of childs
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
check if there childs, very similar to search
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
TRootSnifferStore * fStore
! object to store results
TList * fSinfo
! last produced streamer info
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.
if set, only fields for specified item will be set (but all fields)
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
Bool_t fNodeStarted
! indicate if node was started
void MakeItemName(const char *objname, TString &itemname)
Construct item name, using object name as basis.
search for specified item (only objects and collections)
void SetScanGlobalDir(Bool_t on=kTRUE)
When enabled (default), sniffer scans gROOT for files, canvases, histograms.
void BuildFullName(TString &buf, TRootSnifferScanRec *prnt=0)
Produces full name for the current item.
Int_t fCurrentRestrict
! current restriction for last-found object
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
expand of specified item - allowed to scan object members