LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
sumdata::RunData Class Reference

#include "RunData.h"

Public Member Functions

 RunData ()
 
void aggregate (RunData const &other)
 
 RunData (std::string const &detectorName)
 
std::string const & DetName () const
 

Private Attributes

std::string fDetName
 Detector name. More...
 

Detailed Description

Definition at line 15 of file RunData.h.

Constructor & Destructor Documentation

sumdata::RunData::RunData ( )

Definition at line 16 of file RunData.cxx.

17  : fDetName("nodetectorname")
18  {
19  }
std::string fDetName
Detector name.
Definition: RunData.h:28
sumdata::RunData::RunData ( std::string const &  detectorName)
explicit

Definition at line 22 of file RunData.cxx.

24  {
25  }
std::string fDetName
Detector name.
Definition: RunData.h:28
std::string detectorName

Member Function Documentation

void sumdata::RunData::aggregate ( RunData const &  other)

What to do when multiple RunData objects are found for the same run.

Exceptions
std::runtime_errorif other has a different DetName()

Definition at line 28 of file RunData.cxx.

References DetName().

28  {
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()
std::string const & DetName() const
Definition: RunData.h:39
std::string const & sumdata::RunData::DetName ( ) const
inline

Definition at line 39 of file RunData.h.

References fDetName.

Referenced by aggregate().

39 { return fDetName; }
std::string fDetName
Detector name.
Definition: RunData.h:28

Member Data Documentation

std::string sumdata::RunData::fDetName
private

Detector name.

Definition at line 28 of file RunData.h.

Referenced by DetName().


The documentation for this class was generated from the following files: