ArchiveMount.cpp 2.78 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/*
 * The CERN Tape Archive (CTA) project
 * Copyright (C) 2015  CERN
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

19
#include "scheduler/ArchiveMount.hpp"
20

21
22
23
24
25
26
27
28
29
30
//------------------------------------------------------------------------------
// constructor
//------------------------------------------------------------------------------
cta::ArchiveMount::ArchiveMount(
  std::unique_ptr<SchedulerDatabase::TapeMount> dbMount) {
  m_dbMount.reset(
    dynamic_cast<SchedulerDatabase::ArchiveMount*>(dbMount.release()));
  if(!m_dbMount.get()) {
    throw WrongMountType(std::string(__FUNCTION__) +
      ": could not cast mount to SchedulerDatabase::ArchiveMount");
31
32
33
  }
}

34
35
36
37
38
//------------------------------------------------------------------------------
// getMountType
//------------------------------------------------------------------------------
cta::MountType::Enum cta::ArchiveMount::getMountType() const throw() {
  return MountType::ARCHIVE;
39
}
40

Steven Murray's avatar
Steven Murray committed
41
42
43
44
45
46
47
//------------------------------------------------------------------------------
// getVid
//------------------------------------------------------------------------------
std::string cta::ArchiveMount::getVid() const throw() {
  return "UNKNOWN_VID_FOR_ARCHIVE_MOUNT";
}

48
49
50
51
52
53
//------------------------------------------------------------------------------
// getDensity
//------------------------------------------------------------------------------
std::string cta::ArchiveMount::getDensity() const throw() {
  return "UNKNOWN_DENSITY_FOR_ARCHIVE_MOUNT";
}
54
//------------------------------------------------------------------------------
55
// complete
56
//------------------------------------------------------------------------------
57
58
59
60
61
62
63
64
void cta::ArchiveMount::complete() {
  throw NotImplemented ("");
}

//------------------------------------------------------------------------------
// failed
//------------------------------------------------------------------------------
void cta::ArchiveMount::failed(const std::exception &ex) {
65
66
  throw NotImplemented ("");
}
67

68
69
70
71
72
//------------------------------------------------------------------------------
// destructor
//------------------------------------------------------------------------------
cta::ArchiveMount::~ArchiveMount() throw() {
}