|
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"
30 m_toolSvc(0),m_vp1gui(0)
73 ::setenv(
"LCGPATCH_COINMULTISELECT",
"1",1);
84 msg(MSG::INFO) <<
" in initialize() " <<
endmsg;
89 msg(MSG::ERROR) <<
" Unable to get ToolSvc!" <<
endmsg;
103 IIncidentSvc* incsvc = 0;
104 status = service(
"IncidentSvc", incsvc,
true);
106 if(
status.isFailure() || incsvc==0) {
107 msg(MSG::WARNING) <<
"Unable to get IncidentSvc! MF mechanism is disabled" <<
endmsg;
108 return StatusCode::SUCCESS;
111 std::string endfilekey(
"EndTagFile");
112 incsvc->addListener(
this, endfilekey, 0);
128 return StatusCode::FAILURE;
130 return StatusCode::SUCCESS;
144 return StatusCode::FAILURE;
153 unsigned int trigType = 0;
172 return StatusCode::SUCCESS;
174 msg(MSG::INFO) <<
" Ending application gracefully." <<
endmsg;
175 return StatusCode::FAILURE;
177 return StatusCode::SUCCESS;
180 msg(
MSG::DEBUG) <<
" Unable to retrieve EventInfo from StoreGate... using dummy values" <<
endmsg;
183 return StatusCode::SUCCESS;
185 msg(MSG::INFO) <<
" Ending application gracefully." <<
endmsg;
186 return StatusCode::FAILURE;
189 return StatusCode::SUCCESS;
196 msg(MSG::INFO) <<
" in finalize() " <<
endmsg;
199 return StatusCode::FAILURE;
205 return StatusCode::SUCCESS;
211 msg(MSG::INFO) <<
"Handling incident '" << inc.type() <<
"'" <<
endmsg;
214 msg(MSG::INFO) <<
"Aborting due to null VP1Gui pointer." <<
endmsg;
218 const FileIncident* fileInc =
dynamic_cast<const FileIncident*
>(&inc);
220 msg(MSG::WARNING) <<
" Unable to cast to file incident" <<
endmsg;
230 if(!
sc.isSuccess() || 0 == pEvtSelector) {
231 msg(MSG::WARNING) <<
"Could not find EventSelector" <<
endmsg;
237 IProperty* propertyServer =
dynamic_cast<IProperty*
>(pEvtSelector.operator->());
238 if (!propertyServer) {
239 msg(MSG::WARNING) <<
"Could not get propertyServer" <<
endmsg;
243 std::vector<std::string> vect;
247 if(!
sc.isSuccess()) {
248 msg(MSG::INFO) <<
"Could not get InputCollections property" <<
endmsg;
255 if(
s != fileInc->fileName())
262 if (strNewFileName.empty())
265 msg(MSG::WARNING) <<
" File requested by VP1 does not exists or is not readable: "<<strNewFileName<<
". Ending." <<
endmsg;
269 vect.push_back(strNewFileName);
270 msg(MSG::INFO) <<
" Setting next event file: " << strNewFileName<<
endmsg;
274 for(
unsigned i=0;
i<strNewFileNames.size(); ++
i) {
275 const std::string& strNewFileName = strNewFileNames[
i];
276 if (strNewFileName.empty())
279 msg(MSG::WARNING) <<
" File requested by VP1 does not exists or is not readable: " << strNewFileName <<
endmsg;
282 vect.push_back(strNewFileName);
283 msg(MSG::INFO) <<
" Setting next event file: " << strNewFileName<<
endmsg;
287 StringArrayProperty newInputCollections(
"InputCollections", vect);
289 if(propertyServer->setProperty(newInputCollections)!=StatusCode::SUCCESS)
290 msg(MSG::WARNING) <<
"Could not set new InputCollections property" <<
endmsg;
JetConstituentVector::iterator iterator
virtual StatusCode initialize() override
static bool fileExistsAndReadable(const std::string &)
uint64_t eventNumber() const
The current event's event number.
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
uint32_t runNumber() const
The current event's run number.
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
uint16_t level1TriggerType() const
The Level-1 trigger type.
void handle(const Incident &inc) override
uint32_t timeStamp() const
POSIX time in seconds from 1970. January 1st.
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)