ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
PhysicsAnalysis
D3PDTools
SampleHandler
Root
DiskOutputXRD.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
12
#include <
SampleHandler/DiskOutputXRD.h
>
13
14
#include <sstream>
15
#include <
RootCoreUtils/Assert.h
>
16
#include <
SampleHandler/DiskWriterXRD.h
>
17
18
//
19
// method implementations
20
//
21
22
ClassImp
(
SH::DiskOutputXRD
)
23
24
namespace
SH
25
{
26
void
DiskOutputXRD ::
27
testInvariant ()
const
28
{
29
RCU_INVARIANT
(m_prefix.find (
"root://"
) == 0);
30
}
31
32
33
34
DiskOutputXRD ::
35
DiskOutputXRD ()
36
: m_prefix (
"root://ThisIsANonExistantPath"
)
37
{
38
RCU_NEW_INVARIANT
(
this
);
39
}
40
41
42
43
DiskOutputXRD ::
44
DiskOutputXRD (
const
std::string& val_prefix)
45
: m_prefix (val_prefix)
46
{
47
RCU_REQUIRE
(val_prefix.find (
"root://"
) == 0);
48
49
RCU_NEW_INVARIANT
(
this
);
50
}
51
52
53
54
std::unique_ptr<DiskWriter> DiskOutputXRD ::
55
doMakeWriter (
const
std::string& sampleName,
56
const
std::string& segmentName,
57
const
std::string& suffix)
const
58
{
59
RCU_READ_INVARIANT
(
this
);
60
return
std::make_unique<DiskWriterXRD>
61
(targetURL (sampleName, segmentName, suffix));
62
}
63
64
65
66
std::string DiskOutputXRD ::
67
getTargetURL (
const
std::string& sampleName,
68
const
std::string& segmentName,
69
const
std::string& suffix)
const
70
{
71
RCU_READ_INVARIANT
(
this
);
72
std::ostringstream
file
;
73
file
<< m_prefix;
74
if
(m_prefix.back() !=
'-'
)
75
file
<<
"/"
;
76
file
<< sampleName;
77
if
(!segmentName.empty())
78
file
<<
"-"
<< segmentName;
79
file
<< suffix;
80
return
file
.str();
81
}
82
}
Assert.h
RCU_INVARIANT
#define RCU_INVARIANT(x)
Definition
Assert.h:189
RCU_NEW_INVARIANT
#define RCU_NEW_INVARIANT(x)
Definition
Assert.h:221
RCU_REQUIRE
#define RCU_REQUIRE(x)
Definition
Assert.h:196
RCU_READ_INVARIANT
#define RCU_READ_INVARIANT(x)
Definition
Assert.h:217
ClassImp
ClassImp(SH::DiskOutputXRD) namespace SH
Definition
DiskOutputXRD.cxx:22
DiskOutputXRD.h
DiskWriterXRD.h
SH::DiskOutputXRD
an implementation of DiskOutput using the XRD protocol
Definition
DiskOutputXRD.h:23
SH
This module provides a lot of global definitions, forward declarations and includes that are used by ...
Definition
PrunDriver.h:15
file
TFile * file
Definition
tile_monitor.h:29
Generated on
for ATLAS Offline Software by
1.17.0