37 Base_t::operator=( rhs );
54 msg << MSG::DEBUG <<
"Loading McEventCollection from persistent state..."
61 datapool.
evt.reserve ( 20 );
62 datapool.
vtx.reserve ( 1000 );
63 datapool.
part.reserve( 1000 );
69 const std::size_t nEvts = persObj->size();
70 if ( datapool.
evt.capacity() - datapool.
evt.allocated() < nEvts ) {
71 datapool.
evt.reserve( datapool.
evt.allocated() + nEvts );
74 for (
const auto & persEvt : *persObj) {
81 msg << MSG::DEBUG <<
"Loaded McEventCollection from persistent state [OK]"
89 msg << MSG::DEBUG <<
"Creating persistent state of McEventCollection..."
93 <<
"This transient-to-persistent converter method has been RETIRED !!"
95 <<
"You are not supposed to end-up here ! Go away !"
98 throw std::runtime_error(
"Retired McEventCollectionCnv_p1::transToPers() !!" );
void reserve(size_type n)
Attempt to preallocate enough memory for a specified number of elements.
value_type push_back(value_type pElem)
Add an element to the end of the collection.
void clear()
Erase all the elements in the collection.
virtual void persToTrans(const GenEvent_p1 *persObj, HepMC::GenEvent *transObj, MsgStream &msg)
Destructor:
void setDataPool(HepMC::DataPool *pool)
reset the @ HepMC::DataPool pointer
McEventCollectionCnv_p1()
Default constructor:
virtual ~McEventCollectionCnv_p1()
Destructor.
T_AthenaPoolTPCnvBase< McEventCollection, McEventCollection_p1 > Base_t
virtual void persToTrans(const McEventCollection_p1 *persObj, McEventCollection *transObj, MsgStream &msg)
Method creating the transient representation of McEventCollection from its persistent representation ...
virtual void transToPers(const McEventCollection *transObj, McEventCollection_p1 *persObj, MsgStream &msg)
Method creating the persistent representation McEventCollection_p1 from its transient representation ...
McEventCollectionCnv_p1 & operator=(const McEventCollectionCnv_p1 &rhs)
Assignement operator.
This defines the McEventCollection, which is really just an ObjectVector of McEvent objectsFile: Gene...
HepMC3::GenEvent GenEvent
@ VIEW_ELEMENTS
this data object is a view, it does not own its elmts
::DataPool< HepMC::GenEvent, ClearGenEvent > evt
::DataPool< HepMC::GenParticle, ClearGenParticle > part
HepMC::GenEvent * getGenEvent()
::DataPool< HepMC::GenVertex, ClearGenVertex > vtx