ATLAS Offline Software
MissingEtRegionsCnv_p2.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 /********************************************************************
6 
7 NAME: MissingEtRegionsCnv_p2.cxx
8 PACKAGE: offline/Reconstruction/RecTPCnv
9 
10 PURPOSE: Transient/Persisten converter for MissingEtRegions class
11 ********************************************************************/
12 
13 
14 // STL includes
15 
16 // AthenaPoolCnvSvc includes
18 
19 // MissingETEvent includes
21 
22 // RecTPCnv includes
24 
25 //#include <stdlib.h>
26 #include <algorithm>
27 
29 // methods:
31 // not used for now since there is no request to store it standalone.
32 void MissingEtRegionsCnv_p2::persToTrans( const MissingEtRegions_p2* /* pers */, MissingEtRegions* /*trans*/, MsgStream& /*msg*/ ) const {
33  return;
34 }
35 
36 // not used for now since there is no request to store it standalone.
37 void MissingEtRegionsCnv_p2::transToPers( const MissingEtRegions* /*trans*/, MissingEtRegions_p2* /*pers*/, MsgStream& /*msg*/ ) const {
38  return;
39 }
40 
41 
42 void MissingEtRegionsCnv_p2::persToTrans( MissingEtRegions* trans, std::vector<float>::const_iterator i ) const {
43 
44  trans->setExRegVec (std::vector<double> (i, i+3)); i += 3;
45  trans->setEyRegVec (std::vector<double> (i, i+3)); i += 3;
46  trans->setEtSumRegVec (std::vector<double> (i, i+3)); i += 3;
47 
48  // std::cout<<"READING: ex: "<<trans->m_exReg[0]<<"\t et: "<<trans->m_etReg[2]<<std::endl;
49  return;
50 }
51 
52 // always adding at the end of the vector
53 void MissingEtRegionsCnv_p2::transToPers( const MissingEtRegions* trans, std::vector<float> &all ) const {
54  all.push_back(trans->exReg(static_cast<MissingEtRegions::RegionIndex>(0)));
55  all.push_back(trans->exReg(static_cast<MissingEtRegions::RegionIndex>(1)));
56  all.push_back(trans->exReg(static_cast<MissingEtRegions::RegionIndex>(2)));
57  all.push_back(trans->eyReg(static_cast<MissingEtRegions::RegionIndex>(0)));
58  all.push_back(trans->eyReg(static_cast<MissingEtRegions::RegionIndex>(1)));
59  all.push_back(trans->eyReg(static_cast<MissingEtRegions::RegionIndex>(2)));
60  all.push_back(trans->etSumReg(static_cast<MissingEtRegions::RegionIndex>(0)));
61  all.push_back(trans->etSumReg(static_cast<MissingEtRegions::RegionIndex>(1)));
62  all.push_back(trans->etSumReg(static_cast<MissingEtRegions::RegionIndex>(2)));
63  // std::cout<<"WRITING: ex: "<<trans->m_exReg[0]<<"\t et: "<<trans->m_etReg[2]<<std::endl;
64  return;
65 }
66 
MissingEtRegions
Definition: MissingEtRegions.h:22
MissingEtRegions::setExRegVec
void setExRegVec(std::vector< double > &&exVec)
Definition: MissingEtRegions.cxx:114
MissingEtRegionsCnv_p2.h
MissingEtRegionsCnv_p2::transToPers
virtual void transToPers(const MissingEtRegions *transObj, MissingEtRegions_p2 *persObj, MsgStream &msg) const override
Definition: MissingEtRegionsCnv_p2.cxx:37
MissingEtRegionsCnv_p2::persToTrans
virtual void persToTrans(const MissingEtRegions_p2 *persObj, MissingEtRegions *transObj, MsgStream &msg) const override
Definition: MissingEtRegionsCnv_p2.cxx:32
MissingEtRegions::etSumReg
double etSumReg(RegionIndex aRegion) const
Definition: MissingEtRegions.cxx:147
lumiFormat.i
int i
Definition: lumiFormat.py:85
T_AthenaPoolTPConverter.h
MissingEtRegions_p2
Definition: MissingEtRegions_p2.h:22
MissingEtRegions.h
MissingEtRegions::exReg
double exReg(RegionIndex aRegion) const
Definition: MissingEtRegions.cxx:137
Cut::all
@ all
Definition: SUSYToolsAlg.cxx:67
MissingEtRegions::setEyRegVec
void setEyRegVec(std::vector< double > &&eyVec)
Definition: MissingEtRegions.cxx:121
MissingEtRegions::setEtSumRegVec
void setEtSumRegVec(std::vector< double > &&etSumVec)
Definition: MissingEtRegions.cxx:128
MissingEtRegions::eyReg
double eyReg(RegionIndex aRegion) const
Definition: MissingEtRegions.cxx:142
MissingEtRegions::RegionIndex
RegionIndex
Definition: MissingEtRegions.h:38