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
6
7#ifndef SAMPLE_HANDLER_SAMPLE_HIST_HH
8#define SAMPLE_HANDLER_SAMPLE_HIST_HH
9
11
12#include <string>
14
15namespace SH
16{
22 class SampleHist final : public Sample
23 {
24 //
25 // public interface
26 //
27
32 public:
33 void testInvariant () const;
34
35
43 public:
45
46
55 public:
56 SampleHist (const std::string& name, const std::string& file);
57
58
59
60 //
61 // interface inherited from Sample
62 //
63
65 protected:
66 virtual std::size_t getNumFiles () const override;
67
69 protected:
70 virtual std::string getFileName (std::size_t index) const override;
71
73 protected:
74 virtual std::unique_ptr<SampleLocal> doMakeLocal () const override;
75
77 protected:
78 virtual std::vector<std::string> doMakeFileList () const override;
79
81 protected:
82 virtual void
83 doUpdateLocation (const std::string& from, const std::string& to) override;
84
86 protected:
87 virtual TObject *doReadHist (const std::string& name) const override;
88
89
90
91 //
92 // private interface
93 //
94
96 private:
97 std::string m_file;
98
100 };
101}
102
103#endif
virtual TObject * doReadHist(const std::string &name) const override
read an object from a histogram file
virtual void doUpdateLocation(const std::string &from, const std::string &to) override
update all file references starting with from to to
virtual std::vector< std::string > doMakeFileList() const override
make a list of all files, prestaging them if necessary
virtual std::string getFileName(std::size_t index) const override
the name of the file with the given index
SampleHist(const std::string &name, const std::string &file)
standard constructor
std::string m_file
the path to the file we use
Definition SampleHist.h:97
ClassDef(SampleHist, 1)
virtual std::unique_ptr< SampleLocal > doMakeLocal() const override
Make this a local sample, i.e.
void testInvariant() const
test the invariant of this object
virtual std::size_t getNumFiles() const override
the number of files in the sample
SampleHist()
standard constructor
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