ATLAS Offline Software
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 
18 #include <SampleHandler/Global.h>
19 
20 #include <string>
21 #include <SampleHandler/Sample.h>
22 
23 namespace 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
index
Definition: index.py:1
SH::SampleHist
A sample that represents a single histogram file.
Definition: SampleHist.h:31
SH::SampleHist::doUpdateLocation
virtual void doUpdateLocation(const std::string &from, const std::string &to)
update all file references starting with from to to
SH::SampleHist::ClassDef
ClassDef(SampleHist, 1)
SH::SampleHist::getFileName
virtual std::string getFileName(std::size_t index) const
the name of the file with the given index
SH::SampleHist::getNumFiles
virtual std::size_t getNumFiles() const
the number of files in the sample
SH::SampleHist::SampleHist
SampleHist()
standard constructor
SH::SampleHist::doReadHist
virtual TObject * doReadHist(const std::string &name) const
read an object from a histogram file
SH::SampleHist::testInvariant
void testInvariant() const
test the invariant of this object
file
TFile * file
Definition: tile_monitor.h:29
SH::SampleHist::doMakeLocal
virtual SamplePtr doMakeLocal() const
Make this a local sample, i.e.
SH::Sample::name
const std::string & name() const
the name of the sample we are using
SH::Sample
a base class that manages a set of files belonging to a particular data set and the associated meta-d...
Definition: Sample.h:54
SH::SampleHist::m_file
std::string m_file
the path to the file we use
Definition: SampleHist.h:105
SH::SamplePtr
A smart pointer class that holds a single Sample object.
Definition: SamplePtr.h:35
SH::SampleHist::doMakeFileList
virtual std::vector< std::string > doMakeFileList() const
make a list of all files, prestaging them if necessary
CxxUtils::to
CONT to(RANGE &&r)
Definition: ranges.h:39
SH::SampleHist::SampleHist
SampleHist(const std::string &name, const std::string &file)
standard constructor
SH
This module provides a lot of global definitions, forward declarations and includes that are used by ...
Definition: PrunDriver.h:15
Global.h
Sample.h