TestGeneratedEventTimestamp_module.cc
Go to the documentation of this file.
1 /**
2  * @file TestGeneratedEventTimestamp_module.cc
3  * @brief Test for GeneratedEventTimestamp
4  * @author Gianluca Petrillo (petrillo@fnal.gov)
5  * @date February 23, 2015
6  *
7  * Generated using artmod from cetpkgsupport v1_08_02.
8  */
9 
10 // CLHEP libraries
11 #include "CLHEP/Random/RandomEngine.h"
12 
13 // framework libraries
20 namespace fhicl { class ParameterSet; }
21 
22 // artextensions libraries
23 #include "nurandom/RandomUtils/NuRandomService.h"
24 
26  public:
28 
29 private:
30  void analyze(art::Event const & e) override;
31  CLHEP::HepRandomEngine& fEngine;
32  CLHEP::HepRandomEngine& fAuxEngine;
33 }; // class TestGeneratedEventTimestamp
34 
35 
36 //------------------------------------------------------------------------------
38  (fhicl::ParameterSet const& pset)
39  : EDAnalyzer(pset)
40  // create two random engines; obtain the random seed from NuRandomService,
41  // unless overridden in configuration with key "Seed" and "AuxSeed"
42  , fEngine(art::ServiceHandle<rndm::NuRandomService>{}->createEngine(*this, pset, "Seed"))
43  , fAuxEngine(art::ServiceHandle<rndm::NuRandomService>{}->createEngine(*this, "HepJamesRandom", "aux", pset, "AuxSeed"))
44 {}
45 
46 
47 //------------------------------------------------------------------------------
49 {
50  mf::LogInfo("TestGeneratedEventTimestamp")
51  << "Event time stamp: " << event.time().value()
52  << "\nRandom seeds: " << fEngine.getSeed() << " (main), "
53  << fAuxEngine.getSeed() << " (aux)";
54  }
55 
56 
def analyze(root, level, gtrees, gbranches, doprint)
Definition: rootstat.py:69
MaybeLogger_< ELseverityLevel::ELsev_info, false > LogInfo
TestGeneratedEventTimestamp(fhicl::ParameterSet const &pset)
const double e
#define DEFINE_ART_MODULE(klass)
Definition: ModuleMacros.h:67
void analyze(art::Event const &e) override
Event finding and building.