|
ATLAS Offline Software
|
Go to the documentation of this file.
9 #include "GaudiKernel/IEventProcessor.h"
12 #include "TObjArray.h"
13 #include "TObjString.h"
49 m_evtProcessor (nullptr),
50 m_incSvc(
"IncidentSvc",
"TEvent"+
name),
51 m_joSvc(
"JobOptionsSvc",
"TEvent"+
name),
52 m_evtLoop(
"AthenaEventLoopMgr/"+
name+
"_EventLoopMgr",
"TEvent"+
name),
53 m_evtSelect(
"EventSelectorAthenaPool/"+
name+
"_EventSelector",
"TEvent"+
name),
54 m_evtStore(
"StoreGateSvc/"+
name,
"TEvent"+
name),
55 m_inputMetaStore(
"InputMetaDataStore",
"TEvent"+
name) {
68 AAH::setProperty(
ppSvc ,
"ProviderNames",
"['MetaDataSvc', 'AthenaPoolAddressProviderSvc']" ).ignore();
81 if (
m_joSvc->has(
"TEvent.EventSelectorType")) {
90 if(
m_evtSelect.type()==
"Athena::xAODEventSelector") {
107 std::vector<std::string>
p;
112 messageSvc->setProperty( StringArrayProperty(
"setWarning" ,
p ) ).ignore();
128 return isize->size();
134 if(
file==0 ||
file->IsZombie())
return StatusCode::FAILURE;
140 std::cout <<
"Unable to change file after already reading" << std::endl;
141 return StatusCode::FAILURE;
143 std::vector<std::string> myFiles;
146 TString sFileIn(
file);
147 std::unique_ptr<TObjArray> sFiles(sFileIn.Tokenize(
","));
148 std::unique_ptr<TIterator> itr(sFiles->MakeIterator());
150 while( (
obj = itr->Next()) ) {
151 TString sFile(
static_cast<TObjString*
>(
obj)->String());
152 if(sFile.Contains(
'*')) {
153 std::unique_ptr<TObjArray> theFiles(gSystem->GetFromPipe((
"ls " + std::string(
file)).c_str()).Tokenize(
"\n"));
154 for(
int i=0;
i<theFiles->GetEntries();
i++) {
156 if (TObjString* objstr =
dynamic_cast<TObjString*
>(theFiles->At(
i))) {
157 myFiles.push_back(gSystem->ExpandPathName(objstr->String().Data()));
161 myFiles.push_back( gSystem->ExpandPathName(sFile.Data()) );
172 std::unique_ptr<TIterator> itr(
files->GetListOfFiles()->MakeIterator());
175 while( (
obj = itr->Next()) ) {
176 if(hasFile) sfiles +=
",";
177 sfiles +=
obj->GetTitle();
198 m_incSvc->fireIncident(Incident(
"BeginEvent",IncidentType::BeginEvent));
199 return (
out.isSuccess()) ? 0 : -1;
ServiceHandle< Gaudi::Interfaces::IOptionsSvc > m_joSvc
StatusCode retrieveMetaInput(const T *&obj, const std::string &key)
StatusCode parse(std::tuple< Tup... > &tup, const Gaudi::Parsers::InputData &input)
static StatusCode setProperty(const std::string &name, const std::string &property, const W &value, bool override=true)
void setActive()
ensure we are the active store, for the purpose of element links etc
Abstract interface for finding the size of an event collection.
PyObject * get_item(PyObject *pykey)
IAppMgrUI * Init(const char *options="POOLRootAccess/basic.opts")
Bootstraps (creates and configures) the Gaudi Application with the provided options file.
PyObject * py_sg_contains(PyObject *storeGateSvc, PyObject *tp, PyObject *key)
PyObject * contains(PyObject *tp, PyObject *pykey)
StatusCode readFrom(TFile *file)
::StatusCode StatusCode
StatusCode definition for legacy code.
ServiceHandle< IEvtSelectorSeek > m_evtSelect
Abstract interface for finding the size of an event collection.
PyObject * py_sg_getitem(PyObject *storeGateSvc, PyObject *key)
ServiceHandle< IIncidentSvc > m_incSvc
IEventProcessor * m_evtProcessor
ServiceHandle< StoreGateSvc > & evtStore()
void setEvtSelProperty(const char *name, const T &val)
static IAppMgrUI * initGaudi(const char *options="")
initGaudi method starts the gaudi ApplicationMgr ready for working with all the components
StatusCode retrieve(const T *&obj)
ServiceHandle< IEventSeek > m_evtLoop
PyObject * record(PyObject *obj, PyObject *pykey, bool allowMods=true, bool resetOnly=true, bool noHist=false)
ServiceHandle< StoreGateSvc > & inputMetaStore()
=============================================================================
ServiceHandle< StoreGateSvc > m_evtStore
PyObject * retrieveObjectFromStore(PyObject *storeGateSvc, PyObject *tp, PyObject *key)
TEvent(const std::string &name="StoreGateSvc")
PyObject * recordObjectToStore(StoreGateSvc *, PyObject *, PyObject *, bool, bool, bool)
record object to storegate