ATLAS Offline Software
SampleMeta.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 //
6 // Distributed under the Boost Software License, Version 1.0.
7 // (See accompanying file LICENSE_1_0.txt or copy at
8 // http://www.boost.org/LICENSE_1_0.txt)
9 
10 // Please feel free to contact me (krumnack@iastate.edu) for bug
11 // reports, feature suggestions, praise and complaints.
12 
13 
14 //
15 // includes
16 //
17 
19 
20 #include <RootCoreUtils/Assert.h>
21 #include <RootCoreUtils/ThrowMsg.h>
23 
24 //
25 // method implementations
26 //
27 
29 
30 namespace SH
31 {
32  void SampleMeta ::
33  testInvariant () const
34  {
35  }
36 
37 
38 
40  SampleMeta ()
41  : Sample ("unnamed")
42  {
43  RCU_NEW_INVARIANT (this);
44  }
45 
46 
47 
49  SampleMeta (const std::string& name)
50  : Sample (name)
51  {
52  RCU_NEW_INVARIANT (this);
53  }
54 
55 
56 
57  std::size_t SampleMeta ::
58  getNumFiles () const
59  {
60  RCU_READ_INVARIANT (this);
61  // rationale: this is just so that print() will work
62  return 0;
63  }
64 
65 
66 
67  std::string SampleMeta ::
68  getFileName (std::size_t /*index*/) const
69  {
70  RCU_READ_INVARIANT (this);
71  RCU_THROW_MSG ("fileName() should not be called on SampleMeta");
72  return ""; //compiler dummy
73  }
74 
75 
76 
77  SamplePtr SampleMeta ::
78  doMakeLocal () const
79  {
80  RCU_READ_INVARIANT (this);
81  RCU_THROW_MSG ("makeLocal() should not be called on SampleMeta");
82  return 0; //compiler dummy
83  }
84 
85 
86 
87  std::vector<std::string> SampleMeta ::
88  doMakeFileList () const
89  {
90  RCU_READ_INVARIANT (this);
91 
92  std::vector<std::string> result;
93  return result;
94  }
95 }
SH::SampleMeta::getNumFiles
virtual std::size_t getNumFiles() const
the number of files in the sample
get_generator_info.result
result
Definition: get_generator_info.py:21
SampleMeta.h
Assert.h
ClassImp
ClassImp(SH::SampleMeta) namespace SH
Definition: SampleMeta.cxx:28
SH::SampleMeta::testInvariant
void testInvariant() const
test the invariant of this object
SamplePtr.h
SH::SampleMeta::doMakeFileList
virtual std::vector< std::string > doMakeFileList() const
make a list of all files, prestaging them if necessary
SH::SampleMeta::doMakeLocal
virtual SamplePtr doMakeLocal() const
Make this a local sample, i.e.
SH::SampleMeta
A Sample that consists only of Meta-Information.
Definition: SampleMeta.h:31
SH::SampleMeta::SampleMeta
SampleMeta()
standard constructor
SH::SampleMeta::getFileName
virtual std::string getFileName(std::size_t index) const
the name of the file with the given index
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
ThrowMsg.h
SH
This module provides a lot of global definitions, forward declarations and includes that are used by ...
Definition: PrunDriver.h:15
RCU_THROW_MSG
#define RCU_THROW_MSG(message)
Definition: PrintMsg.h:58
RCU_READ_INVARIANT
#define RCU_READ_INVARIANT(x)
Definition: Assert.h:229
RCU_NEW_INVARIANT
#define RCU_NEW_INVARIANT(x)
Definition: Assert.h:233