27{
28 void SampleHist ::
29 testInvariant () const
30 {
32 }
33
34
35
36 SampleHist ::
37 SampleHist ()
38 : Sample ("unnamed")
39 {
41 }
42
43
44
45 SampleHist ::
46 SampleHist (
const std::string& name,
const std::string&
file)
48 {
50 }
51
52
53
54 std::size_t SampleHist ::
55 getNumFiles () const
56 {
58 return 1;
59 }
60
61
62
63 std::string SampleHist ::
64 getFileName (const std::size_t
65#ifndef NDEBUG
67#endif
68 ) const
69 {
71
73 return m_file;
74 }
75
76
77
78 std::unique_ptr<SampleLocal> SampleHist ::
79 doMakeLocal () const
80 {
82 RCU_THROW_MSG (
"Sample::makeLocal not supported for SampleHist");
83 return {};
84 }
85
86
87
88 std::vector<std::string> SampleHist ::
89 doMakeFileList () const
90 {
92
93 std::vector<std::string>
result;
96 }
97
98
99
100 void SampleHist ::
101 doUpdateLocation (const std::string& from, const std::string& to)
102 {
104 if (strncmp (m_file.c_str(), from.c_str(), from.size()) == 0)
105 m_file =
to +
"/" + m_file.substr (from.size());
106 }
107
108
109
110 TObject *SampleHist ::
111 doReadHist (const std::string& name) const
112 {
114
115 std::unique_ptr<TFile>
file (TFile::Open (m_file.c_str(),
"READ"));
118 TObject *
object =
file->Get (
name.c_str());
119 if (object != 0)
122 }
123}
#define RCU_NEW_INVARIANT(x)
#define RCU_READ_INVARIANT(x)
#define RCU_THROW_MSG(message)
bool SetDirectory(TObject *object, TDirectory *directory)
effects: set the directory this object is associated with returns: whether the object type actively k...