Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TRootSnifferFull.h
Go to the documentation of this file.
1// $Id$
2// Author: Sergey Linev 23/02/2018
3
4/*************************************************************************
5 * Copyright (C) 1995-2018, Rene Brun and Fons Rademakers. *
6 * All rights reserved. *
7 * *
8 * For the licensing terms see $ROOTSYS/LICENSE. *
9 * For the list of contributors see $ROOTSYS/README/CREDITS. *
10 *************************************************************************/
11
12#ifndef ROOT_TRootSnifferFull
13#define ROOT_TRootSnifferFull
14
15#include "TRootSniffer.h"
16#include <string>
17
18class TMemFile;
19
21protected:
22 TMemFile *fMemFile{nullptr}; ///<! file used to manage streamer infos
23 TList *fSinfo{nullptr}; ///<! last produced streamer info
24
25 void ScanObjectProperties(TRootSnifferScanRec &rec, TObject *obj) override;
26
27 void ScanKeyProperties(TRootSnifferScanRec &rec, TKey *key, TObject *&obj, TClass *&obj_class) override;
28
29 void ScanObjectChilds(TRootSnifferScanRec &rec, TObject *obj) override;
30
31 void CreateMemFile();
32
33 Bool_t CanDrawClass(TClass *cl) override { return IsDrawableClass(cl); }
34
35 Bool_t HasStreamerInfo() const override { return kTRUE; }
36
37 Bool_t ProduceBinary(const std::string &path, const std::string &options, std::string &res) override;
38
39 Bool_t ProduceRootFile(const std::string &path, const std::string &options, std::string &res) override;
40
41 Bool_t ProduceImage(Int_t kind, const std::string &path, const std::string &options, std::string &res) override;
42
43 Bool_t ProduceXml(const std::string &path, const std::string &options, std::string &res) override;
44
45 Bool_t ProduceExe(const std::string &path, const std::string &options, Int_t reskind, std::string &res) override;
46
47 Bool_t CallProduceImage(const std::string &kind, const std::string &path, const std::string &options, std::string &res) override;
48
49public:
50 TRootSnifferFull(const char *name = "sniff", const char *objpath = "Objects");
51 virtual ~TRootSnifferFull();
52
53 static Bool_t IsDrawableClass(TClass *cl);
54
55 Bool_t IsStreamerInfoItem(const char *itemname) override;
56
58
59 ULong_t GetItemHash(const char *itemname) override;
60
61 void *FindInHierarchy(const char *path, TClass **cl = nullptr, TDataMember **member = nullptr, Int_t *chld = nullptr) override;
62
63 ClassDefOverride(TRootSnifferFull, 0) // Sniffer for many ROOT classes, including histograms, graphs, pads and tree
64};
65
66#endif
bool Bool_t
Definition RtypesCore.h:63
int Int_t
Definition RtypesCore.h:45
unsigned long ULong_t
Definition RtypesCore.h:55
constexpr Bool_t kTRUE
Definition RtypesCore.h:93
#define ClassDefOverride(name, id)
Definition Rtypes.h:346
char name[80]
Definition TGX11.cxx:110
TClass instances represent classes, structs and namespaces in the ROOT type system.
Definition TClass.h:81
All ROOT classes may have RTTI (run time type identification) support added.
Definition TDataMember.h:31
Book space in a file, create I/O buffers, to fill them, (un)compress them.
Definition TKey.h:28
A doubly linked list.
Definition TList.h:38
A TMemFile is like a normal TFile except that it reads and writes only from memory.
Definition TMemFile.h:19
Mother of all ROOT objects.
Definition TObject.h:41
Extends TRootSniffer for many ROOT classes.
void * FindInHierarchy(const char *path, TClass **cl=nullptr, TDataMember **member=nullptr, Int_t *chld=nullptr) override
Search element with specified path.
Bool_t IsStreamerInfoItem(const char *itemname) override
Return true if it is streamer info item name.
static Bool_t IsDrawableClass(TClass *cl)
return true if given class can be drawn in JSROOT
Bool_t ProduceExe(const std::string &path, const std::string &options, Int_t reskind, std::string &res) override
Execute command for specified object.
TList * fSinfo
! last produced streamer info
Bool_t CanDrawClass(TClass *cl) override
void ScanObjectProperties(TRootSnifferScanRec &rec, TObject *obj) override
Scans object properties.
virtual ~TRootSnifferFull()
destructor
void ScanObjectChilds(TRootSnifferScanRec &rec, TObject *obj) override
Scans object childs (if any)
Bool_t ProduceRootFile(const std::string &path, const std::string &options, std::string &res) override
Produce ROOT file for specified item.
ULong_t GetItemHash(const char *itemname) override
Get hash function for specified item.
Bool_t ProduceImage(Int_t kind, const std::string &path, const std::string &options, std::string &res) override
Method to produce image from specified object.
Bool_t HasStreamerInfo() const override
Bool_t CallProduceImage(const std::string &kind, const std::string &path, const std::string &options, std::string &res) override
Invokes TRootSniffer::ProduceIamge, converting kind into TImage::EImageFileTypes type.
Bool_t ProduceXml(const std::string &path, const std::string &options, std::string &res) override
Produce XML data for specified item.
void CreateMemFile()
Creates TMemFile instance, which used for objects streaming.
Bool_t ProduceBinary(const std::string &path, const std::string &options, std::string &res) override
Produce binary data for specified item.
TMemFile * fMemFile
! file used to manage streamer infos
ULong_t GetStreamerInfoHash() override
Returns hash value for streamer infos.
void ScanKeyProperties(TRootSnifferScanRec &rec, TKey *key, TObject *&obj, TClass *&obj_class) override
Scans TKey properties.
Structure used to scan hierarchies of ROOT objects.
Sniffer of ROOT objects, data provider for THttpServer.