|
ATLAS Offline Software
|
Go to the documentation of this file.
24 static const char *
const s_protocolSep =
":";
34 const std::string&
name,
35 const IInterface*
parent ) :
37 m_ioFrontend( nullptr )
45 "Name of the front-end we'll use to read in the HepMC::GenEvent."
46 "\nEx: ascii:hepmc.genevent.txt" );
52 "Output location of the McEventCollection to read out" );
54 declareInterface<IIOHepMcTool>(
this);
75 return StatusCode::FAILURE;
83 return StatusCode::SUCCESS;
89 return StatusCode::SUCCESS;
98 return StatusCode::FAILURE;
101 if (
evtStore()->setConst( mcEvts ).isFailure() ) {
105 HepMC::GenEvent *
evt =
new HepMC::GenEvent;
123 return StatusCode::SUCCESS;
129 std::string protocol =
"ascii";
130 std::string
fileName =
"hepmc.genevent.txt";
141 std::string::size_type protocolPos =
url.find(s_protocolSep);
143 if ( std::string::npos != protocolPos ) {
144 protocol =
url.substr( 0, protocolPos );
145 fileName =
url.substr( protocolPos+1, std::string::npos );
152 std::transform( protocol.begin(), protocol.end(), protocol.begin(), [](
unsigned char c){ return std::tolower(c); } );
155 if (
"ascii" == protocol ) {
159 msg(MSG::WARNING) <<
"UNKNOWN protocol [" << protocol <<
"] !!" <<
endmsg<<
"Will use [ascii] instead..."<<
endmsg;
164 if (
"ascii" == protocol ) {
168 msg(MSG::WARNING) <<
"UNKNOWN protocol [" << protocol <<
"] !!" <<
endmsg <<
"Will use [ascii] instead..."<<
endmsg;
def retrieve(aClass, aKey=None)
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
::StatusCode StatusCode
StatusCode definition for legacy code.
Amg::Vector3D transform(Amg::Vector3D &v, Amg::Transform3D &tr)
Transform a point from a Trasformation3D.
This defines the McEventCollection, which is really just an ObjectVector of McEvent objects.
value_type push_back(value_type pElem)
Add an element to the end of the collection.
#define ATH_MSG_WARNING(x)