ROOT » NET » HTTP » TRootSniffer

class TRootSniffer: public TNamed


TRootSnifferScanRec

Structure used to scan hierarchies of ROOT objects
Represents single level of hierarchy


Function Members (Methods)

public:
virtual~TRootSniffer()
voidTObject::AbstractMethod(const char* method) const
virtual voidTObject::AppendPad(Option_t* option = "")
virtual voidTObject::Browse(TBrowser* b)
Bool_tCanDrawItem(const char* path)
Bool_tCanExploreItem(const char* path)
static TClass*Class()
virtual const char*TObject::ClassName() const
virtual voidTNamed::Clear(Option_t* option = "")
virtual TObject*TNamed::Clone(const char* newname = "") const
virtual Int_tTNamed::Compare(const TObject* obj) const
virtual voidTNamed::Copy(TObject& named) const
virtual voidTObject::Delete(Option_t* option = "")MENU
virtual Int_tTObject::DistancetoPrimitive(Int_t px, Int_t py)
virtual voidTObject::Draw(Option_t* option = "")
virtual voidTObject::DrawClass() constMENU
virtual TObject*TObject::DrawClone(Option_t* option = "") constMENU
virtual voidTObject::Dump() constMENU
virtual voidTObject::Error(const char* method, const char* msgfmt) const
virtual voidTObject::Execute(const char* method, const char* params, Int_t* error = 0)
virtual voidTObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0)
virtual voidTObject::ExecuteEvent(Int_t event, Int_t px, Int_t py)
virtual voidTObject::Fatal(const char* method, const char* msgfmt) const
virtual voidTNamed::FillBuffer(char*& buffer)
virtual void*FindInHierarchy(const char* path, TClass** cl = 0, TDataMember** member = 0, Int_t* chld = 0)
virtual TObject*TObject::FindObject(const char* name) const
virtual TObject*TObject::FindObject(const TObject* obj) const
TObject*FindTObjectInHierarchy(const char* path)
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
virtual const char*TObject::GetIconName() const
ULong_tGetItemHash(const char* itemname)
virtual const char*TNamed::GetName() const
virtual char*TObject::GetObjectInfo(Int_t px, Int_t py) const
static Bool_tTObject::GetObjectStat()
virtual Option_t*TObject::GetOption() const
ULong_tGetStreamerInfoHash()
virtual const char*TNamed::GetTitle() const
virtual UInt_tTObject::GetUniqueID() const
virtual Bool_tTObject::HandleTimer(TTimer* timer)
virtual ULong_tTNamed::Hash() const
virtual voidTObject::Info(const char* method, const char* msgfmt) const
virtual Bool_tTObject::InheritsFrom(const char* classname) const
virtual Bool_tTObject::InheritsFrom(const TClass* cl) const
virtual voidTObject::Inspect() constMENU
voidTObject::InvertBit(UInt_t f)
virtual TClass*IsA() const
static Bool_tIsBrowsableClass(TClass* cl)
static Bool_tIsDrawableClass(TClass* cl)
virtual Bool_tTObject::IsEqual(const TObject* obj) const
virtual Bool_tTObject::IsFolder() const
Bool_tTObject::IsOnHeap() const
virtual Bool_tTNamed::IsSortable() const
Bool_tIsStreamerInfoItem(const char* itemname)
Bool_tTObject::IsZombie() const
virtual voidTNamed::ls(Option_t* option = "") const
voidTObject::MayNotUse(const char* method) const
virtual Bool_tTObject::Notify()
voidTObject::Obsolete(const char* method, const char* asOfVers, const char* removedFromVers) const
voidTObject::operator delete(void* ptr)
voidTObject::operator delete(void* ptr, void* vp)
voidTObject::operator delete[](void* ptr)
voidTObject::operator delete[](void* ptr, void* vp)
void*TObject::operator new(size_t sz)
void*TObject::operator new(size_t sz, void* vp)
void*TObject::operator new[](size_t sz)
void*TObject::operator new[](size_t sz, void* vp)
TRootSniffer&operator=(const TRootSniffer&)
virtual voidTObject::Paint(Option_t* option = "")
virtual voidTObject::Pop()
virtual voidTNamed::Print(Option_t* option = "") const
Bool_tProduce(const char* path, const char* file, const char* options, void*& ptr, Long_t& length)
Bool_tProduceBinary(const char* path, const char* options, void*& ptr, Long_t& length)
Bool_tProduceImage(Int_t kind, const char* path, const char* options, void*& ptr, Long_t& length)
Bool_tProduceJson(const char* path, const char* options, TString& res)
Bool_tProduceXml(const char* path, const char* options, TString& res)
virtual Int_tTObject::Read(const char* name)
virtual voidTObject::RecursiveRemove(TObject* obj)
Bool_tRegisterObject(const char* subfolder, TObject* obj)
voidTObject::ResetBit(UInt_t f)
virtual voidTObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU
virtual voidTObject::SavePrimitive(ostream& out, Option_t* option = "")
voidScanHierarchy(const char* topname, const char* path, TRootSnifferStore* store)
voidTObject::SetBit(UInt_t f)
voidTObject::SetBit(UInt_t f, Bool_t set)
voidSetCompression(Int_t lvl)
virtual voidTObject::SetDrawOption(Option_t* option = "")MENU
static voidTObject::SetDtorOnly(void* obj)
virtual voidTNamed::SetName(const char* name)MENU
virtual voidTNamed::SetNameTitle(const char* name, const char* title)
static voidTObject::SetObjectStat(Bool_t stat)
virtual voidTNamed::SetTitle(const char* title = "")MENU
virtual voidTObject::SetUniqueID(UInt_t uid)
virtual voidShowMembers(TMemberInspector& insp) const
virtual Int_tTNamed::Sizeof() const
virtual voidStreamer(TBuffer&)
voidStreamerNVirtual(TBuffer& ClassDef_StreamerNVirtual_b)
virtual voidTObject::SysError(const char* method, const char* msgfmt) const
Bool_tTObject::TestBit(UInt_t f) const
Int_tTObject::TestBits(UInt_t f) const
TRootSniffer(const TRootSniffer&)
TRootSniffer(const char* name, const char* objpath = "online")
Bool_tUnregisterObject(TObject* obj)
virtual voidTObject::UseCurrentStyle()
virtual voidTObject::Warning(const char* method, const char* msgfmt) const
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0)
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) const
protected:
Bool_tCreateBindData(TBufferFile* sbuf, void*& ptr, Long_t& length)
voidCreateMemFile()
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
voidTObject::MakeZombie()
voidScanCollection(TRootSnifferScanRec& rec, TCollection* lst, const char* foldername = 0, Bool_t extra = kFALSE)
voidScanObject(TRootSnifferScanRec& rec, TObject* obj)
voidScanObjectMemebers(TRootSnifferScanRec& rec, TClass* cl, char* ptr, unsigned long cloffset)
virtual voidScanRoot(TRootSnifferScanRec& rec)

