Commit 045131ff authored by Jochen Meyer's avatar Jochen Meyer Committed by Graeme Stewart
Browse files

addressing coverity defect (MuonEventAthenaPool-00-28-06)

        * addressing coverity defect 13010 (follow up)
        * MuonEventAthenaPool-00-28-06

2014-12-05 Jochen.Meyer@cern.ch
        * fixing coverity defects 12997, 12342, 13002, 13004, 13006-7, 13010, 13065
        * MuonEventAthenaPool-00-28-05

2014-11-29  Stefania Spagnolo  <Stefania.Spagnolo@le.infn.it>

        * MuonEventAthenaPool-00-28-04 - cache compatible change
	* src/RpcPadContainerCnv_p2.h,cxx : new  data member (padhashmax)  whose value is filled
	init time (using the cabling info) to fix a long standing hard-coded  value 404 now too small for run2 setup
parent b584f052
......@@ -23,8 +23,8 @@ public:
// Default constructor
CscRawDataCollection_p1 () :
m_id(0), m_numSamples(0), m_latency(0),
m_numDPU(0), m_rate(0)
m_id(0), m_rodId(0), m_subDetectorId(0), m_numSamples(0),
m_latency(0), m_numDPU(0), m_rate(0)
{ }
......
......@@ -19,7 +19,7 @@ class CscRawData_p0
{
public:
CscRawData_p0 () {}
CscRawData_p0 () : m_address(0), m_dpuID(0), m_id(0) {}
virtual ~CscRawData_p0() {}
void setDpuID (uint16_t dpuID) { m_dpuID = dpuID; }
......
......@@ -17,7 +17,7 @@ class MdtCsm_p1 : public std::vector<MdtAmtHit_p1>
{
public:
friend class MdtCsmCnv_p1;
MdtCsm_p1() : m_Id(0), m_SubDetId(0), m_MrodId(0), m_CsmId(0) {}
MdtCsm_p1() : m_Id(0), m_idHash(0), m_SubDetId(0), m_MrodId(0), m_CsmId(0) {}
private:
......
......@@ -16,7 +16,7 @@ public:
friend class RpcFiredChannelCnv_p1;
/** Default constructor.*/
RpcFiredChannel_p1(){}
RpcFiredChannel_p1() : m_bcid(0), m_time(0), m_ijk(0), m_channel(0), m_ovl(0), m_thr(0) {}
/** return bunch crossing id*/
uint16_t bcid() const { return m_bcid; }
......
......@@ -16,7 +16,7 @@ class RpcPad_p1 : public std::vector<RpcCoinMatrix_p1> {
public:
/** Default constructor*/
RpcPad_p1 () : m_id(0), m_onlineId(0), m_status(0), m_errorCode(0), m_sector(0)
RpcPad_p1 () : m_id(0), m_idHash(0), m_onlineId(0), m_status(0), m_errorCode(0), m_sector(0)
{}
/** virtual destructor for persistency*/
......
......@@ -25,7 +25,7 @@ class RpcPadContainerCnv_p1 : public T_AthenaPoolTPCnvBase< RpcPadContainer, Rpc
public:
typedef RpcPadContainer_p1 PERS;
typedef RpcPadContainer TRANS;
RpcPadContainerCnv_p1(): m_isInitialized(false), m_errorCount(0), m_maxNumberOfErrors(10) {}
RpcPadContainerCnv_p1(): m_rpcCabling(0), m_isInitialized(false), m_errorCount(0), m_maxNumberOfErrors(10) {}
virtual void persToTrans(const PERS* persCont, TRANS* transCont, MsgStream &log);
virtual void transToPers(const TRANS* transCont, PERS* persCont, MsgStream &log);
virtual RpcPadContainer* createTransient(const RpcPadContainer_p1* persObj, MsgStream& log);
......
......@@ -57,7 +57,9 @@ StatusCode RpcPadContainerCnv_p2::initialize(MsgStream &log) {
return StatusCode::FAILURE;
}
else {
if (log.level() <= MSG::VERBOSE) log <<MSG::VERBOSE << " RPCcablingSvc obtained " << endreq;
m_padhashmax = m_rpcCabling->padHashFunction()->max();
if (log.level() <= MSG::INFO) log <<MSG::INFO << " RPCcablingSvc obtained - hashmax = "<<m_padhashmax << endreq;
// if (log.level() <= MSG::VERBOSE) log <<MSG::VERBOSE << " RPCcablingSvc obtained " << endreq;
}
if (log.level() <= MSG::DEBUG) log << MSG::DEBUG << "Converter initialized." << endreq;
......@@ -128,7 +130,8 @@ RpcPadContainer* RpcPadContainerCnv_p2::createTransient(const RpcPadContainer_p2
// log<<MSG::INFO<<"creating new pad container with hashmax= "<<m_rpcCabling->padHashFunction()->max()<<endreq;
// std::auto_ptr<RpcPadContainer> trans(new RpcPadContainer(m_rpcCabling->padHashFunction()->max() ));
std::auto_ptr<RpcPadContainer> trans(new RpcPadContainer(404 )) ; // hardcoded number from above. FIXME!
// std::auto_ptr<RpcPadContainer> trans(new RpcPadContainer(404 )) ; // hardcoded number from above. FIXME!
std::auto_ptr<RpcPadContainer> trans(new RpcPadContainer(m_padhashmax)) ; // hardcoded number from above. FIXME!
persToTrans(persObj, trans.get(), log);
return(trans.release());
......
......@@ -25,7 +25,7 @@ class RpcPadContainerCnv_p2 : public T_AthenaPoolTPCnvBase< RpcPadContainer, Rpc
public:
typedef RpcPadContainer_p2 PERS;
typedef RpcPadContainer TRANS;
RpcPadContainerCnv_p2(): m_isInitialized(false), m_errorCount(0), m_maxNumberOfErrors(10) {}
RpcPadContainerCnv_p2(): m_rpcCabling(0), m_isInitialized(false), m_padhashmax(0), m_errorCount(0), m_maxNumberOfErrors(10) {}
virtual void persToTrans(const PERS* persCont, TRANS* transCont, MsgStream &log);
virtual void transToPers(const TRANS* transCont, PERS* persCont, MsgStream &log);
virtual RpcPadContainer* createTransient(const RpcPadContainer_p2* persObj, MsgStream& log);
......@@ -34,6 +34,7 @@ private:
const IRPCcablingSvc *m_rpcCabling;
bool m_isInitialized;
unsigned int m_padhashmax;
unsigned int m_errorCount;
unsigned int m_maxNumberOfErrors;
};
......
......@@ -161,14 +161,15 @@ void RpcSectorLogicContainerCnv_p1::persToTrans(const RpcSectorLogicContainer_p
rsl->resize(numRpcSLTriggerHits);
for (unsigned int th=0; th<numRpcSLTriggerHits; th++){
//std::cout<<"begin th "<<th<<", index="<<index<<std::endl;
(*rsl)[th]=new RpcSLTriggerHit(persCont->m_slVariables[index++], //rowinBcid
persCont->m_slVariables[index++], //padid
persCont->m_slVariables[index++], //ptid
persCont->m_slVariables[index++], //roi
persCont->m_slVariables[index++],//outerPlane
persCont->m_slVariables[index++],//overlapPhi
persCont->m_slVariables[index++],//overlapEta
persCont->m_slVariables[index++]);//triggerBcid
(*rsl)[th]=new RpcSLTriggerHit(persCont->m_slVariables[index], //rowinBcid
persCont->m_slVariables[index+1], //padid
persCont->m_slVariables[index+2], //ptid
persCont->m_slVariables[index+3], //roi
persCont->m_slVariables[index+4],//outerPlane
persCont->m_slVariables[index+5],//overlapPhi
persCont->m_slVariables[index+6],//overlapEta
persCont->m_slVariables[index+7]);//triggerBcid
index+=8;
(*rsl)[th]->m_isInput = static_cast<bool>(persCont->m_slVariables[index++]);
//std::cout<<"end th "<<th<<", index="<<index<<std::endl;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment