forked from root-project/root
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTRootSnifferFull.h
More file actions
71 lines (46 loc) · 2.71 KB
/
Copy pathTRootSnifferFull.h
File metadata and controls
71 lines (46 loc) · 2.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
// $Id$
// Author: Sergey Linev 23/02/2018
/*************************************************************************
* Copyright (C) 1995-2018, Rene Brun and Fons Rademakers. *
* All rights reserved. *
* *
* For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/
#ifndef ROOT_TRootSnifferFull
#define ROOT_TRootSnifferFull
#include "TRootSniffer.h"
#include <string>
#include <memory>
#include <map>
class TMemFile;
class TMethodCall;
class TMethod;
class TRootSnifferFull : public TRootSniffer {
protected:
TMemFile *fMemFile{nullptr}; ///<! file used to manage streamer infos
TList *fSinfo{nullptr}; ///<! last produced streamer info
std::map<const TMethod *, std::unique_ptr<TMethodCall>> fExeCache; ///<! cache for exe.json invocation
void ScanObjectProperties(TRootSnifferScanRec &rec, TObject *obj) override;
void ScanKeyProperties(TRootSnifferScanRec &rec, TKey *key, TObject *&obj, TClass *&obj_class) override;
void ScanObjectChilds(TRootSnifferScanRec &rec, TObject *obj) override;
void CreateMemFile();
Bool_t CanDrawClass(TClass *cl) override { return IsDrawableClass(cl); }
Bool_t HasStreamerInfo() const override { return kTRUE; }
Bool_t ProduceBinary(const std::string &path, const std::string &options, std::string &res) override;
Bool_t ProduceRootFile(const std::string &path, const std::string &options, std::string &res) override;
Bool_t ProduceImage(Int_t kind, const std::string &path, const std::string &options, std::string &res) override;
Bool_t ProduceXml(const std::string &path, const std::string &options, std::string &res) override;
Bool_t ProduceExe(const std::string &path, const std::string &options, Int_t reskind, std::string &res) override;
Bool_t CallProduceImage(const std::string &kind, const std::string &path, const std::string &options, std::string &res) override;
public:
TRootSnifferFull(const char *name = "sniff", const char *objpath = "Objects");
virtual ~TRootSnifferFull();
static Bool_t IsDrawableClass(TClass *cl);
Bool_t IsStreamerInfoItem(const char *itemname) override;
ULong_t GetStreamerInfoHash() override;
ULong_t GetItemHash(const char *itemname) override;
void *FindInHierarchy(const char *path, TClass **cl = nullptr, TDataMember **member = nullptr, Int_t *chld = nullptr) override;
ClassDefOverride(TRootSnifferFull, 0) // Sniffer for many ROOT classes, including histograms, graphs, pads and tree
};
#endif