ATLAS Offline Software
TFileString.h
Go to the documentation of this file.
1 /* emacs: this is -*- c++ -*- */
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 
28 class TFileString : public TObjString {
29 
30 public:
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 
54 private:
55 
56  std::vector<std::string> mstring;
57 
58  ClassDef(TFileString, 1)
59 
60 };
61 
62 
63 std::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 
TFileString
Definition: TFileString.h:28
TFileString::operator[]
std::string operator[](int i) const
Definition: TFileString.h:46
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
TFileString::mstring
std::vector< std::string > mstring
Definition: TFileString.h:56
TFileString::TFileString
TFileString(const std::string &name, const std::string &tag)
Definition: TFileString.h:34
TFileString::operator[]
std::string & operator[](int i)
Definition: TFileString.h:45
lumiFormat.i
int i
Definition: lumiFormat.py:85
TFileString::push_back
void push_back(const std::string &s)
Definition: TFileString.h:52
TFileString::TFileString
TFileString(const std::string &name="")
Definition: TFileString.h:32
operator<<
std::ostream & operator<<(std::ostream &s, const TFileString &fs)
Herwig7_QED_EvtGen_ll.fs
dictionary fs
Definition: Herwig7_QED_EvtGen_ll.py:17
CaloCondBlobAlgs_fillNoiseFromASCII.tag
string tag
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:24
TFileString::tags
std::vector< std::string > & tags()
Definition: TFileString.h:38
TFileString::tags
const std::vector< std::string > & tags() const
Definition: TFileString.h:39
TFileString::name
std::string name() const
Definition: TFileString.h:42
TFileString::size
size_t size() const
Definition: TFileString.h:49