ATLAS Offline Software
G4InputLoader.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 // G4InputLoader.cxx
7 // Implementation file for class G4InputLoader
9 
10 #include "G4InputLoader.h"
11 
12 #include "Gaudi/Property.h"
13 
16 
17 G4InputLoader::G4InputLoader( const std::string& name,
18  ISvcLocator* pSvcLocator ) :
19  ::AthAlgorithm( name, pSvcLocator ), m_mcTruth("GEN_EVENT")
20 {
21  declareProperty( "McTruth", m_mcTruth="GEN_EVENT" );
22 }
23 
24 
26 {
27  ATH_MSG_DEBUG ("Executing " << name() << "...");
28 
29  const McEventCollection* genEvt = 0;
30  CHECK(evtStore()->retrieve(genEvt, m_mcTruth));
31 
33 
34  return StatusCode::SUCCESS;
35 }
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
G4InputLoader::G4InputLoader
G4InputLoader(const std::string &name, ISvcLocator *pSvcLocator)
Definition: G4InputLoader.cxx:17
AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
G4InputLoader::m_mcTruth
std::string m_mcTruth
Definition: G4InputLoader.h:33
AthCommonDataStore< AthCommonMsg< Algorithm > >::evtStore
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:85
McEventCollection.h
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
CHECK
#define CHECK(...)
Evaluate an expression and check for errors.
Definition: Control/AthenaKernel/AthenaKernel/errorcheck.h:422
McEventCollection
This defines the McEventCollection, which is really just an ObjectVector of McEvent objects.
Definition: McEventCollection.h:33
AthAlgorithm
Definition: AthAlgorithm.h:47
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
errorcheck.h
Helpers for checking error return status codes and reporting errors.
G4InputLoader.h
G4InputLoader::execute
virtual StatusCode execute()
Definition: G4InputLoader.cxx:25
FourMomUtils::dump
std::ostream & dump(std::ostream &out, const I4MomIter iBeg, const I4MomIter iEnd)
Helper to stream out a range of I4Momentum objects.
Definition: P4Dumper.h:24