5#include "GaudiKernel/AlgFactory.h"
10 : GaudiAlgorithm(name, pSvcLocator),
13 declareProperty(
"RandomTriggerFiles", m_rdmFiles);
22 StatusCode sc = GaudiAlgorithm::initialize();
24 if ( m_rdmFiles.empty() ) {
25 error() <<
"RandomTriggerFiles is empty" << endmsg;
26 return StatusCode::FAILURE;
38 if ( trigData->getTrigChannel(9) != 1 ) {
40 return StatusCode::SUCCESS;
43 SmartDataPtr<Event::EventHeader> eventHeader(eventSvc(),
"/Event/EventHeader");
44 uint32_t evtNo = eventHeader->eventNumber();
45 uint32_t
runNo = eventHeader->runNumber();
49 uint32_t rdmEvtNo = 0xFFFFFFFF;
62 if ( m_fcount < m_rdmFiles.size() ) {
64 rdmEvtNo = 0xFFFFFFFF;
68 fatal() <<
"can not find event " << evtNo <<
" in random trigger data files" << endmsg;
69 return StatusCode::FAILURE;
80 fatal() <<
"bad runNo in random trigger data" << endmsg;
81 return StatusCode::FAILURE;
84 }
while ( rdmEvtNo != evtNo );
88 return StatusCode::SUCCESS;
93 if ( m_freader !=
NULL ) {
99 return GaudiAlgorithm::finalize();
DECLARE_ALGORITHM_FACTORY(ReadRawData)
void write(std::string fname)
void addPos(uint32_t evtId, uint32_t pos)
virtual ~GenRdmTrgIdxAlg()
virtual StatusCode initialize()
Algorithm initialization.
virtual StatusCode execute()
Algorithm execution.
virtual StatusCode finalize()
Algorithm finalization.
virtual void print() const
const uint32_t * nextEvent()
raw_ifstream * raw_stream()
std::string currentFile() const
_EXTERN_ std::string TrigData