4 #ifndef ROOT_TRootSniffer 5 #define ROOT_TRootSniffer 63 return (fMask &
kScan) && (fStore != 0);
139 const char *foldername = 0,
TCollection *keys_lst = 0);
145 void CreateMemFile();
158 const char *
name,
const char *value,
TNamed **only_get = 0);
160 Int_t WithCurrentUserName(
const char* option);
184 void Restrict(
const char* path,
const char* options);
186 Bool_t HasRestriction(
const char* item_name);
188 Int_t CheckRestriction(
const char* item_name);
197 void SetAutoLoad(
const char* scripts =
"");
199 const char* GetAutoLoad()
const;
207 Bool_t RegisterCommand(
const char *cmdname,
const char *method,
const char *icon);
209 Bool_t CreateItem(
const char *fullname,
const char *title);
211 Bool_t SetItemField(
const char *fullname,
const char *
name,
const char *value);
213 const char *GetItemField(
const char *fullname,
const char *name);
218 void ScanHierarchy(
const char *topname,
const char *path,
221 TObject *FindTObjectInHierarchy(
const char *path);
223 virtual void *FindInHierarchy(
const char *path,
TClass **cl = 0,
TDataMember **member = 0,
Int_t *chld = 0);
225 Bool_t CanDrawItem(
const char *path);
227 Bool_t CanExploreItem(
const char *path);
229 Bool_t IsStreamerInfoItem(
const char *itemname);
233 ULong_t GetItemHash(
const char *itemname);
235 Bool_t ProduceJson(
const char *path,
const char *options,
TString &res);
237 Bool_t ProduceXml(
const char *path,
const char *options,
TString &res);
239 Bool_t ProduceBinary(
const char *path,
const char *options,
void *&ptr,
Long_t &length);
241 Bool_t ProduceImage(
Int_t kind,
const char *path,
const char *options,
void *&ptr,
Long_t &length);
243 Bool_t ProduceExe(
const char *path,
const char *options,
Int_t reskind,
TString *ret_str,
void **ret_ptr = 0,
Long_t *ret_length = 0);
245 Bool_t ExecuteCmd(
const char *path,
const char *options,
TString &res);
251 Bool_t Produce(
const char *path,
const char *
file,
const char *options,
void *&ptr,
Long_t &length,
TString &str);
TString fItemName
current level of hierarchy
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
indicate if sniffer allowed to change ROOT structures - for instance, read objects from files ...
The concrete implementation of TBuffer for writing/reading to/from a ROOT file or socket...
UInt_t fMask
pointer on parent record
Bool_t IsReadOnly() const
void BeforeNextChild()
indicates that new child for current element will be started
Bool_t IsReadyForResult() const
Checks if result will be accepted.
TMemFile * fMemFile
default path for registered objects
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. ...
if set, only fields for specified item will be set (but all fields)
Bool_t SetFoundResult(void *obj, TClass *cl, TDataMember *member=0)
Set found element with class and datamember (optional)
search for specified item (only objects and collections)
Int_t fRestriction
list of created items names, need to avoid duplication
Abstract interface for storage of hierarchy scan in TRootSniffer.
TString fCurrentAllowedMethods
current restriction for last-found object
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
when enabled (default), scan gROOT for histograms, canvases, open files
The TNamed class is the base class for all named ROOT classes.
Bool_t fReadOnly
last produced streamer info
Bool_t ScanOnlyFields() const
const char * fSearchPath
defines operation kind
void SetRootClass(TClass *cl)
Mark item with ROOT class and correspondent streamer info.
Int_t fNumChilds
number of fields
Int_t fLevel
current path searched
Collection abstract base class.
Int_t fNumFields
indicate if node was started
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
list of restrictions for different locations
TRootSnifferScanRec()
number of childs
TList fItemsNames
name of current item
mask for actions, only actions copied to child rec
TRootSnifferStore * fStore
restriction 0 - default, 1 - read-only, 2 - full access
TList * fSinfo
file used to manage streamer infos
TRootSnifferScanRec * fParent
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)
friend class TRootSniffer
Bool_t CanSetFields() const
return true when fields could be set to the hierarchy item
Bool_t fHasMore
object to store results
Bool_t fNodeStarted
indicates that potentially there are more items can be found
expand of specified item - allowed to scan object members
void MakeItemName(const char *objname, TString &itemname)
Construct item name, using object name as basis.
void SetScanGlobalDir(Bool_t on=kTRUE)
void BuildFullName(TString &buf, TRootSnifferScanRec *prnt=0)
Produces full name for the current item.
Int_t fCurrentRestrict
current http arguments (if any)
Bool_t IsScanGlobalDir() const
check if there childs, very similar to search
void CreateNode(const char *_node_name)
Starts new node, must be closed at the end.
TList fRestrictions
list of allowed methods, extracted when analyzed object restrictions