RunData.cxx
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////
2 /// \file larcoreobj/SummaryData/RunData.cxx
3 ///
4 /// Definition of object to store run related information
5 ///
6 /// \author brebel@fnal.gov
7 ////////////////////////////////////////////////////////////////////////
8 
10 
11 #include <stdexcept> // std::runtime_error
12 
13 namespace sumdata {
14 
15  //---------------------------------------------------------
17  : fDetName("nodetectorname")
18  {
19  }
20 
21  //---------------------------------------------------------
22  RunData::RunData(std::string const& detectorName)
23  : fDetName(detectorName)
24  {
25  }
26 
27  //---------------------------------------------------------
29 
30  // Each run is required to have the same detector name.
31  // This might be a problem for Monte Carlo jobs which tend to use the same
32  // run number for everything.
33  if (other.DetName() != DetName()) {
34  throw std::runtime_error("The same run sees different detector setups: '"
35  + DetName() + "' and '" + other.DetName()
36  );
37  }
38  } // RunData::aggregate()
39 
40  //---------------------------------------------------------
41 
42 }
std::string const & DetName() const
Definition: RunData.h:39
std::string string
Definition: nybbler.cc:12
std::string fDetName
Detector name.
Definition: RunData.h:28
void aggregate(RunData const &other)
Definition: RunData.cxx:28