HighLAND
DocString.hxx
1 #ifndef DocString_h
2 #define DocString_h
3 
4 #include <cstdlib>
5 #include <TObject.h>
6 
7 /// This class is used to store information about the variables stored in the
8 /// micro-trees. The DocStringManager is used to create, store and access
9 /// DocString objects.
10 ///
11 /// Each variable stored in the micro-trees has an associated DocString object,
12 /// which records the name, type, size and other information about the variable.
13 ///
14 /// This DocString class should not need to be accessed by users. All the
15 /// functionality is handled automatically.
16 class DocString: public TObject {
17  public:
18 
19  /// Empty constructor to keep ROOT happy when reading in from TClonesArray.
20  DocString(){};
21 
22  /// Constructor that actually sets the information.
23  DocString(const std::string& tree, const std::string& name, const std::string& doc, const std::string& type, int size1, const std::string& counter1, int size2, const std::string& counter2, int size3, const std::string& counter3);
24 
25  /// Destructor.
26  virtual ~DocString() {}
27 
28  /// Print out the details of this variable. If it is a track category variable,
29  /// also print out the track categories.
30  void Explain();
31 
32  /// Get the name of this variable.
33  std::string Name() { return _name; }
34 
35  /// Get the name of the tree this variable was stored in.
36  std::string Tree() { return _tree; }
37 
38  ClassDef(DocString, 1);
39 
40  protected:
41 
42  /// The name of the tree this variable was stored in.
43  std::string _tree;
44 
45  /// The name of this variable.
46  std::string _name;
47 
48  /// The documentation string provided by the user.
49  std::string _doc;
50 
51  /// The type of this variable (I/F/C/D)
52  std::string _type;
53 
54  /// If a vector, the counter used for the 1st dimension.
55  std::string _counter1;
56 
57  /// If a matrix, the counter used for the 2nd dimension.
58  std::string _counter2;
59 
60  /// If a 3D matrix, the counter used for the 3rd dimension.
61  std::string _counter3;
62 
63  /// If a vector, the size of the 1st dimension.
64  int _size1;
65 
66  /// If a matrix, the size of the 2nd dimension.
67  int _size2;
68 
69  /// If a 3D matrix, the size of the 3rd dimension.
70  int _size3;
71 
72 };
73 
74 #endif
std::string _counter1
If a vector, the counter used for the 1st dimension.
Definition: DocString.hxx:55
std::string _type
The type of this variable (I/F/C/D)
Definition: DocString.hxx:52
int _size1
If a vector, the size of the 1st dimension.
Definition: DocString.hxx:64
int _size2
If a matrix, the size of the 2nd dimension.
Definition: DocString.hxx:67
std::string _counter2
If a matrix, the counter used for the 2nd dimension.
Definition: DocString.hxx:58
void Explain()
Definition: DocString.cxx:29
DocString()
Empty constructor to keep ROOT happy when reading in from TClonesArray.
Definition: DocString.hxx:20
std::string Name()
Get the name of this variable.
Definition: DocString.hxx:33
std::string _counter3
If a 3D matrix, the counter used for the 3rd dimension.
Definition: DocString.hxx:61
virtual ~DocString()
Destructor.
Definition: DocString.hxx:26
std::string _name
The name of this variable.
Definition: DocString.hxx:46
std::string Tree()
Get the name of the tree this variable was stored in.
Definition: DocString.hxx:36
std::string _tree
The name of the tree this variable was stored in.
Definition: DocString.hxx:43
std::string _doc
The documentation string provided by the user.
Definition: DocString.hxx:49
int _size3
If a 3D matrix, the size of the 3rd dimension.
Definition: DocString.hxx:70