Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-10-29 09:29:12

0001 // $Id$
0002 // Author: Sergey Linev   23/02/2018
0003 
0004 /*************************************************************************
0005  * Copyright (C) 1995-2018, Rene Brun and Fons Rademakers.               *
0006  * All rights reserved.                                                  *
0007  *                                                                       *
0008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
0009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
0010  *************************************************************************/
0011 
0012 #ifndef ROOT_TRootSnifferFull
0013 #define ROOT_TRootSnifferFull
0014 
0015 #include "TRootSniffer.h"
0016 #include <string>
0017 #include <memory>
0018 #include <map>
0019 
0020 class TMemFile;
0021 class TMethodCall;
0022 class TMethod;
0023 
0024 class TRootSnifferFull : public TRootSniffer {
0025 protected:
0026    TMemFile *fMemFile{nullptr}; ///<! file used to manage streamer infos
0027    TList *fSinfo{nullptr};      ///<! last produced streamer info
0028    std::map<const TMethod *, std::unique_ptr<TMethodCall>> fExeCache; ///<! cache for exe.json invocation
0029 
0030    void ScanObjectProperties(TRootSnifferScanRec &rec, TObject *obj) override;
0031 
0032    void ScanKeyProperties(TRootSnifferScanRec &rec, TKey *key, TObject *&obj, TClass *&obj_class) override;
0033 
0034    void ScanObjectChilds(TRootSnifferScanRec &rec, TObject *obj) override;
0035 
0036    void CreateMemFile();
0037 
0038    Bool_t CanDrawClass(TClass *cl) override { return IsDrawableClass(cl); }
0039 
0040    Bool_t HasStreamerInfo() const override { return kTRUE; }
0041 
0042    Bool_t ProduceBinary(const std::string &path, const std::string &options, std::string &res) override;
0043 
0044    Bool_t ProduceRootFile(const std::string &path, const std::string &options, std::string &res) override;
0045 
0046    Bool_t ProduceImage(Int_t kind, const std::string &path, const std::string &options, std::string &res) override;
0047 
0048    Bool_t ProduceXml(const std::string &path, const std::string &options, std::string &res) override;
0049 
0050    Bool_t ProduceExe(const std::string &path, const std::string &options, Int_t reskind, std::string &res) override;
0051 
0052    Bool_t CallProduceImage(const std::string &kind, const std::string &path, const std::string &options, std::string &res) override;
0053 
0054 public:
0055    TRootSnifferFull(const char *name = "sniff", const char *objpath = "Objects");
0056    virtual ~TRootSnifferFull();
0057 
0058    static Bool_t IsDrawableClass(TClass *cl);
0059 
0060    Bool_t IsStreamerInfoItem(const char *itemname) override;
0061 
0062    ULong_t GetStreamerInfoHash() override;
0063 
0064    ULong_t GetItemHash(const char *itemname) override;
0065 
0066    void *FindInHierarchy(const char *path, TClass **cl = nullptr, TDataMember **member = nullptr, Int_t *chld = nullptr) override;
0067 
0068    ClassDefOverride(TRootSnifferFull, 0) // Sniffer for many ROOT classes, including histograms, graphs, pads and tree
0069 };
0070 
0071 #endif