ATLAS Offline Software
DiskOutput.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
7 
8 //
9 // includes
10 //
11 
13 
14 #include <RootCoreUtils/Assert.h>
16 
17 //
18 // method implementations
19 //
20 
22 
23 namespace SH
24 {
25  void DiskOutput ::
26  testInvariant () const
27  {
28  }
29 
30 
31 
33  DiskOutput ()
34  {
35  RCU_NEW_INVARIANT (this);
36  }
37 
38 
39 
40  std::unique_ptr<DiskWriter> DiskOutput ::
41  makeWriter (const std::string& sampleName,
42  const std::string& segmentName,
43  const std::string& suffix) const
44  {
45  RCU_READ_INVARIANT (this);
46  RCU_REQUIRE (!sampleName.empty());
47  std::unique_ptr<DiskWriter> result
48  = doMakeWriter (sampleName, segmentName, suffix);
49  RCU_PROVIDE (result != nullptr);
50  return result;
51  }
52 
53 
54 
55  std::string DiskOutput ::
56  targetURL (const std::string& sampleName,
57  const std::string& segmentName,
58  const std::string& suffix) const
59  {
60  RCU_READ_INVARIANT (this);
61  RCU_REQUIRE (!sampleName.empty());
62  std::string result = getTargetURL (sampleName, segmentName, suffix);
63  RCU_PROVIDE (!result.empty());
64  return result;
65  }
66 }
ClassImp
ClassImp(SH::DiskOutput) namespace SH
Definition: DiskOutput.cxx:21
get_generator_info.result
result
Definition: get_generator_info.py:21
hotSpotInTAG.suffix
string suffix
Definition: hotSpotInTAG.py:186
SH::DiskOutput::DiskOutput
DiskOutput()
standard constructor
RCU_REQUIRE
#define RCU_REQUIRE(x)
Definition: Assert.h:208
SH::DiskOutput::getTargetURL
virtual std::string getTargetURL(const std::string &sampleName, const std::string &segmentName, const std::string &suffix) const =0
Assert.h
RCU_PROVIDE
#define RCU_PROVIDE(x)
Definition: Assert.h:215
SH::DiskOutput
a class/interface representing an output location for files
Definition: DiskOutput.h:46
SH::DiskOutput::targetURL
std::string targetURL(const std::string &sampleName, const std::string &segmentName, const std::string &suffix) const
the final output location for the given segment
DiskWriter.h
DiskOutput.h
SH::DiskOutput::doMakeWriter
virtual std::unique_ptr< DiskWriter > doMakeWriter(const std::string &sampleName, const std::string &segmentName, const std::string &suffix) const =0
create a DiskWriter object managing an output file
SH::DiskOutput::makeWriter
std::unique_ptr< DiskWriter > makeWriter(const std::string &sampleName, const std::string &segmentName, const std::string &suffix) const
create a DiskWriter object managing an output file
SH
This module provides a lot of global definitions, forward declarations and includes that are used by ...
Definition: PrunDriver.h:15
SH::DiskOutput::testInvariant
void testInvariant() const
test the invariant of this object
RCU_READ_INVARIANT
#define RCU_READ_INVARIANT(x)
Definition: Assert.h:229
RCU_NEW_INVARIANT
#define RCU_NEW_INVARIANT(x)
Definition: Assert.h:233