BmnRoot
Loading...
Searching...
No Matches
BmnPadGenerator.h
Go to the documentation of this file.
1#ifndef BMNPADGENERATOR_H
2#define BMNPADGENERATOR_H
3
4#include <cstdio>
5#include <exception>
6#include <stdio.h>
7#include <stdlib.h>
8#include <vector>
9// Boost
10#include <boost/foreach.hpp>
11#include <boost/property_tree/json_parser.hpp>
12#include <boost/property_tree/ptree.hpp>
13// ROOT
14#include <TCanvas.h>
15#include <TClass.h>
16#include <TDirectory.h>
17#include <TH2F.h>
18#include <TH3S.h>
19// BmnRoot
20#include "BmnPadBranch.h"
21
22#include <BmnHistManager.h>
23
24using std::string;
25namespace pt = boost::property_tree;
26
32{
33 public:
35 : _HM(std::make_unique<BmnHistManager>())
36 , _pad(nullptr)
37 {}
38
40 {
41 if (_pad)
42 delete _pad;
43 }
48 void LoadPTFrom(string FileName);
54 BmnPadBranch* GeneratePadBranch(pt::ptree& PropTree);
55 PadInfo* GeneratePadNode(pt::ptree& PropTree);
62 static void PadTree2Canvas(BmnPadBranch* br, TVirtualPad* pad);
63
64 BmnPadBranch* GetPadBranch() { return _pad; }
65
66 private:
67 std::unique_ptr<BmnHistManager> _HM;
68 BmnPadBranch* _pad;
69 pt::ptree _TreeScheme;
70};
71
72#endif /* BMNPADGENERATOR_H */
Histogram manager.
Node of pad tree.
Generates pad tree from the scheme.
BmnPadBranch * GeneratePadBranch(pt::ptree &PropTree)
Generate pad branch tree from the boost property tree.
BmnPadBranch * GetPadBranch()
virtual ~BmnPadGenerator()
PadInfo * GeneratePadNode(pt::ptree &PropTree)
static void PadTree2Canvas(BmnPadBranch *br, TVirtualPad *pad)
Create pad structure in the canvas from the pad tree and associate pad branch instances with the pad ...
void LoadPTFrom(string FileName)
Load pad tree from json config.
Storage for pad content and it's options.
Definition PadInfo.h:20
STL namespace.