ATLAS Offline Software
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 
10 void 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 
30 void 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 }
TrigMuonEFInfo::setPhiPreviousLevel
void setPhiPreviousLevel(double thePhiPreviousLevel)
Definition: TrigMuonEFInfo.cxx:261
TrigMuonEFInfo_p5::m_trackContainer
TPObjRef m_trackContainer
Definition: TrigMuonEFInfo_p5.h:63
TrigMuonEFInfo::RoINum
unsigned short int RoINum() const
Definition: TrigMuonEFInfo.h:86
TrigMuonEFInfoCnv_p5.h
TrigMuonEFInfo::NTgcHits
unsigned short int NTgcHits() const
Definition: TrigMuonEFInfo.h:90
TrigMuonEFInfo::setNMdtHits
void setNMdtHits(unsigned short int theNMdtHits)
Definition: TrigMuonEFInfo.cxx:231
TrigMuonEFInfo_p5
Definition: TrigMuonEFInfo_p5.h:26
TrigMuonEFInfo_p5::m_etaPreviousLevel
float m_etaPreviousLevel
Definition: TrigMuonEFInfo_p5.h:56
TrigMuonEFInfo::setNCscHits
void setNCscHits(unsigned short int theNCscHits)
Definition: TrigMuonEFInfo.cxx:249
TrigMuonEFInfo_p5.h
TrigMuonEFInfo::NSegments
unsigned short int NSegments() const
Definition: TrigMuonEFInfo.h:87
TrigMuonEFInfo::NRpcHits
unsigned short int NRpcHits() const
Definition: TrigMuonEFInfo.h:89
TrigMuonEFInfo::EtaPreviousLevel
double EtaPreviousLevel() const
Definition: TrigMuonEFInfo.h:92
TrigMuonEFInfoCnv_p5::m_trackContainerCnv
ITPConverterFor< TrigMuonEFInfoTrackContainer > * m_trackContainerCnv
Definition: TrigMuonEFInfoCnv_p5.h:51
TrigMuonEFInfo::NCscHits
unsigned short int NCscHits() const
Definition: TrigMuonEFInfo.h:91
TrigMuonEFInfo.h
TrigMuonEFInfo::setNRpcHits
void setNRpcHits(unsigned short int theNRpcHits)
Definition: TrigMuonEFInfo.cxx:237
TrigMuonEFInfo_p5::m_allTheInts
unsigned short int m_allTheInts[6]
Definition: TrigMuonEFInfo_p5.h:54
TrigMuonEFInfoCnv_p5::transToPers
virtual void transToPers(const TrigMuonEFInfo *transObj, TrigMuonEFInfo_p5 *persObj, MsgStream &log)
Definition: TrigMuonEFInfoCnv_p5.cxx:30
TrigMuonEFInfoCnv_p5::persToTrans
virtual void persToTrans(const TrigMuonEFInfo_p5 *persObj, TrigMuonEFInfo *transObj, MsgStream &log)
Definition: TrigMuonEFInfoCnv_p5.cxx:10
ITPConverterFor::toPersistent
TPObjRef toPersistent(CNV **cnv, const typename CNV::TransBase_t *transObj, MsgStream &log) const
Persistify an object and store the persistent represenation in the storage vector of the top-level pe...
Definition: TPConverter.h:119
TrigMuonEFInfo::setNTgcHits
void setNTgcHits(unsigned short int theNTgcHits)
Definition: TrigMuonEFInfo.cxx:243
TrigMuonEFInfo::setNSegments
void setNSegments(unsigned short int theNSegments)
Definition: TrigMuonEFInfo.cxx:224
TrigMuonEFInfo_p5::m_phiPreviousLevel
float m_phiPreviousLevel
Definition: TrigMuonEFInfo_p5.h:57
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
TrigMuonEFInfo::setEtaPreviousLevel
void setEtaPreviousLevel(double theEtaPreviousLevel)
Definition: TrigMuonEFInfo.cxx:255
TrigMuonEFInfo::TrackContainer
const TrigMuonEFInfoTrackContainer * TrackContainer() const
Definition: TrigMuonEFInfo.h:94
TrigMuonEFInfo::PhiPreviousLevel
double PhiPreviousLevel() const
Definition: TrigMuonEFInfo.h:93
TrigMuonEFInfo
Definition: TrigMuonEFInfo.h:24
TrigMuonEFInfo::NMdtHits
unsigned short int NMdtHits() const
Definition: TrigMuonEFInfo.h:88
ITPConverterFor::createTransFromPStore
CNV::Trans_t * createTransFromPStore(CNV **cnv, const TPObjRef &ref, MsgStream &log) const
Create transient representation of a persistent object, stored in the the top-level persistent object...
Definition: TPConverter.h:172