ATLAS Offline Software
Loading...
Searching...
No Matches
TFileString.h
Go to the documentation of this file.
1/* emacs: this is -*- c++ -*- */
13
14
15#ifndef TIDA_TFILESTRING_H
16#define TIDA_TFILESTRING_H
17
18#include <iostream>
19
20#include <string>
21
22#include <vector>
23
24#include "TObjString.h"
25#include "TObject.h"
26
27
28class TFileString : public TObjString {
29
30public:
31
32 TFileString(const std::string& name="") : TObjString(name.c_str()) { }
33
34 TFileString(const std::string& name, const std::string& tag) :
35 TObjString(name.c_str())
36 { mstring.push_back(tag.c_str()); }
37
38 std::vector<std::string>& tags() { return mstring; }
39 const std::vector<std::string>& tags() const { return mstring; }
40
41 // get the name
42 std::string name() const { return GetName(); }
43
44 // get a value
45 std::string& operator[](int i) { return mstring[i]; }
46 std::string operator[](int i) const { return mstring[i]; }
47
48 // get the size
49 size_t size() const { return mstring.size(); }
50
51 // add an element
52 void push_back(const std::string& s) { mstring.push_back(s); }
53
54private:
55
56 std::vector<std::string> mstring;
57
58 ClassDef(TFileString, 1)
59
60};
61
62
63std::ostream& operator<<(std::ostream& s, const TFileString& fs);
64
65
66
67#endif // TIDA_TFILESTRING_H
68
69
70
71
72
73
74
75
76
77
static Double_t fs
std::ostream & operator<<(std::ostream &s, const TFileString &fs)
std::vector< std::string > mstring
Definition TFileString.h:56
size_t size() const
Definition TFileString.h:49
std::string name() const
Definition TFileString.h:42
std::string operator[](int i) const
Definition TFileString.h:46
TFileString(const std::string &name="")
Definition TFileString.h:32
TFileString(const std::string &name, const std::string &tag)
Definition TFileString.h:34
std::vector< std::string > & tags()
Definition TFileString.h:38
const std::vector< std::string > & tags() const
Definition TFileString.h:39
std::string & operator[](int i)
Definition TFileString.h:45
void push_back(const std::string &s)
Definition TFileString.h:52