Loading [MathJax]/extensions/tex2jax.js
 |
ATLAS Offline Software
|
Go to the documentation of this file.
13 #include "GaudiKernel/IToolSvc.h"
14 #include "GaudiKernel/FileIncident.h"
15 #include "GaudiKernel/ServiceHandle.h"
16 #include "GaudiKernel/IEvtSelector.h"
17 #include "GaudiKernel/IIncidentSvc.h"
73 ::setenv(
"LCGPATCH_COINMULTISELECT",
"1",1);
84 msg(MSG::INFO) <<
" in initialize() " <<
endmsg;
96 SmartIF<IIncidentSvc> incsvc{service(
"IncidentSvc")};
99 std::string endfilekey(
"EndTagFile");
100 incsvc->addListener(
this, endfilekey, 0);
116 return StatusCode::FAILURE;
118 return StatusCode::SUCCESS;
132 return StatusCode::FAILURE;
141 unsigned int trigType = 0;
149 const unsigned long long eventNumber = eventInfo->eventNumber();
154 trigType = eventInfo->level1TriggerType();
160 return StatusCode::SUCCESS;
162 msg(MSG::INFO) <<
" Ending application gracefully." <<
endmsg;
163 return StatusCode::FAILURE;
165 return StatusCode::SUCCESS;
168 msg(
MSG::DEBUG) <<
" Unable to retrieve EventInfo from StoreGate... using dummy values" <<
endmsg;
171 return StatusCode::SUCCESS;
173 msg(MSG::INFO) <<
" Ending application gracefully." <<
endmsg;
174 return StatusCode::FAILURE;
177 return StatusCode::SUCCESS;
184 msg(MSG::INFO) <<
" in finalize() " <<
endmsg;
187 return StatusCode::FAILURE;
193 return StatusCode::SUCCESS;
199 msg(MSG::INFO) <<
"Handling incident '" << inc.type() <<
"'" <<
endmsg;
202 msg(MSG::INFO) <<
"Aborting due to null VP1Gui pointer." <<
endmsg;
206 const FileIncident* fileInc =
dynamic_cast<const FileIncident*
>(&inc);
208 msg(MSG::WARNING) <<
" Unable to cast to file incident" <<
endmsg;
218 if(!
sc.isSuccess() || 0 == pEvtSelector) {
219 msg(MSG::WARNING) <<
"Could not find EventSelector" <<
endmsg;
225 IProperty* propertyServer =
dynamic_cast<IProperty*
>(pEvtSelector.operator->());
226 if (!propertyServer) {
227 msg(MSG::WARNING) <<
"Could not get propertyServer" <<
endmsg;
231 std::vector<std::string> vect;
235 if(!
sc.isSuccess()) {
236 msg(MSG::INFO) <<
"Could not get InputCollections property" <<
endmsg;
243 if(
s != fileInc->fileName())
250 if (strNewFileName.empty())
253 msg(MSG::WARNING) <<
" File requested by VP1 does not exists or is not readable: "<<strNewFileName<<
". Ending." <<
endmsg;
257 vect.push_back(strNewFileName);
258 msg(MSG::INFO) <<
" Setting next event file: " << strNewFileName<<
endmsg;
262 for(
unsigned i=0;
i<strNewFileNames.size(); ++
i) {
263 const std::string& strNewFileName = strNewFileNames[
i];
264 if (strNewFileName.empty())
267 msg(MSG::WARNING) <<
" File requested by VP1 does not exists or is not readable: " << strNewFileName <<
endmsg;
270 vect.push_back(strNewFileName);
271 msg(MSG::INFO) <<
" Setting next event file: " << strNewFileName<<
endmsg;
275 StringArrayProperty newInputCollections(
"InputCollections", vect);
277 if(propertyServer->setProperty(newInputCollections)!=StatusCode::SUCCESS)
278 msg(MSG::WARNING) <<
"Could not set new InputCollections property" <<
endmsg;
JetConstituentVector::iterator iterator
virtual StatusCode initialize() override
static bool fileExistsAndReadable(const std::string &)
static std::string find_file(const std::string &logical_file_name, const std::string &search_path, SearchType search_type=LocalSearch)
Gaudi::Property< std::vector< std::string > > m_initialvp1files
bool executeNewEvent(const int &run, const uint64_t &event, const unsigned &triggerType=0, const unsigned &time=0)
Gaudi::Property< std::string > m_mfSourceDir
Gaudi::Property< std::string > m_cruiseInitialMode
Gaudi::Property< bool > m_noGui
Gaudi::Property< bool > m_mfOn
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode execute() override
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode finalize() override
::StatusCode StatusCode
StatusCode definition for legacy code.
Gaudi::Property< std::vector< std::string > > m_mfAvailableLocalInputDirectories
bool hasBeenInitialised()
std::vector< std::string > userRequestedFiles()
Class describing the basic event information.
def time(flags, cells_name, *args, **kw)
Gaudi::Property< int > m_mfLimit
void handle(const Incident &inc) override
bool argumentsAreValid() const
std::string nextRequestedEventFile() const
Gaudi::Property< std::string > m_mfLocalCopyDir
Gaudi::Property< unsigned > m_cruiseInitialUpdateSeconds
VP1Alg(const std::string &name, ISvcLocator *pSvcLocator)