ATLAS Offline Software
Loading...
Searching...
No Matches
TrigMuonEFInfoCnv_p5.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3*/
4
8
9
10void TrigMuonEFInfoCnv_p5::persToTrans(const TrigMuonEFInfo_p5* persObj, TrigMuonEFInfo* transObj, MsgStream &log) {
11 // std::cout << "TrigMuonEFInfoCnv_p5::persToTrans called " << std::endl;
12
13 // track container
14 std::unique_ptr<TrigMuonEFInfoTrackContainer> tracks
16
17 *transObj = TrigMuonEFInfo (persObj->m_allTheInts[0],
18 std::move (tracks));
19 transObj->setNSegments (persObj->m_allTheInts[1]);
20 transObj->setNMdtHits (persObj->m_allTheInts[2]);
21 transObj->setNRpcHits (persObj->m_allTheInts[3]);
22 transObj->setNTgcHits (persObj->m_allTheInts[4]);
23 transObj->setNCscHits (persObj->m_allTheInts[5]);
24
25 transObj->setEtaPreviousLevel (persObj->m_etaPreviousLevel);
26 transObj->setPhiPreviousLevel (persObj->m_phiPreviousLevel);
27}
28
29
30void TrigMuonEFInfoCnv_p5::transToPers(const TrigMuonEFInfo* transObj, TrigMuonEFInfo_p5* persObj, MsgStream &log) {
31 // std::cout << "TrigMuonEFInfoCnv_p3::transToPers called " << std::endl;
32
33 persObj->m_allTheInts[0] = transObj->RoINum();
34 persObj->m_allTheInts[1] = transObj->NSegments();
35 persObj->m_allTheInts[2] = transObj->NMdtHits();
36 persObj->m_allTheInts[3] = transObj->NRpcHits();
37 persObj->m_allTheInts[4] = transObj->NTgcHits();
38 persObj->m_allTheInts[5] = transObj->NCscHits();
39
40 persObj->m_etaPreviousLevel = transObj->EtaPreviousLevel();
41 persObj->m_phiPreviousLevel = transObj->PhiPreviousLevel();
42
43 // check for legacy
44 // if (transObj->hasLegacyTrack()) {
45 // std::cout << "TrigMuonEFInfoCnv_p3::transToPers: has legacy track " << std::endl;
46 // // has a legacy track.this situation occurs if old BS files are read.
47 // // make a tmp track container to safeguard const correctness of transObj.
48 // TrigMuonEFInfoTrackContainer * tmpTrkCont = new TrigMuonEFInfoTrackContainer();
49 // TrigMuonEFInfoTrack * tmpTrack = new TrigMuonEFInfoTrack();
50 // TrigMuonEFTrack * tmpSpecTrack = new TrigMuonEFTrack( *(transObj->legacySpectrometerTrack()) );
51 // TrigMuonEFTrack * tmpExtrTrack = new TrigMuonEFTrack( *(transObj->legacyExtrapolatedTrack()) );
52 // TrigMuonEFCbTrack * tmpCbTrack = new TrigMuonEFCbTrack( *(transObj->legacyCombinedTrack()) );
53 //
54 // tmpTrack->setSpectrometerTrack( tmpSpecTrack );
55 // tmpTrack->setExtrapolatedTrack( tmpExtrTrack );
56 // tmpTrack->setCombinedTrack( tmpCbTrack );
57 //
58 // tmpTrkCont->push_back( tmpTrack );
59 //
60 // // persistify the tmp track container
61 // persObj->m_trackContainer = toPersistent( &m_trackContainerCnv, tmpTrkCont, log);
62 //
63 // // clean up
64 // delete tmpTrkCont;
65 // }
66 // else {
68 // }
69
70}
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
ITPConverterFor< TrigMuonEFInfoTrackContainer > * m_trackContainerCnv
virtual void transToPers(const TrigMuonEFInfo *transObj, TrigMuonEFInfo_p5 *persObj, MsgStream &log)
virtual void persToTrans(const TrigMuonEFInfo_p5 *persObj, TrigMuonEFInfo *transObj, MsgStream &log)
unsigned short int m_allTheInts[6]
void setNMdtHits(unsigned short int theNMdtHits)
unsigned short int NTgcHits() const
void setNRpcHits(unsigned short int theNRpcHits)
unsigned short int NCscHits() const
unsigned short int NMdtHits() const
unsigned short int NRpcHits() const
void setPhiPreviousLevel(double thePhiPreviousLevel)
void setNSegments(unsigned short int theNSegments)
unsigned short int RoINum() const
const TrigMuonEFInfoTrackContainer * TrackContainer() const
void setEtaPreviousLevel(double theEtaPreviousLevel)
unsigned short int NSegments() const
void setNTgcHits(unsigned short int theNTgcHits)
double EtaPreviousLevel() const
void setNCscHits(unsigned short int theNCscHits)
double PhiPreviousLevel() const