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

This class provides the converter to customize the saving of DataHeader_p5. More...

#include <DataHeaderCnv_p5.h>

Collaboration diagram for DataHeaderCnv_p5:

Public Member Functions

 DataHeaderCnv_p5 ()
 
 ~DataHeaderCnv_p5 ()
 
std::unique_ptr< DataHeadercreateTransient (const DataHeader_p5 &persObj, const DataHeaderForm_p5 &dhForm) const
 
void persToTrans (const DataHeader_p5 &pers, DataHeader &trans, const DataHeaderForm_p5 &dhForm) const
 
std::unique_ptr< DataHeader_p5createPersistent (const DataHeader &transObj, DataHeaderForm_p5 &dhForm) const
 
void transToPers (const DataHeader &trans, DataHeader_p5 &pers, DataHeaderForm_p5 &dhForm) const
 
void insertDHRef (DataHeader_p5 &pers, DataHeaderForm_p5 &dhForm, const std::string &key, const std::string &strToken) const
 

Private Attributes

DataHeaderElementCnv_p5 m_elemCnv
 

Detailed Description

This class provides the converter to customize the saving of DataHeader_p5.

Definition at line 42 of file DataHeaderCnv_p5.h.

Constructor & Destructor Documentation

◆ DataHeaderCnv_p5()

DataHeaderCnv_p5::DataHeaderCnv_p5 ( )

Definition at line 213 of file DataHeaderCnv_p5.cxx.

213 {}

◆ ~DataHeaderCnv_p5()

DataHeaderCnv_p5::~DataHeaderCnv_p5 ( )

Definition at line 214 of file DataHeaderCnv_p5.cxx.

214 {}

Member Function Documentation

◆ createPersistent()

std::unique_ptr< DataHeader_p5 > DataHeaderCnv_p5::createPersistent ( const DataHeader transObj,
DataHeaderForm_p5 dhForm 
) const
inline

Definition at line 79 of file DataHeaderCnv_p5.h.

81 {
82  auto pers = std::make_unique<DataHeader_p5>();
83  transToPers(transObj, *pers, dhForm);
84  return(pers);
85 }

◆ createTransient()

std::unique_ptr< DataHeader > DataHeaderCnv_p5::createTransient ( const DataHeader_p5 persObj,
const DataHeaderForm_p5 dhForm 
) const
inline

Definition at line 70 of file DataHeaderCnv_p5.h.

72 {
73  auto trans = std::make_unique<DataHeader>();
74  persToTrans(persObj, *trans, dhForm);
75  return(trans);
76 }

◆ insertDHRef()

void DataHeaderCnv_p5::insertDHRef ( DataHeader_p5 pers,
DataHeaderForm_p5 dhForm,
const std::string &  key,
const std::string &  strToken 
) const

Definition at line 261 of file DataHeaderCnv_p5.cxx.

265 {
266  Token* token = new Token;
267  token->fromString(strToken);
270  unsigned int entry = dhForm.size() + 1;
271  m_elemCnv.transToPers(tEle, pEle, dhForm, entry);
272  pers.m_dataHeader.push_back(pEle);
273 }

◆ persToTrans()

void DataHeaderCnv_p5::persToTrans ( const DataHeader_p5 pers,
DataHeader trans,
const DataHeaderForm_p5 dhForm 
) const

Definition at line 216 of file DataHeaderCnv_p5.cxx.

219 {
220  unsigned int entry = 1;
221  const unsigned int provSize = dhForm.params(entry)[0];
222  trans.m_inputDataHeader.resize(provSize);
224  std::vector<DataHeaderElement_p5>::const_iterator pit = pers.m_dataHeader.begin();
225  for (unsigned int i = 0U; i < provSize; ++i, ++it, ++pit) {
226  ++entry;
227  m_elemCnv.persToTrans(*pit, *it, dhForm, entry);
228  }
229  trans.m_dataHeader.resize(pers.m_dataHeader.size() - provSize);
230  it = trans.m_dataHeader.begin();
231  for (std::vector<DataHeaderElement_p5>::const_iterator last = pers.m_dataHeader.end();
232  pit != last; ++it, ++pit) {
233  ++entry;
234  m_elemCnv.persToTrans(*pit, *it, dhForm, entry);
235  }
237 }

◆ transToPers()

void DataHeaderCnv_p5::transToPers ( const DataHeader trans,
DataHeader_p5 pers,
DataHeaderForm_p5 dhForm 
) const

Definition at line 239 of file DataHeaderCnv_p5.cxx.

