ATLAS Offline Software
Functions
DiskOutputLocal.cxx File Reference
#include <SampleHandler/DiskOutputLocal.h>
#include <sstream>
#include <RootCoreUtils/Assert.h>
#include <SampleHandler/DiskWriterLocal.h>
Include dependency graph for DiskOutputLocal.cxx:

Go to the source code of this file.

Functions

 ClassImp (SH::DiskOutputLocal) namespace SH
 

Function Documentation

◆ ClassImp()

ClassImp ( SH::DiskOutputLocal  )
Author
Nils Krumnack

Definition at line 22 of file DiskOutputLocal.cxx.

25 {
26  void DiskOutputLocal ::
27  testInvariant () const
28  {
29  RCU_INVARIANT (!m_prefix.empty());
30  }
31 
32 
33 
34  DiskOutputLocal ::
35  DiskOutputLocal ()
36  : m_prefix ("/ThisIsANonExistantPath")
37  {
38  RCU_NEW_INVARIANT (this);
39  }
40 
41 
42 
43  DiskOutputLocal ::
44  DiskOutputLocal (const std::string& val_prefix)
45  : m_prefix (val_prefix)
46  {
47  RCU_NEW_INVARIANT (this);
48  }
49 
50 
51 
52  std::unique_ptr<DiskWriter> DiskOutputLocal ::
53  doMakeWriter (const std::string& sampleName,
54  const std::string& segmentName,
55  const std::string& suffix) const
56  {
57  RCU_READ_INVARIANT (this);
58  return std::make_unique<DiskWriterLocal>
59  (targetURL (sampleName, segmentName, suffix));
60  }
61 
62 
63 
64  std::string DiskOutputLocal ::
65  getTargetURL (const std::string& sampleName,
66  const std::string& segmentName,
67  const std::string& suffix) const
68  {
69  RCU_READ_INVARIANT (this);
70  std::ostringstream file;
71  file << m_prefix;
72  if (m_prefix.back() != '-')
73  file << "/";
74  file << sampleName;
75  if (!segmentName.empty())
76  file << "-" << segmentName;
77  file << suffix;
78  return file.str();
79  }
80 }
hotSpotInTAG.suffix
string suffix
Definition: hotSpotInTAG.py:186
file
TFile * file
Definition: tile_monitor.h:29
RCU_INVARIANT
#define RCU_INVARIANT(x)
Definition: Assert.h:201
RCU_READ_INVARIANT
#define RCU_READ_INVARIANT(x)
Definition: Assert.h:229
RCU_NEW_INVARIANT
#define RCU_NEW_INVARIANT(x)
Definition: Assert.h:233