Public Member Functions | Public Attributes | List of all members
fnex::MetaDataLite Struct Reference

#include "/cvmfs/nova-development.opensciencegrid.org/novasoft/releases/N20-11-25/FNEX/dataProducts/Structs.h"

Public Member Functions

 MetaDataLite ()
 
 MetaDataLite (novadaq::cnv::DetId const &det, fnex::SelectionType_t const &st, std::string const &ep)
 
std::string const EpochString () const
 
std::string const ToString () const
 
bool operator== (const MetaDataLite &other) const
 
bool operator< (const MetaDataLite &other) const
 

Public Attributes

novadaq::cnv::DetId detector
 
fnex::SelectionType_t selectionType
 
int epoch
 

Detailed Description

Definition at line 19 of file Structs.h.

Constructor & Destructor Documentation

fnex::MetaDataLite::MetaDataLite ( )

Definition at line 292 of file Structs.cxx.

fnex::MetaDataLite::MetaDataLite ( novadaq::cnv::DetId const &  det,
fnex::SelectionType_t const &  st,
std::string const &  ep 
)

Definition at line 299 of file Structs.cxx.

References epoch, and fnex::EpochStringToInt().

302  : detector (det)
303  , selectionType (st)
304  {
306  }
novadaq::cnv::DetId detector
Definition: Structs.h:27
int EpochStringToInt(std::string const &epochStr)
Definition: Structs.h:82
fnex::SelectionType_t selectionType
Definition: Structs.h:28

Member Function Documentation

std::string const fnex::MetaDataLite::EpochString ( ) const

Definition at line 309 of file Structs.cxx.

References plot_validation_datamc::c, and epoch.

Referenced by fnex::MetaData::Period(), and ToString().

310  {
311  int c = epoch % 1000;
312  std::stringstream epStr;
313 
314  epStr << (epoch-c) / 1000;
315 
316  if(c != 0) epStr << static_cast<char>(c);
317 
318  return epStr.str();
319  }
bool fnex::MetaDataLite::operator< ( const MetaDataLite other) const

Definition at line 345 of file Structs.cxx.

References detector, epoch, and selectionType.

Referenced by fnex::MetaData::Period().

346  {
347  int thisNum = (this->detector * 1e7 +
348  this->selectionType * 1e5 +
349  this->epoch);
350  int otherNum = (other.detector * 1e7 +
351  other.selectionType * 1e5 +
352  other.epoch);
353 
354  return thisNum < otherNum;
355  }
novadaq::cnv::DetId detector
Definition: Structs.h:27
fnex::SelectionType_t selectionType
Definition: Structs.h:28
bool fnex::MetaDataLite::operator== ( const MetaDataLite other) const

Definition at line 337 of file Structs.cxx.

References detector, epoch, and selectionType.

Referenced by fnex::MetaData::Period().

338  {
339  return (other.detector == this->detector &&
340  other.selectionType == this->selectionType &&
341  other.epoch == this->epoch);
342  }
std::string const fnex::MetaDataLite::ToString ( ) const

Definition at line 322 of file Structs.cxx.

References fnex::cSelectionType_Strings, detector, EpochString(), novadaq::cnv::kFARDET, novadaq::cnv::kNEARDET, selectionType, and string.

Referenced by fnex::MetaData::Period().

323  {
324  std::string outType("");
325 
326  if (detector == novadaq::cnv::kFARDET) outType += "Far";
327  else if(detector == novadaq::cnv::kNEARDET) outType += "Near";
328  else outType += "UknownDet";
329 
331  outType += "Epoch" + this->EpochString();
332 
333  return outType;
334  }
novadaq::cnv::DetId detector
Definition: Structs.h:27
Far Detector at Ash River, MN.
Near Detector in the NuMI cavern.
std::string const EpochString() const
Definition: Structs.cxx:309
fnex::SelectionType_t selectionType
Definition: Structs.h:28
const std::string cSelectionType_Strings[11]
Definition: Constants.h:101
enum BeamMode string

Member Data Documentation

novadaq::cnv::DetId fnex::MetaDataLite::detector
int fnex::MetaDataLite::epoch

Definition at line 29 of file Structs.h.

Referenced by EpochString(), MetaDataLite(), operator<(), and operator==().

fnex::SelectionType_t fnex::MetaDataLite::selectionType

Definition at line 28 of file Structs.h.

Referenced by operator<(), operator==(), and ToString().


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