Data Members

public:
static TObject::<anonymous>TObject::kBitMask
static TObject::EStatusBitsTObject::kCanDelete
static TObject::EStatusBitsTObject::kCannotPick
static TObject::EStatusBitsTObject::kHasUUID
static TObject::EStatusBitsTObject::kInvalidObject
static TObject::<anonymous>TObject::kIsOnHeap
static TObject::EStatusBitsTObject::kIsReferenced
static TObject::EStatusBitsTObject::kMustCleanup
static TObject::EStatusBitsTObject::kNoContextMenu
static TObject::<anonymous>TObject::kNotDeleted
static TObject::EStatusBitsTObject::kObjInCanvas
static TObject::<anonymous>TObject::kOverwrite
static TObject::<anonymous>TObject::kSingleKey
static TObject::<anonymous>TObject::kWriteDelete
static TObject::<anonymous>TObject::kZombie
protected:
Int_tfCompression! compression level when doing zip
TMemFile*fMemFile! file used to manage streamer infos
TStringTNamed::fNameobject identifier
TStringfObjectsPath! path for registered objects
Int_tfSinfoSize! number of elements in streamer info, used as version
TStringTNamed::fTitleobject title

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

TRootSniffer(const char* name, const char* objpath = "online")
 constructor
~TRootSniffer()
 destructor
void ScanObjectMemebers(TRootSnifferScanRec& rec, TClass* cl, char* ptr, unsigned long cloffset)
 scan object data members
 some members like enum or static members will be excluded
void ScanObject(TRootSnifferScanRec& rec, TObject* obj)
 scan object content
 if object is known collection class (like TFolder),
 collection content will be scanned as well
