NC::EventAdderBase Class Reference

Functionality common to all current event adders. More...

#include <NCEventAdder.h>

Inheritance diagram for NC::EventAdderBase:
NC::IEventAdder NC::FakeDataAdder NC::MockDataAdder NC::RealDataAdder NC::SplitFakeDataAdder

List of all members.

Public Member Functions

 EventAdderBase ()
virtual ~EventAdderBase ()
virtual void Config (const Registry &r)
 Override this function to handle additional registry options.

Protected Member Functions

void ReportOnEventInfo (const NCEventInfo *eventInfo) const
 Utility function for use by derived classes

Protected Attributes

int fRunLimitNearMC
 Number of ND runs to add from each chain.
int fRunLimitNearData
 Number of ND runs to add from each chain.
int fRunLimitFarMC
 Number of FD runs to add from each chain.
int fRunLimitFarData
 Number of FD runs to add from each chain.

Detailed Description

Functionality common to all current event adders.

Definition at line 59 of file NCEventAdder.h.


Constructor & Destructor Documentation

NC::EventAdderBase::EventAdderBase (  ) 

Definition at line 33 of file NCEventAdder.cxx.

00034   : fRunLimitNearMC(-1),
00035     fRunLimitNearData(-1),
00036     fRunLimitFarMC(-1),
00037     fRunLimitFarData(-1)
00038 {
00039 }

NC::EventAdderBase::~EventAdderBase (  )  [virtual]

Definition at line 43 of file NCEventAdder.cxx.

00044 {
00045 }


Member Function Documentation

void NC::EventAdderBase::Config ( const Registry r  )  [virtual]

Override this function to handle additional registry options.

This default implementation fills the run limit member variables

Implements NC::IEventAdder.

Reimplemented in NC::FakeDataAdder, NC::SplitFakeDataAdder, NC::RealDataAdder, and NC::MockDataAdder.

Definition at line 49 of file NCEventAdder.cxx.

References fRunLimitFarData, fRunLimitFarMC, fRunLimitNearData, fRunLimitNearMC, and Registry::Get().

00050 {
00051   bool ok = true;
00052 
00053   ok = ok && r.Get("RunLimitNearMC",   fRunLimitNearMC);
00054   ok = ok && r.Get("RunLimitNearData", fRunLimitNearData);
00055   ok = ok && r.Get("RunLimitFarMC",    fRunLimitFarMC);
00056   ok = ok && r.Get("RunLimitFarData",  fRunLimitFarData);
00057 
00058   assert(ok);
00059 }

void NC::EventAdderBase::ReportOnEventInfo ( const NCEventInfo eventInfo  )  const [protected]

Utility function for use by derived classes

Definition at line 63 of file NCEventAdder.cxx.

References bfld::AsString(), NCEventInfo::beam, ANtpBeamInfo::beamType, ANtpHeaderInfo::dataType, det, ANtpHeaderInfo::detector, NCEventInfo::header, Msg::kFatal, Msg::kInfo, MSG, and ANtpHeaderInfo::softVersion.

Referenced by NC::RealDataAdder::AddEventsToExtrapolations(), NC::MockDataAdder::AddEventsToExtrapolations(), NC::SplitFakeDataAdder::AddEventsToExtrapolations(), and NC::FakeDataAdder::AddEventsToExtrapolations().

00064 {
00065   using namespace Detector;
00066   using namespace SimFlag;
00067   using namespace BeamType;
00068 
00069   const Detector_t det = Detector_t(eventInfo->header->detector);
00070   const SimFlag_t sim = SimFlag_t(eventInfo->header->dataType);
00071   const BeamType_t beam = BeamType_t(eventInfo->beam->beamType);
00072 
00073   MSG("NC::EventAdderBase", Msg::kInfo)
00074     << "This is "
00075     << eventInfo->header->softVersion << " "
00076     << AsString(det) << " "
00077     << AsString(beam) << " "
00078     << AsString(sim)
00079     << endl;
00080 
00081 
00082   // Hackish check to refuse to run on old-style files
00083   if(beam == 2){
00084     MSG("NC::EventAdderBase", Msg::kFatal)
00085       << "This file has beam.beamType==2, which is L000z200i. "
00086       << "You are probably running on an old file with the Zarko "
00087       << "numbering scheme (where 2 is L010z185i), but if you "
00088       << "really do want L000z200i, remove this message and recompile."
00089       << endl;
00090     abort();
00091   }
00092 }


Member Data Documentation

Number of FD runs to add from each chain.

Definition at line 77 of file NCEventAdder.h.

Referenced by NC::RealDataAdder::AddEventsToExtrapolations(), and Config().

Number of ND runs to add from each chain.

Definition at line 75 of file NCEventAdder.h.

Referenced by NC::RealDataAdder::AddEventsToExtrapolations(), and Config().


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

Generated on 16 Jan 2018 for loon by  doxygen 1.6.1