ATLAS Offline Software
Functions
TrigSerialization Namespace Reference

Functions

template<class DATA >
DATA * prepareForWrite (DATA *d, std::unique_ptr< DATA > &)
 Called before serializing an object to BS. More...
 
template<class DV >
ViewVector< DV > * prepareForWrite (ViewVector< DV > *d, std::unique_ptr< ViewVector< DV > > &holder)
 Called before serializing an object to BS. More...
 
template<class DATA >
DATA * finishRead (DATA *d)
 Called after an object has been read from BS. More...
 
template<class DV >
ViewVector< DV > *finishRead NO_SANITIZE_UNDEFINED (ViewVector< DV > *d)
 Called after an object has been read from BS. More...
 

Function Documentation

◆ finishRead()

template<class DATA >
DATA* TrigSerialization::finishRead ( DATA *  d)

Called after an object has been read from BS.

Parameters
dThe object read.

This generic version simply returns the input object unaltered.

Definition at line 105 of file TrigSerializeConverter.h.

106 {
107  return d;
108 }

◆ NO_SANITIZE_UNDEFINED()

template<class DV >
ViewVector<DV>* finishRead TrigSerialization::NO_SANITIZE_UNDEFINED ( ViewVector< DV > *  d)

Called after an object has been read from BS.

Parameters
dThe object read.

This version is specialized for ViewVector. It handles schema evolution and clears the persistent data.

Definition at line 119 of file TrigSerializeConverter.h.

120 {
121  // In the case of schema evolution, we'll actually get a
122  // @c ViewVector for a different _v type.
123  if (typeid(*d) != typeid(ViewVector<DV>)) {
124  auto d2 = std::make_unique<ViewVector<DV> > (*d);
125  delete d;
126  d = d2.release();
127  // root read rule doesn't do anything in this case.
128  d->toTransient();
129  }
130  d->clearPersistent();
131  return d;
132 }

◆ prepareForWrite() [1/2]

template<class DATA >
DATA* TrigSerialization::prepareForWrite ( DATA *  d,
std::unique_ptr< DATA > &   
)

Called before serializing an object to BS.

Parameters
dThe object being serialized.
holderA unique_ptr to hold a newly-created object.

This generic version simply returns the input object unaltered.

Definition at line 72 of file TrigSerializeConverter.h.

73 {
74  return d;
75 }

◆ prepareForWrite() [2/2]

template<class DV >
ViewVector<DV>* TrigSerialization::prepareForWrite ( ViewVector< DV > *  d,
std::unique_ptr< ViewVector< DV > > &  holder 
)

Called before serializing an object to BS.

Parameters
dThe object being serialized.
holderA unique_ptr to hold a newly-created object.

This version is specialized for ViewVector. A copy of the object is made, and setClearOnPersistent called on the copy. The copy is returned, as well as being assigned to the unique_ptr so that it will get deleted after serialization.

Definition at line 89 of file TrigSerializeConverter.h.

91 {
92  holder = std::make_unique<ViewVector<DV> > (*d);
93  holder->setClearOnPersistent();
94  return holder.get();
95 }
hist_file_dump.d
d
Definition: hist_file_dump.py:137
ViewVector
Identify view containers to be made persistent.
Definition: ViewVector.h:67
dq_defect_virtual_defect_validation.d2
d2
Definition: dq_defect_virtual_defect_validation.py:81