protoDUNEBeam.cxx
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////
2 //
3 // protoDUNEBeam
4 //
5 // jpaley@fnal.gov
6 //
7 ////////////////////////////////////////////////////////////////////////
8 // Framework includes
9 
10 // C++ language includes
11 #include <iostream>
12 
13 // LArSoft includes
14 #include "protoDUNEBeam.h"
15 
16 // Framework includes
18 #include "cetlib_except/exception.h"
19 
20 //#include "nutools/IFDatabase/Util.h"
21 //#include <boost/tokenizer.hpp>
22 //#include <ctime>
23 
24 namespace proto {
25  //-----------------------------------------------
26  ProtoDUNEBeam::ProtoDUNEBeam(fhicl::ParameterSet const& pset, ifbeam_ns::BeamFolder* ptr) :
27  _loadFromDB (pset.get<bool >("LoadFromDB")),
28  _timeWindow (pset.get<double >("TimeWindow")),
29  _csvFileName (pset.get<std::string >("CSVFileName")),
30  _bundleName (pset.get<std::string >("BundleName")),
31  _bfp(ptr)
32  {
33 
34  }
35 
36  //------------------------------------------------
37  bool ProtoDUNEBeam::Update(uint64_t ts)
38  {
39  if (_currentTS == ts) return true;
40 
41  // double trtgtd=0.;
42 
43  _xy1.clear();
44  _xy2.clear();
45  _xy3.clear();
46  _xy4.clear();
47  _ckov1.clear();
48  _ckov2.clear();
49  _xy1 = _bfp->GetNamedVector(ts,"E:NT04XY1[]");
50  _xy2 = _bfp->GetNamedVector(ts,"E:NT04XY2[]");
51  _xy3 = _bfp->GetNamedVector(ts,"E:NT04XY3[]");
52  _xy4 = _bfp->GetNamedVector(ts,"E:NT04XY4[]");
53  _ckov1 = _bfp->GetNamedVector(ts,"E:NT04Ckov1[]");
54  _ckov2 = _bfp->GetNamedVector(ts,"E:NT04Ckov2[]");
55 
56  return true;
57  }
58 
59 }
std::string string
Definition: nybbler.cc:12
STL namespace.
std::vector< double > _xy2
Definition: protoDUNEBeam.h:46
std::vector< double > _ckov1
Definition: protoDUNEBeam.h:49
std::vector< double > _ckov2
Definition: protoDUNEBeam.h:50
std::vector< double > _xy4
Definition: protoDUNEBeam.h:48
General LArSoft Utilities.
std::vector< double > _xy1
Definition: protoDUNEBeam.h:45
std::vector< double > _xy3
Definition: protoDUNEBeam.h:47
auto const & get(AssnsNode< L, R, D > const &r)
Definition: AssnsNode.h:115
int bool
Definition: qglobal.h:345
std::unique_ptr< ifbeam_ns::BeamFolder > _bfp
Definition: protoDUNEBeam.h:56
bool Update(uint64_t ts=0)
ProtoDUNEBeam(fhicl::ParameterSet const &pset, ifbeam_ns::BeamFolder *ptr)