![]() |
![]() |
#include <GeneratorInterface/LHEInterface/interface/LHEProxy.h>
Public Types | |
typedef unsigned long | ProxyID |
Public Member Functions | |
void | clearEvent () |
void | clearRunInfo () |
const boost::shared_ptr < LHEEvent > & | getEvent () const |
ProxyID | getID () const |
const boost::shared_ptr < LHERunInfo > & | getRunInfo () const |
void | loadEvent (const boost::shared_ptr< LHEEvent > &event) |
void | loadRunInfo (const boost::shared_ptr< LHERunInfo > &runInfo) |
boost::shared_ptr< LHEEvent > | releaseEvent () |
boost::shared_ptr< LHERunInfo > | releaseRunInfo () |
~LHEProxy () | |
Static Public Member Functions | |
static boost::shared_ptr < LHEProxy > | create () |
static boost::shared_ptr < LHEProxy > | find (ProxyID id) |
Private Member Functions | |
LHEProxy (const LHEProxy &orig) | |
LHEProxy (ProxyID id) | |
LHEProxy & | operator= (const LHEProxy &orig) |
Private Attributes | |
boost::shared_ptr< LHEEvent > | event |
const ProxyID | id |
boost::shared_ptr< LHERunInfo > | runInfo |
Definition at line 12 of file LHEProxy.h.
typedef unsigned long lhef::LHEProxy::ProxyID |
Definition at line 14 of file LHEProxy.h.
LHEProxy::~LHEProxy | ( | ) |
Definition at line 32 of file LHEProxy.cc.
References getProxyMapInstance(), and mutex.
00033 { 00034 boost::mutex::scoped_lock scoped_lock(mutex); 00035 00036 ProxyMap *map = getProxyMapInstance(); 00037 if (map) 00038 map->erase(id); 00039 }
LHEProxy::LHEProxy | ( | ProxyID | id | ) | [private] |
Definition at line 27 of file LHEProxy.cc.
Referenced by create().
00027 : 00028 id(id) 00029 { 00030 }
lhef::LHEProxy::LHEProxy | ( | const LHEProxy & | orig | ) | [private] |
void lhef::LHEProxy::clearEvent | ( | ) | [inline] |
void lhef::LHEProxy::clearRunInfo | ( | ) | [inline] |
Definition at line 41 of file LHEProxy.cc.
References getProxyMapInstance(), LHEProxy(), and mutex.
Referenced by lhef::ThePEGHadronisation::ThePEGHadronisation().
00042 { 00043 static LHEProxy::ProxyID nextProxyID = 0; 00044 00045 boost::mutex::scoped_lock scoped_lock(mutex); 00046 00047 boost::shared_ptr<LHEProxy> proxy(new LHEProxy(++nextProxyID)); 00048 00049 ProxyMap *map = getProxyMapInstance(); 00050 if (map) 00051 map->insert(ProxyMap::value_type(proxy->getID(), proxy)); 00052 00053 return proxy; 00054 }
Definition at line 56 of file LHEProxy.cc.
References getProxyMapInstance(), and mutex.
00057 { 00058 boost::mutex::scoped_lock scoped_lock(mutex); 00059 00060 ProxyMap *map = getProxyMapInstance(); 00061 if (!map) 00062 return boost::shared_ptr<LHEProxy>(); 00063 00064 ProxyMap::const_iterator pos = map->find(id); 00065 if (pos == map->end()) 00066 return boost::shared_ptr<LHEProxy>(); 00067 00068 return boost::shared_ptr<LHEProxy>(pos->second); 00069 }
const boost::shared_ptr<LHEEvent>& lhef::LHEProxy::getEvent | ( | ) | const [inline] |
ProxyID lhef::LHEProxy::getID | ( | ) | const [inline] |
const boost::shared_ptr<LHERunInfo>& lhef::LHEProxy::getRunInfo | ( | ) | const [inline] |
void lhef::LHEProxy::loadRunInfo | ( | const boost::shared_ptr< LHERunInfo > & | runInfo | ) | [inline] |
boost::shared_ptr<LHEEvent> lhef::LHEProxy::releaseEvent | ( | ) | [inline] |
Definition at line 29 of file LHEProxy.h.
References event, and HLT_VtxMuL3::result.
00030 { 00031 boost::shared_ptr<LHEEvent> result(event); 00032 event.reset(); 00033 return result; 00034 }
boost::shared_ptr<LHERunInfo> lhef::LHEProxy::releaseRunInfo | ( | ) | [inline] |
Definition at line 23 of file LHEProxy.h.
References HLT_VtxMuL3::result, and runInfo.
00024 { 00025 boost::shared_ptr<LHERunInfo> result(runInfo); 00026 runInfo.reset(); 00027 return result; 00028 }
boost::shared_ptr<LHEEvent> lhef::LHEProxy::event [private] |
const ProxyID lhef::LHEProxy::id [private] |
boost::shared_ptr<LHERunInfo> lhef::LHEProxy::runInfo [private] |
Definition at line 58 of file LHEProxy.h.
Referenced by clearRunInfo(), getRunInfo(), and releaseRunInfo().