ATLAS Offline Software
Loading...
Searching...
No Matches
SampleHist.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef SAMPLE_HANDLER_SAMPLE_HIST_HH
6#define SAMPLE_HANDLER_SAMPLE_HIST_HH
7
8//
9// Distributed under the Boost Software License, Version 1.0.
10// (See accompanying file LICENSE_1_0.txt or copy at
11// http://www.boost.org/LICENSE_1_0.txt)
12
13// Please feel free to contact me (krumnack@iastate.edu) for bug
14// reports, feature suggestions, praise and complaints.
15
16
17
19
20#include <string>
22
23namespace SH
24{
30 class SampleHist : public Sample
31 {
32 //
33 // public interface
34 //
35
40 public:
41 void testInvariant () const;
42
43
51 public:
53
54
63 public:
64 SampleHist (const std::string& name, const std::string& file);
65
66
67
68 //
69 // interface inherited from Sample
70 //
71
73 protected:
74 virtual std::size_t getNumFiles () const;
75
77 protected:
78 virtual std::string getFileName (std::size_t index) const;
79
81 protected:
82 virtual SamplePtr doMakeLocal () const;
83
85 protected:
86 virtual std::vector<std::string> doMakeFileList () const;
87
89 protected:
90 virtual void
91 doUpdateLocation (const std::string& from, const std::string& to);
92
94 protected:
95 virtual TObject *doReadHist (const std::string& name) const;
96
97
98
99 //
100 // private interface
101 //
102
104 private:
105 std::string m_file;
106
108 };
109}
110
111#endif
virtual std::string getFileName(std::size_t index) const
the name of the file with the given index
virtual void doUpdateLocation(const std::string &from, const std::string &to)
update all file references starting with from to to
SampleHist(const std::string &name, const std::string &file)
standard constructor
virtual SamplePtr doMakeLocal() const
Make this a local sample, i.e.
std::string m_file
the path to the file we use
Definition SampleHist.h:105
virtual std::vector< std::string > doMakeFileList() const
make a list of all files, prestaging them if necessary
ClassDef(SampleHist, 1)
void testInvariant() const
test the invariant of this object
virtual TObject * doReadHist(const std::string &name) const
read an object from a histogram file
SampleHist()
standard constructor
virtual std::size_t getNumFiles() const
the number of files in the sample
friend class SamplePtr
Definition Sample.h:448
Sample(const std::string &name)
standard constructor
const std::string & name() const
the name of the sample we are using
This module provides a lot of global definitions, forward declarations and includes that are used by ...
Definition PrunDriver.h:15
Definition index.py:1
TFile * file