AliPhysics  914d8ff (914d8ff)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliJSONReader.h
Go to the documentation of this file.
1 /*
2  * AliJSONReader.h
3  *
4  * Created on: 06.11.2014
5  * Author: markusfasel
6  */
7 
8 #ifndef _ALIJSONREADER_H_
9 #define _ALIJSONREADER_H_
10 
11 #include "AliJSONData.h"
12 #include <string>
13 #include <vector>
14 
15 class TList;
16 
18 public:
19  AliJSONSyntaxTreeNode(const char *name, AliJSONSyntaxTreeNode *mother);
21 
22  void AddEntry(AliJSONData *entry);
23  AliJSONSyntaxTreeNode *CreateDaughter(const char *name);
24  void SetOwner(bool owner = true);
26  std::vector<AliJSONSyntaxTreeNode *> &GetDaughters() { return fDaughters; };
27  std::vector<AliJSONData *> &GetEntries() { return fEntries; }
28  const char *GetName() const { return fName.c_str(); }
29 
30 private:
33 
34  std::string fName;
36  std::vector<AliJSONData *> fEntries;
37  std::vector<AliJSONSyntaxTreeNode *> fDaughters;
38  bool fOwner;
39 };
40 
42 public:
43  AliJSONReader();
44  virtual ~AliJSONReader();
45 
46  TList *Decode(const char *jsosnstring) const;
47 
48 private:
49  void AddNodeToList(AliJSONSyntaxTreeNode *node, TList *consumer) const;
50 };
51 
52 #endif /* PWG_EMCAL_ALIEMCALJSONREADER_H_ */
std::vector< AliJSONSyntaxTreeNode * > fDaughters
Definition: AliJSONReader.h:37
AliJSONSyntaxTreeNode(const char *name, AliJSONSyntaxTreeNode *mother)
virtual ~AliJSONReader()
std::vector< AliJSONSyntaxTreeNode * > & GetDaughters()
Definition: AliJSONReader.h:26
AliJSONSyntaxTreeNode * GetMotherNode() const
Definition: AliJSONReader.h:25
std::vector< AliJSONData * > fEntries
Definition: AliJSONReader.h:36
std::vector< AliJSONData * > & GetEntries()
Definition: AliJSONReader.h:27
void AddNodeToList(AliJSONSyntaxTreeNode *node, TList *consumer) const
const char * GetName() const
Definition: AliJSONReader.h:28
AliJSONSyntaxTreeNode * CreateDaughter(const char *name)
TList * Decode(const char *jsosnstring) const
AliJSONSyntaxTreeNode * fMotherNode
Definition: AliJSONReader.h:35
void AddEntry(AliJSONData *entry)
void SetOwner(bool owner=true)
AliJSONSyntaxTreeNode * operator=(const AliJSONSyntaxTreeNode &ref)