LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
RunData.cxx
Go to the documentation of this file.
1 
10 
11 #include <stdexcept> // std::runtime_error
12 
13 namespace sumdata {
14 
15  //---------------------------------------------------------
16  RunData::RunData() : fDetName("nodetectorname") {}
17 
18  //---------------------------------------------------------
19  RunData::RunData(std::string const& detectorName) : fDetName(detectorName) {}
20 
21  //---------------------------------------------------------
23  {
24 
25  // Each run is required to have the same detector name.
26  // This might be a problem for Monte Carlo jobs which tend to use the same
27  // run number for everything.
28  if (other.DetName() != DetName()) {
29  throw std::runtime_error("The same run sees different detector setups: '" + DetName() +
30  "' and '" + other.DetName());
31  }
32  } // RunData::aggregate()
33 
34  //---------------------------------------------------------
35 
36 }
std::string const & DetName() const
Definition: RunData.h:35
std::string fDetName
Detector name.
Definition: RunData.h:26
std::string detectorName
void aggregate(RunData const &other)
Definition: RunData.cxx:22