InputSeeker_service.cc
Go to the documentation of this file.
2 
5 
6 #include "art_root_io/RootInput.h"
7 
8 namespace evd
9 {
10  //--------------------------------------------------------------------
13  {
15  }
16 
17  //--------------------------------------------------------------------
19  const std::vector<art::Worker*>&)
20  {
21  fSrc = dynamic_cast<art::RootInput*>(src);
22  if(!fSrc){
23  std::cout << "InputSource is not RootInput -- will not be able to seek backward" << std::endl;
24  }
25  }
26 
27  //--------------------------------------------------------------------
28  void InputSeeker::seekToEvent(int offset)
29  {
30  if(!fSrc){
31  std::cout << "Unable to seek" << std::endl;
32  return;
33  }
34  fSrc->seekToEvent(offset);
35  }
36 
37  //--------------------------------------------------------------------
39  {
40  if(!fSrc){
41  std::cout << "Unable to seek" << std::endl;
42  return;
43  }
44  fSrc->seekToEvent(evt);
45  }
46 }
47 
InputSeeker(const fhicl::ParameterSet &pset, art::ActivityRegistry &reg)
GlobalSignal< detail::SignalResponseType::LIFO, void(InputSource *, std::vector< Worker * > const &)> sPostBeginJobWorkers
art::RootInput * fSrc
Definition: InputSeeker.h:23
LArSoft includes.
Definition: InfoTransfer.h:33
void seekToEvent(int offset)
This is obviously a hack, but it&#39;s modeled on what EventDisplayBase does.
Definition: InputSeeker.h:11
void postBeginJobWorkers(art::InputSource *src, const std::vector< art::Worker * > &workers)
#define DEFINE_ART_SERVICE(svc)
TCEvent evt
Definition: DataStructs.cxx:7
QTextStream & endl(QTextStream &s)