242 {
243  const unsigned int provSize = trans.m_inputDataHeader.size();
244  pers.m_dataHeader.resize(provSize + trans.m_dataHeader.size());
245  dhForm.resize(provSize + trans.m_dataHeader.size() + 2);
246  unsigned int entry = 1;
247  dhForm.insertParam(provSize, entry);
249  for (std::vector<DataHeaderElement>::const_iterator it = trans.m_inputDataHeader.begin(),
250  last = trans.m_inputDataHeader.end(); it != last; ++it, ++pit) {
251  ++entry;
252  m_elemCnv.transToPers(*it, *pit, dhForm, entry);
253  }
254  for (std::vector<DataHeaderElement>::const_iterator it = trans.m_dataHeader.begin(),
255  last = trans.m_dataHeader.end(); it != last; ++it, ++pit) {
256  ++entry;
257  m_elemCnv.transToPers(*it, *pit, dhForm, entry);
258  }
259 }

Member Data Documentation

◆ m_elemCnv

DataHeaderElementCnv_p5 DataHeaderCnv_p5::m_elemCnv
private

Definition at line 65 of file DataHeaderCnv_p5.h.


The documentation for this class was generated from the following files:
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
DataHeaderElementCnv_p5::transToPers
void transToPers(const DataHeaderElement &trans, DataHeaderElement_p5 &pers, DataHeaderForm_p5 &form, unsigned int entry) const
Definition: DataHeaderCnv_p5.cxx:99
DataHeader::Input
@ Input
Definition: DataHeader.h:126
skel.it
it
Definition: skel.GENtoEVGEN.py:396
DataHeaderForm_p5::resize
void resize(unsigned int size)
Definition: DataHeader_p5.cxx:65
Token
This class provides a token that identifies in a unique way objects on the persistent storage.
Definition: Token.h:21
DataHeaderForm_p5::params
const std::vector< unsigned int > & params(unsigned int entry) const
Definition: DataHeader_p5.cxx:53
Token::fromString
Token & fromString(const std::string &from)
Build from the string representation of a token.
Definition: Token.cxx:133
DataHeaderElement
This class provides a persistent form for the TransientAddress.
Definition: DataHeader.h:36
lumiFormat.i
int i
Definition: lumiFormat.py:85
DataHeader_p5::m_dataHeader
std::vector< DataHeaderElement_p5 > m_dataHeader
Definition: DataHeader_p5.h:84
DataHeaderForm_p5::size
unsigned int size() const
Definition: DataHeader_p5.cxx:61
ClassID_traits
Default, invalid implementation of ClassID_traits.
Definition: Control/AthenaKernel/AthenaKernel/ClassID_traits.h:40
GetAllXsec.entry
list entry
Definition: GetAllXsec.py:132
DataHeader::setStatus
void setStatus(statusFlag status)
Set StatusFlag enum for DataHeader.
Definition: DataHeader.cxx:235
DataHeader::m_dataHeader
std::vector< DataHeaderElement > m_dataHeader
vector with DataHeaderElement to "DataObject".
Definition: DataHeader.h:201
DataHeaderElement_p5
This class provides a persistent representation for the DataHeaderElement class.
Definition: DataHeader_p5.h:21
DataHeaderCnv_p5::persToTrans
void persToTrans(const DataHeader_p5 &pers, DataHeader &trans, const DataHeaderForm_p5 &dhForm) const
Definition: DataHeaderCnv_p5.cxx:216
DataHeaderForm_p5::insertParam
void insertParam(unsigned int param, unsigned int entry)
Definition: DataHeader_p5.cxx:57
DataHeaderCnv_p5::m_elemCnv
DataHeaderElementCnv_p5 m_elemCnv
Definition: DataHeaderCnv_p5.h:65
DataHeaderElementCnv_p5::persToTrans
void persToTrans(const DataHeaderElement_p5 &pers, DataHeaderElement &trans, const DataHeaderForm_p5 &form, unsigned int entry) const
Definition: DataHeaderCnv_p5.cxx:19
DataHeaderCnv_p5::transToPers
void transToPers(const DataHeader &trans, DataHeader_p5 &pers, DataHeaderForm_p5 &dhForm) const
Definition: DataHeaderCnv_p5.cxx:239
DataHeader::m_inputDataHeader
std::vector< DataHeaderElement > m_inputDataHeader
vector with DataHeaderElement to upstream DataHeader ("Provenance").
Definition: DataHeader.h:203
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37