Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
webevd
webevd
WebEVD
InputSeeker_service.cc
Go to the documentation of this file.
1
#include "
webevd/WebEVD/InputSeeker.h
"
2
3
#include "
art/Framework/Services/Registry/ServiceDefinitionMacros.h
"
4
#include "
art/Framework/Services/Registry/ActivityRegistry.h
"
5
6
#include "art_root_io/RootInput.h"
7
8
namespace
evd
9
{
10
//--------------------------------------------------------------------
11
InputSeeker::InputSeeker
(
const
fhicl::ParameterSet
&,
12
art::ActivityRegistry
&
reg
)
13
{
14
reg.
sPostBeginJobWorkers
.watch(
this
, &
InputSeeker::postBeginJobWorkers
);
15
}
16
17
//--------------------------------------------------------------------
18
void
InputSeeker::postBeginJobWorkers
(
art::InputSource
* src,
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
//--------------------------------------------------------------------
38
void
InputSeeker::seekToEvent
(
art::EventID
evt
)
39
{
40
if
(!
fSrc
){
41
std::cout <<
"Unable to seek"
<<
std::endl
;
42
return
;
43
}
44
fSrc
->seekToEvent(evt);
45
}
46
}
47
48
DEFINE_ART_SERVICE
(
evd::InputSeeker
)
InputSeeker.h
evd::InputSeeker::InputSeeker
InputSeeker(const fhicl::ParameterSet &pset, art::ActivityRegistry ®)
Definition:
InputSeeker_service.cc:11
art::ActivityRegistry::sPostBeginJobWorkers
GlobalSignal< detail::SignalResponseType::LIFO, void(InputSource *, std::vector< Worker * > const &)> sPostBeginJobWorkers
Definition:
ActivityRegistry.h:272
evd::InputSeeker::fSrc
art::RootInput * fSrc
Definition:
InputSeeker.h:23
evd
LArSoft includes.
Definition:
InfoTransfer.h:33
evd::InputSeeker::seekToEvent
void seekToEvent(int offset)
Definition:
InputSeeker_service.cc:28
evd::InputSeeker
This is obviously a hack, but it's modeled on what EventDisplayBase does.
Definition:
InputSeeker.h:11
evd::InputSeeker::postBeginJobWorkers
void postBeginJobWorkers(art::InputSource *src, const std::vector< art::Worker * > &workers)
Definition:
InputSeeker_service.cc:18
DEFINE_ART_SERVICE
#define DEFINE_ART_SERVICE(svc)
Definition:
ServiceDefinitionMacros.h:36
art::ActivityRegistry
Definition:
ActivityRegistry.h:52
ActivityRegistry.h
art::InputSource
Definition:
InputSource.h:59
ServiceDefinitionMacros.h
tca::evt
TCEvent evt
Definition:
DataStructs.cxx:7
cet::registry_via_id
Definition:
registry_via_id.h:19
art::EventID
Definition:
EventID.h:20
endl
QTextStream & endl(QTextStream &s)
Definition:
qtextstream.cpp:2030
fhicl::ParameterSet
Definition:
ParameterSet.h:36
Generated by
1.8.11