11 #include "CLHEP/Random/RandomEngine.h"
14 #include "messagefacility/MessageLogger/MessageLogger.h"
15 #include "canvas/Persistency/Provenance/Timestamp.h"
16 #include "art/Framework/Core/EDAnalyzer.h"
17 #include "art/Framework/Core/ModuleMacros.h"
18 #include "art/Framework/Principal/Event.h"
19 #include "art/Framework/Services/Registry/ServiceHandle.h"
20 namespace fhicl {
class ParameterSet; }
23 #include "nurandom/RandomUtils/NuRandomService.h"
30 void analyze(art::Event
const &
e)
override;
38 (fhicl::ParameterSet
const& pset)
42 ,
fEngine(art::ServiceHandle<rndm::NuRandomService>{}->createEngine(*
this, pset,
"Seed"))
43 ,
fAuxEngine(art::ServiceHandle<rndm::NuRandomService>{}->createEngine(*
this,
"HepJamesRandom",
"aux", pset,
"AuxSeed"))
50 mf::LogInfo(
"TestGeneratedEventTimestamp")
51 <<
"Event time stamp: " <<
event.time().value()
52 <<
"\nRandom seeds: " <<
fEngine.getSeed() <<
" (main), "
TestGeneratedEventTimestamp(fhicl::ParameterSet const &pset)
void analyze(art::Event const &e) override
fEngine(art::ServiceHandle< rndm::NuRandomService >() ->createEngine(*this, pset,"Seed"))
CLHEP::HepRandomEngine & fAuxEngine
createEngine fAuxEngine(art::ServiceHandle< rndm::NuRandomService >{}->createEngine(*this,"HepJamesRandom","aux", pset,"AuxSeed"))
CLHEP::HepRandomEngine & fEngine