ATLAS Offline Software
EventBookkeeperCnv_p2.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 // Implementation file for class EventBookkeeperCnv_p2
7 // Author: David Cote, July 2009 <david.cote@cern.ch>
9 
12 
15  pers->m_nAcceptedEvents = trans->getNAcceptedEvents();
16  pers->m_cycle = trans->getCycle();
17  pers->m_name = trans->getName();
18  pers->m_description = trans->getDescription();
19  pers->m_inputstream = trans->getInputStream();
20  pers->m_outputstream = trans->getOutputStream();
21  pers->m_logic = trans->getLogic();
22  //To fill children, create new EventBookkeeper_p2 and call transToPers iteratively
23  for(unsigned int i=0; i<trans->getChildrenEventBookkeepers()->size(); i++){
24  const EventBookkeeper* tmpTrans=trans->getChildrenEventBookkeepers()->at(i);
26  transToPers(tmpTrans,tmpPers,log);
27  if (!pers->m_childrenEB){ pers->m_childrenEB = new std::vector<EventBookkeeper_p2*>; }
28  pers->m_childrenEB->push_back(tmpPers);
29  }
30  return;
31 }
32 
35  trans->setNAcceptedEvents( pers->m_nAcceptedEvents );
36  trans->setCycle( pers->m_cycle );
37  trans->setName( pers->m_name );
38  trans->setDescription( pers->m_description );
39  trans->setInputStream( pers->m_inputstream );
40  trans->setOutputStream(pers->m_outputstream);
41  trans->setLogic(pers->m_logic);
42  //To fill children, create new EventBookkeeper and call persToTrans iteratively
43  if (pers->m_childrenEB) {
44  for(unsigned int i=0; i<pers->m_childrenEB->size(); i++){
45  const EventBookkeeper_p2* tmpPers=pers->m_childrenEB->at(i);
46  EventBookkeeper* tmpTrans=new EventBookkeeper();
47  persToTrans(tmpPers,tmpTrans,log);
48  trans->AddChild(tmpTrans);
49  }
50  }
51  return;
52 }
EventBookkeeper_p2::m_nWeightedAcceptedEvents
double m_nWeightedAcceptedEvents
Definition: EventBookkeeper_p2.h:35
EventBookkeeper::getLogic
const std::string & getLogic() const
Definition: EventBookkeeper.h:57
EventBookkeeper_p2::m_logic
std::string m_logic
Definition: EventBookkeeper_p2.h:32
EventBookkeeper_p2::m_nAcceptedEvents
unsigned long long m_nAcceptedEvents
Definition: EventBookkeeper_p2.h:34
EventBookkeeper::setLogic
void setLogic(const std::string &logic)
Definition: EventBookkeeper.cxx:193
EventBookkeeper_p2::m_outputstream
std::string m_outputstream
Definition: EventBookkeeper_p2.h:31
EventBookkeeper::setNAcceptedEvents
void setNAcceptedEvents(uint64_t nEvents)
Definition: EventBookkeeper.cxx:199
EventBookkeeper::getInputStream
const std::string & getInputStream() const
Definition: EventBookkeeper.h:47
EventBookkeeper::setCycle
void setCycle(int cycle)
Definition: EventBookkeeper.cxx:236
EventBookkeeper.h
EventBookkeeperCnv_p2::transToPers
virtual void transToPers(const EventBookkeeper *transObj, EventBookkeeper_p2 *persObj, MsgStream &log)
Definition: EventBookkeeperCnv_p2.cxx:13
EventBookkeeper_p2::m_cycle
int m_cycle
Definition: EventBookkeeper_p2.h:36
EventBookkeeper::setOutputStream
void setOutputStream(const std::string &outputstream)
Definition: EventBookkeeper.cxx:177
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
EventBookkeeper::setNWeightedAcceptedEvents
void setNWeightedAcceptedEvents(double nWeightedEvents)
Definition: EventBookkeeper.cxx:211
lumiFormat.i
int i
Definition: lumiFormat.py:85
EventBookkeeper_p2::m_childrenEB
std::vector< EventBookkeeper_p2 * > * m_childrenEB
Definition: EventBookkeeper_p2.h:33
EventBookkeeperCnv_p2::persToTrans
virtual void persToTrans(const EventBookkeeper_p2 *persObj, EventBookkeeper *transObj, MsgStream &log)
Definition: EventBookkeeperCnv_p2.cxx:33
EventBookkeeperCnv_p2.h
EventBookkeeper
Definition: EventBookkeeper.h:24
EventBookkeeper::getNAcceptedEvents
uint64_t getNAcceptedEvents() const
Definition: EventBookkeeper.h:60
EventBookkeeper::getNWeightedAcceptedEvents
double getNWeightedAcceptedEvents() const
Definition: EventBookkeeper.h:64
EventBookkeeper::getDescription
const std::string & getDescription() const
Definition: EventBookkeeper.h:54
EventBookkeeper::setName
void setName(const std::string &name)
Definition: EventBookkeeper.cxx:159
EventBookkeeper_p2::m_name
std::string m_name
Definition: EventBookkeeper_p2.h:28
EventBookkeeper::getOutputStream
const std::string & getOutputStream() const
Definition: EventBookkeeper.h:50
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
EventBookkeeper::AddChild
void AddChild(EventBookkeeper *eb)
Definition: EventBookkeeper.cxx:248
EventBookkeeper_p2::m_inputstream
std::string m_inputstream
Definition: EventBookkeeper_p2.h:30
EventBookkeeper::getChildrenEventBookkeepers
const std::vector< EventBookkeeper * > * getChildrenEventBookkeepers() const
Definition: EventBookkeeper.h:73
EventBookkeeper::setDescription
void setDescription(const std::string &description)
Definition: EventBookkeeper.cxx:165
EventBookkeeper_p2::m_description
std::string m_description
Definition: EventBookkeeper_p2.h:29
EventBookkeeper::setInputStream
void setInputStream(const std::string &inputstream)
Definition: EventBookkeeper.cxx:171
EventBookkeeper::getCycle
int getCycle() const
Definition: EventBookkeeper.h:70
EventBookkeeper_p2
Definition: EventBookkeeper_p2.h:16
EventBookkeeper::getName
const std::string & getName() const
Definition: EventBookkeeper.h:44