ATLAS Offline Software
Loading...
Searching...
No Matches
TauDetailsContainerCnv_p1.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3*/
4
5// @file TauDetailsContainerCnv_p1.cxx
18
25
32
36
38 const Analysis::TauDetailsContainer *transVect,
39 TauDetailsContainer_p1 *persVect,
40 MsgStream &msg )
41{
43 persVect->clear();
44 persVect->reserve( transVect->size() );
46 it != transVect->end(); ++it ) {
47 if (dynamic_cast<const Analysis::TauRecDetails *>(*it)!=0) continue;
48 if (dynamic_cast<const Analysis::TauRecExtraDetails*>(*it)!=0) continue;
49 if (dynamic_cast<const Analysis::Tau1P3PDetails*>(*it)!=0) continue;
50 if (dynamic_cast<const Analysis::Tau1P3PExtraDetails*>(*it)!=0) continue;
51 persVect->push_back(
53 &cnv, *it, msg ) );
54 }
55}
56
58 const TauDetailsContainer_p1 *persVect,
60 MsgStream &msg )
61{
63 transVect->clear();
64 transVect->reserve( persVect->size() );
65 for( TauDetailsContainer_p1 :: const_iterator it = persVect->begin();
66 it != persVect->end(); ++it )
67 {
68 // Bleh --- the list of converters was reordered at one point,
69 // a Thing One Should Never Do.
70 // Try to hack around this.
71 TPObjRef ref = *it;
72 ITPConverter* cnvtest = nullptr;
73 cnvtest = converterForRef (cnvtest, ref, msg);
74 if (dynamic_cast<TauShotCnv_p1*>(cnvtest)) {
75 unsigned short tlid = ref.topLevelCnvID();
76 unsigned short cnvid = (ref.typeID() & 0xffff);
77 ref = TPObjRef (TPObjRef::typeID_t(tlid, cnvid+1), ref.index());
78 }
79
80 transVect->push_back(
82 &cnv, ref, msg ) );
83 }
84}
const boost::regex ref(r_ef)
TPConverterBase< TRANS, PERS > T_AthenaPoolTPCnvBase
DEPRECATED DO NOT USE.
DEPRECATED DO NOT USE.
Definition of transient<->persistent converter for Analysis::TauDetailsContainer.
DEPRECATED DO NOT USE.
DEPRECATED DO NOTT USE.
DEPRECATED DO NOT USE - MIGRATE TO TauCommonDetails Basic details class containing information produc...
DEPRECATED DO NOT USE - MIGRATE TO TauCommonDetails Extended details class containing information pro...
DEPRECATED DO NOT USE - MIGRATE TO TauCommonDetails Basic details class containing information produc...
DEPRECATED DO NOT USE - MIGRATE TO TauCommonDetails Extended details class containing information pro...
DataModel_detail::const_iterator< DataVector > const_iterator
Definition DataVector.h:838
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.
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
size_type size() const noexcept
Returns the number of elements in the collection.
void clear()
Erase all the elements in the collection.
Common base class for all TP converters, specialized for a given transient type.
Definition TPConverter.h:37
CNV * converterForRef(CNV *cnv, const TPObjRef &ref, MsgStream &log) const
Definition TPConverter.h:74
CNV::Trans_t * createTransFromPStore(CNV **cnv, const TPObjRef &ref, MsgStream &log) const
TPObjRef toPersistent(CNV **cnv, const typename CNV::TransBase_t *transObj, MsgStream &log) const
Base interface class for all TP converters - typeless.
This class is an object reference used in Athena persistent data model.
Definition TPObjRef.h:20
virtual ~TauDetailsContainerCnv_p1()
Destructor.
virtual void transToPers(const Analysis::TauDetailsContainer *transVect, TauDetailsContainer_p1 *persVect, MsgStream &msg)
Creates persistent object from transient object.
virtual void persToTrans(const TauDetailsContainer_p1 *persVect, Analysis::TauDetailsContainer *transVect, MsgStream &msg)
Creates transient object from persistent object.
Transient Persistent converter version 1 for TauShot.
The namespace of all packages in PhysicsAnalysis/JetTagging.
This structure holds an ID of a persistent type.
Definition TPObjRef.h:31
MsgStream & msg
Definition testRead.cxx:32