void ScanCollection(TRootSnifferScanRec& rec, TCollection* lst, const char* foldername = 0, Bool_t extra = kFALSE)
 scan collection content
void ScanRoot(TRootSnifferScanRec& rec)
 scan complete ROOT objects hierarchy
 For the moment it includes objects in gROOT directory and lise of canvases
 and files
 Also all registered objects are included.
 One could reimplement this method to provide alternative
 scan methods or to extend some collection kinds
Bool_t IsDrawableClass(TClass* cl)
 return true if object can be drawn
Bool_t IsBrowsableClass(TClass* cl)
 return true if object can be browsed?
void ScanHierarchy(const char* topname, const char* path, TRootSnifferStore* store)
 scan ROOT hierarchy with provided store object
void * FindInHierarchy(const char* path, TClass** cl = 0, TDataMember** member = 0, Int_t* chld = 0)
 search element with specified path
 returns pointer on element
 optionally one could obtain element class, member description and number
 of childs
 when chld!=0, not only element is searched, but also number of childs are
 counted
 when member!=0, any object will be scanned for its data members (disregard
 of extra options)
TObject * FindTObjectInHierarchy(const char* path)
 search element in hierarchy, derived from TObject
ULong_t GetStreamerInfoHash()
 returns hash value for streamer infos
 at the moment - just number of items in streamer infos list.
ULong_t GetItemHash(const char* itemname)
 get hash function for specified item
 used to detect any changes in the specified object
Bool_t CanDrawItem(const char* path)
 method verifies if object can be drawn
Bool_t CanExploreItem(const char* path)
 method returns true when object has childs or
 one could try to expand item
void CreateMemFile()
 creates TMemFile instance, which used for objects streaming
 One could not use TBuffer directly, while one also require streamer infos
 list
Bool_t ProduceJson(const char* path, const char* options, TString& res)
 produce JSON data for specified item
 For object conversion TBufferJSON is used
Bool_t ProduceXml(const char* path, const char* options, TString& res)
 produce XML data for specified item
 For object conversion TBufferXML is used
Bool_t IsStreamerInfoItem(const char* itemname)
Bool_t ProduceBinary(const char* path, const char* options, void*& ptr, Long_t& length)
 produce binary data for specified item
 It is 20 bytes for header plus compressed content of TBuffer
Bool_t CreateBindData(TBufferFile* sbuf, void*& ptr, Long_t& length)
 create binary data from TBufferFile
 If compression enabled, data also will be zipped
Bool_t ProduceImage(Int_t kind, const char* path, const char* options, void*& ptr, Long_t& length)
 Method to produce image from specified object

 Parameters:
    kind - image kind TImage::kPng, TImage::kJpeg, TImage::kGif
    path - path to object
    options - extra options

 By default, image 300x200 is produced
 In options string one could provide following parameters:
    w - image width
    h - image height
    opt - draw options
  For instance:
     http://localhost:8080/Files/hsimple.root/hpx/get.png?w=500&h=500&opt=lego1

  Return is memory with produced image
  Memory must be released by user with free(ptr) call
Bool_t Produce(const char* path, const char* file, const char* options, void*& ptr, Long_t& length)
 method to produce different kind of binary data
 Supported file (case sensitive):
   "root.bin"  - binary data
   "root.png"  - png image
   "root.jpeg" - jpeg image
   "root.gif"  - gif image
   "root.xml"  - xml representation
   "root.json" - json representation
Bool_t RegisterObject(const char* subfolder, TObject* obj)
 register object in subfolder structure
 subfolder paramerer can have many levels like:

 TRootSniffer* sniff = new TRootSniffer("sniff");
 sniff->RegisterObject("/my/sub/subfolder", h1);

 Such objects can be later found in "Objects" folder of sniffer like

 h1 = sniff->FindTObjectInHierarchy("/Objects/my/sub/subfolder/h1");

 Objects, registered in "extra" sub-folder, can be explored.
 Typically one used "extra" sub-folder to register event structures to
 be able expand it later in web-browser:

 TEvent* ev = new TEvent;
 sniff->RegisterObject("extra", ev);
Bool_t UnregisterObject(TObject* obj)
 unregister (remove) object from folders structures
 folder itself will remain even when it will be empty
TRootSniffer(const char* name, const char* objpath = "online")
void SetCompression(Int_t lvl)