ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
Placement Class Reference

This class holds all the necessary information to guide the writing of an object in a physical place. More...

#include <Placement.h>

Collaboration diagram for Placement:

Public Member Functions

 Placement ()
 Default Constructor. More...
 
 Placement (const std::string &fileName, const std::string &containerName, long technology)
 Constructor with initialization. More...
 
const std::string & fileName () const
 Access file name. More...
 
PlacementsetFileName (const std::string &fileName)
 Set file name. More...
 
const std::string & containerName () const
 Access container name. More...
 
PlacementsetContainerName (const std::string &containerName)
 Set container name. More...
 
int technology () const
 Access technology type. More...
 
PlacementsetTechnology (int technology)
 Set technology type. More...
 
const std::string & auxString () const
 Access auxiliary string. More...
 
PlacementsetAuxString (const std::string &auxString)
 Set auxiliary string. More...
 
const std::string toString () const
 Retrieve the string representation of the placement. More...
 
PlacementfromString (const std::string &from)
 Build from the string representation of a placement. More...
 

Private Attributes

long unsigned m_technology
 Technology identifier. More...
 
std::string m_fileName
 File name. More...
 
std::string m_containerName
 Container name. More...
 
std::string m_auxString
 Auxiliary string. More...
 

Detailed Description

This class holds all the necessary information to guide the writing of an object in a physical place.

Definition at line 19 of file Placement.h.

Constructor & Destructor Documentation

◆ Placement() [1/2]

Placement::Placement ( )

Default Constructor.

Definition at line 12 of file Placement.cxx.

12  : m_technology(0L), m_fileName(""), m_containerName("") {
13 }

◆ Placement() [2/2]

Placement::Placement ( const std::string &  fileName,
const std::string &  containerName,
long  technology 
)

Constructor with initialization.

Member Function Documentation

◆ auxString()

const std::string& Placement::auxString ( ) const
inline

Access auxiliary string.

Definition at line 40 of file Placement.h.

40 { return m_auxString; }

◆ containerName()

const std::string& Placement::containerName ( ) const
inline

Access container name.

Definition at line 32 of file Placement.h.

32 { return m_containerName; }

◆ fileName()

const std::string& Placement::fileName ( ) const
inline

Access file name.

Definition at line 28 of file Placement.h.

28 { return m_fileName; }

◆ fromString()

Placement & Placement::fromString ( const std::string &  from)

Build from the string representation of a placement.

Definition at line 28 of file Placement.cxx.

28  {
29  for (const char* p1 = source.c_str(); p1; p1 = ::strchr(++p1,'[')) {
30  const char* p2 = ::strchr(p1, '=');
31  const char* p3 = ::strchr(p1, ']');
32  if (p2 != 0 && p3 != 0) {
33  if (::strncmp("[FILE=", p1, 6) == 0) {
34  m_fileName.assign (p2+1, p3-p2-1);
35  } else if (::strncmp("[CONT=", p1, 6) == 0) {
36  m_containerName.assign (p2+1, p3-p2-1);
37  } else if (::strncmp(fmt_tech, p1, 6) == 0) {
38  ::sscanf(p1, fmt_tech, &m_technology);
39  } else {
40  while (*(p2 + 1) == '[' && p3 && *(++p3) != 0 && *p3 != ']') {
41  p3 = ::strchr(p3, ']');
42  }
43  if (!p3) p3 = source.c_str() + source.size();
44  m_auxString.append (p1, p3-p1);
45  m_auxString += ']';
46  }
47  }
48  }
49  return *this;
50 }

◆ setAuxString()

Placement& Placement::setAuxString ( const std::string &  auxString)
inline

Set auxiliary string.

Definition at line 42 of file Placement.h.

42 { m_auxString = auxString; return *this; }

◆ setContainerName()

Placement& Placement::setContainerName ( const std::string &  containerName)
inline

Set container name.

Definition at line 34 of file Placement.h.

34 { m_containerName = containerName; return *this; }

◆ setFileName()

Placement& Placement::setFileName ( const std::string &  fileName)
inline

Set file name.

Definition at line 30 of file Placement.h.

30 { m_fileName = fileName; return *this; }

◆ setTechnology()

Placement& Placement::setTechnology ( int  technology)
inline

Set technology type.

Definition at line 38 of file Placement.h.

38 { m_technology = technology; return *this; }

◆ technology()

int Placement::technology ( ) const
inline

Access technology type.

Definition at line 36 of file Placement.h.

36 { return m_technology; }

◆ toString()

const std::string Placement::toString ( ) const

Retrieve the string representation of the placement.

Definition at line 15 of file Placement.cxx.

15  {
16  char text[128];
17  int s = sprintf(text, fmt_tech, m_technology);
18  std::string str = "[FILE=";
19  str += m_fileName;
20  str += "][CONT=";
22  str += ']';
23  str.append(text, s);
24  str += m_auxString;
25  return str;
26 }

Member Data Documentation

◆ m_auxString

std::string Placement::m_auxString
private

Auxiliary string.

Definition at line 57 of file Placement.h.

◆ m_containerName

std::string Placement::m_containerName
private

Container name.

Definition at line 55 of file Placement.h.

◆ m_fileName

std::string Placement::m_fileName
private

File name.

Definition at line 53 of file Placement.h.

◆ m_technology

long unsigned Placement::m_technology
private

Technology identifier.

Definition at line 51 of file Placement.h.


The documentation for this class was generated from the following files:
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
Placement::containerName
const std::string & containerName() const
Access container name.
Definition: Placement.h:32
Placement::technology
int technology() const
Access technology type.
Definition: Placement.h:36
Placement::m_auxString
std::string m_auxString
Auxiliary string.
Definition: Placement.h:57
ParticleJetTools::p3
Amg::Vector3D p3(const xAOD::TruthVertex *p)
Definition: ParticleJetLabelCommon.cxx:55
Placement::m_containerName
std::string m_containerName
Container name.
Definition: Placement.h:55
Placement::m_fileName
std::string m_fileName
File name.
Definition: Placement.h:53
Placement::fileName
const std::string & fileName() const
Access file name.
Definition: Placement.h:28
Placement::auxString
const std::string & auxString() const
Access auxiliary string.
Definition: Placement.h:40
Placement::m_technology
long unsigned m_technology
Technology identifier.
Definition: Placement.h:51
python.CaloScaleNoiseConfig.str
str
Definition: CaloScaleNoiseConfig.py:78
makeTransCanvas.text
text
Definition: makeTransCanvas.py:11
str
Definition: BTagTrackIpAccessor.cxx:11