ATLAS Offline Software
Loading...
Searching...
No Matches
SampleComposite.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_COMPOSITE_HH
6#define SAMPLE_HANDLER_SAMPLE_COMPOSITE_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>
21#include <vector>
23
24namespace SH
25{
30 class SampleComposite : public Sample
31 {
32 //
33 // public interface
34 //
35
40 public:
41 void testInvariant () const;
42
43
51 public:
53
54
62 public:
63 SampleComposite (const std::string& name);
64
65
74 public:
75 void add (const SamplePtr& sample);
76
77
78
79 //
80 // inherited interface
81 //
82
84 protected:
85 virtual std::size_t getNumFiles () const;
86
88 protected:
89 virtual std::string getFileName (std::size_t index) const;
90
92 protected:
93 virtual SamplePtr doMakeLocal () const;
94
96 protected:
97 virtual std::vector<std::string> doMakeFileList () const;
98
100 protected:
101 virtual void
102 doUpdateLocation (const std::string& from, const std::string& to);
103
105 protected:
106 virtual bool getContains (const std::string& name) const;
107
109 protected:
111
112
113
114 //
115 // private interface
116 //
117
119 private:
120 std::vector<SamplePtr> m_samples;
121
123 private:
124 typedef std::vector<SamplePtr>::const_iterator SamplesIter;
125
127 };
128}
129
130#endif
virtual SamplePtr doMakeLocal() const
Make this a local sample, i.e.
virtual bool getContains(const std::string &name) const
whether this sample contains a sample of the given name
ClassDef(SampleComposite, 1)
virtual void doUpdateLocation(const std::string &from, const std::string &to)
update all file references starting with from to to
std::vector< SamplePtr >::const_iterator SamplesIter
the iterator for m_samples
void add(const SamplePtr &sample)
add a sample to the list
void testInvariant() const
test the invariant of this object
std::vector< SamplePtr > m_samples
the list of samples we use
virtual std::size_t getNumFiles() const
the number of files in the sample
SampleComposite(const std::string &name)
standard constructor
virtual std::string getFileName(std::size_t index) const
the name of the file with the given index
virtual std::vector< std::string > doMakeFileList() const
make a list of all files, prestaging them if necessary
SampleComposite()
standard constructor
virtual void doAddSamples(SampleHandler &result)
add all samples this sample corresponds to to the given sample handler
A class that manages a list of Sample objects.
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