Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

Anp Namespace Reference

Handle class template - a simplified version of boost::intrusive_ptr. More...


Classes

class  Anp::AlgAdapt
class  Anp::AlgCaddy< T >
class  Anp::AlgEvent
class  Anp::AlgSnarl
class  Anp::AlgStore
class  Anp::Basic
class  Anp::DataItem< K, D >
struct  Anp::CoordXYZ
class  Anp::DrawSnarl
class  Anp::DrawSpan
class  Anp::EventAdcTab
class  Anp::EventDisplay
class  Anp::EventHitTab
class  Anp::RecordStore
class  Anp::SnarlAdcTab
class  Anp::SnarlTimeTab
class  Anp::StdHepTab
class  Anp::Event
class  Anp::EventTab
class  Anp::Factory< T >
class  Anp::FillData
struct  Anp::FillData::Tree
class  Anp::FillMuonId
struct  Anp::FillMuonId::PlaneData
class  Anp::FillSnarl
struct  Anp::CountPlaneStrip
struct  Anp::CountAboveBelow
class  Anp::FillTrackGeom
class  Anp::FluxInfo
class  Anp::Base
class  Anp::Handle< T >
class  Anp::Header
class  Anp::AxisInfo
class  Anp::HistInfo
class  Anp::HistMan
class  Anp::Bin< T >
class  Anp::Hist1d< T >
class  Anp::KeyPair< T >
class  Anp::AlgThread
struct  Anp::PrevDataKey
class  Anp::FillkNN
class  Anp::RunkNN
class  Anp::FitPoint
class  Anp::LocalFit
class  Anp::FillMadId
class  Anp::Lock< T >
class  Anp::Mutex
class  Anp::CountHist
class  Anp::DataCorr
class  Anp::PlotBasic
class  Anp::PlotData
class  Anp::PlotEff
class  Anp::PlotEvent
class  Anp::PlotPmt
class  Anp::PlotPur
class  Anp::PlotResol
class  Anp::PlotReson
class  Anp::PlotSelect
class  Anp::PlotShower
class  Anp::PlotSnarl
class  Anp::PlotTrack
class  Anp::PlotTrackGeom
class  Anp::PlotTruth
class  Anp::PlotVtx
struct  Anp::PlaneHitColl
class  Anp::PmtHit
class  Anp::RecoNu
class  Anp::Record
class  Anp::RunAlgEvent
class  Anp::RunAlgSnarl
class  Anp::RunFinder
class  Anp::RunModule
class  Anp::FiducialCut
class  Anp::SelectAntiNeutrino
class  Anp::SelectBeam
class  Anp::SelectCount
class  Anp::SelectFiducial
class  Anp::SelectFlux
class  Anp::SelectKinem
class  Anp::SelectNeutrino
class  Anp::SelectSpill
class  Anp::Shower
class  Anp::StdHep
class  Anp::FillBasic
class  Anp::FillEnergy
class  Anp::FillEvent
class  Anp::FillHeader
class  Anp::FillShower
class  Anp::FillStrip
class  Anp::FillTrack
class  Anp::FillTruth
class  Anp::Interface
class  Anp::RunAlgStore
class  Anp::Strip
struct  Anp::Strip::TrackInfo
struct  Anp::BySigCor
struct  Anp::ByPlaneStrip
class  Anp::Track
class  Anp::TrueNu
class  Anp::TruthReco
class  Anp::WeightReco
class  Anp::Truth
class  Anp::Vertex

Typedefs

typedef Anp::Handle< Anp::AlgAdaptAlgAdaptPtr
typedef Anp::Handle< Anp::AlgEventAlgEventPtr
typedef Anp::Handle< Anp::AlgSnarlAlgSnarlPtr
typedef Anp::Handle< Anp::AlgStoreAlgStorePtr
typedef DataItem< std::string,
Float_t > 
StringData
typedef DataItem< Short_t,
Float_t > 
Data
typedef std::vector< Anp::DataDataVec
typedef DataVec::const_iterator DataIter
typedef DataVec::iterator DataIterator
typedef Anp::Handle< Anp::EventTabEventTabPtr
typedef std::vector< Anp::Event
>::const_iterator 
EventIter
typedef std::vector< Anp::Track
>::const_iterator 
TrackIter
typedef std::vector< Anp::Truth
>::const_iterator 
TruthIter
typedef std::vector< Anp::Strip
>::const_iterator 
StripIter
typedef std::vector< Anp::Shower
>::const_iterator 
ShowerIter
typedef std::vector< Anp::StdHep
>::const_iterator 
StdHepIter
typedef std::vector< Anp::Event
>::iterator 
EventIterator
typedef std::vector< Anp::Track
>::iterator 
TrackIterator
typedef std::vector< Anp::Truth
>::iterator 
TruthIterator
typedef std::vector< Anp::Strip
>::iterator 
StripIterator
typedef std::vector< Anp::Shower
>::iterator 
ShowerIterator
typedef std::vector< Anp::StdHep
>::iterator 
StdHepIterator
typedef std::vector< StripIterStripVec
typedef std::vector< TrackIterTrackVec
typedef std::vector< ShowerIterShowerVec
typedef std::vector< Anp::TruthReco
>::const_iterator 
TruthRecoIter
typedef std::vector< Anp::TruthReco
>::iterator 
TruthRecoIterator
typedef std::vector< Anp::WeightReco
>::const_iterator 
WeightRecoIter

Functions

template<class T>
unsigned int NameWidth (const std::vector< AlgCaddy< T > > &vec)
template<class T>
unsigned int NumbWidth (const std::vector< AlgCaddy< T > > &vec)
template<class K, class D>
bool operator< (const DataItem< K, D > &lhs, const DataItem< K, D > &rhs)
template<class K, class D>
bool operator< (const DataItem< K, D > &lhs, const K &rhs)
template<class K, class D>
bool operator< (const K &lhs, const DataItem< K, D > &rhs)
template<class K, class D>
bool operator== (const DataItem< K, D > &lhs, const DataItem< K, D > &rhs)
template<class K, class D>
bool operator== (const DataItem< K, D > &lhs, const K &rhs)
template<class K, class D>
bool operator== (const K &lhs, const DataItem< K, D > &rhs)
std::ostream & operator<< (std::ostream &os, const Data &data)
bool ReadRegistry (const std::string &filepath, Registry &reg, bool quiet=true)
const std::pair< std::string,
bool > 
GetString (const std::string &prefix, const std::string &key, const Registry &reg)
bool Read (const Registry &reg, const std::string &key, bool &value)
bool Read (const Registry &reg, const std::string &key, std::string &value)
TDirectory * GetDir (std::string path, TDirectory *dir)
float uv2x (float u, float v)
float uv2y (float u, float v)
float xy2u (float x, float y)
float xy2v (float x, float y)
double pi ()
double angle (double x, double y)
const CoordXYZ gnumi_to_near (const CoordXYZ pos)
const CoordXYZ near_to_gnumi (const CoordXYZ pos)
const CoordXYZ gnumi_to_far (const CoordXYZ pos)
const CoordXYZ far_to_gnumi (const CoordXYZ pos)
bool operator== (short index, const Event &event)
bool operator== (const Event &event, short index)
bool operator== (const Event &lhs, const Event &rhs)
bool operator== (const Event &event, const Shower &shower)
bool operator== (const Shower &shower, const Event &event)
bool operator== (const Track &track, const Event &event)
bool operator== (const Event &event, const Track &track)
bool operator== (const CountPlaneStrip &lhs, const CountPlaneStrip &rhs)
template<typename T>
std::ostream & operator<< (std::ostream &o, const Handle< T > &handle)
const std::string GetBEAMTYPE (const Header &header)
const std::string GetDATATYPE (const Header &header)
const std::string GetDETECTOR (const Header &header)
const std::string GetMCRLTYPE (const Header &header)
const std::string GetRECOTYPE (const Header &header)
const VldContext GetValidity (const Header &header)
bool operator== (const Header &lhs, const Header &rhs)
bool operator!= (const Header &lhs, const Header &rhs)
std::ostream & operator<< (std::ostream &o, const Header &self)
std::ostream & operator<< (std::ostream &o, const HistInfo &self)
std::ostream & operator<< (std::ostream &o, const AxisInfo &self)
template<typename T>
bool operator< (const Bin< T > &lhs, const Bin< T > &rhs)
template<typename T>
bool operator< (const Bin< T > &lhs, const T &rhs)
template<typename T>
bool operator< (const T &lhs, const Bin< T > &rhs)
template<typename T>
bool operator< (const Bin< T > &lhs, unsigned int bin)
template<typename T>
bool operator< (unsigned int bin, const Bin< T > &rhs)
template<typename T>
bool operator== (const Bin< T > &lhs, unsigned int bin)
template<typename T>
bool operator== (unsigned int bin, const Bin< T > &rhs)
template<typename T>
Bin< T > Merge (const Bin< T > &lhs, const Bin< T > &rhs)
template<typename T>
TH1 * CreateTH1 (const Hist1d< T > &h, const std::string &name="h")
template<typename T>
std::ostream & operator<< (std::ostream &o, const Bin< T > &self)
template<typename T>
GetKernelOverlap (const T lpos, const T rpos, const T cpos, const T width)
template<typename T>
std::ostream & operator<< (std::ostream &o, const Hist1d< T > &self)
template<typename T>
std::ostream & operator<< (std::ostream &o, const KeyPair< T > &self)
void * run_alg_thread (void *data_)
bool operator== (const FitPoint &lhs, const FitPoint &rhs)
bool operator< (const FitPoint &lhs, const FitPoint &rhs)
bool operator< (double value, const FitPoint &fit)
bool operator< (const FitPoint &rhs, double value)
bool operator== (int index, const FitPoint &fit)
bool operator== (const FitPoint &fit, int index)
bool operator== (const Anp::Handle< Anp::CountHist > &lhs, const Anp::Handle< Anp::CountHist > &rhs)
bool operator< (const PlaneHitColl &lhs, const PlaneHitColl &rhs)
bool operator== (const PlaneHitColl &lhs, const PlaneHitColl &rhs)
bool operator< (const short lhs, const PlaneHitColl &rhs)
bool operator< (const PlaneHitColl &lhs, const short rhs)
bool operator== (const short lhs, const PlaneHitColl &rhs)
bool operator== (const PlaneHitColl &lhs, const short rhs)
bool operator== (short index, const RecoNu &reco)
bool operator== (const RecoNu &reco, short index)
bool operator== (const RecoNu &lhs, const RecoNu &rhs)
TrackIter LongestTrack (const Event &event, const Record &record)
TrackVec GetTrack (const Event &event, const Record &record)
ShowerVec GetShower (const Event &event, const Record &record)
StripVec GetStrip (const Event &event, const Record &record, const char *view=0)
StripVec GetStrip (const Track &track, const Record &record, const char *view=0)
StripVec GetStrip (const Shower &shower, const Record &record, const char *view=0)
bool operator== (short index, const Shower &shower)
bool operator== (const Shower &shower, short index)
bool operator== (const Shower &lhs, const Shower &rhs)
bool operator== (short index, const Strip &strip)
bool operator== (const Strip &strip, short index)
bool operator== (const Strip &lhs, const Strip &rhs)
bool operator== (short index, const Track &track)
bool operator== (const Track &track, short index)
bool operator== (const Track &lhs, const Track &rhs)
const std::map< short, float > GetTrackData (const Track &track)
bool operator== (short index, const TrueNu &reco)
bool operator== (const TrueNu &reco, short index)
bool operator== (const TrueNu &lhs, const TrueNu &rhs)
bool operator== (const TrueNu &tnu, const RecoNu &rnu)
bool operator== (const RecoNu &rnu, const TrueNu &tnu)
bool operator== (short index, const Truth &truth)
bool operator== (const Truth &truth, short index)
bool operator== (const Truth &lhs, const Truth &rhs)
bool operator== (const Event &event, const Truth &truth)
bool operator== (const Truth &truth, const Event &event)
bool operator== (const RecoNu &reco, const Truth &truth)
bool operator== (const Truth &truth, const RecoNu &reco)
bool operator== (const Track &track, const Truth &truth)
bool operator== (const Truth &truth, const Track &track)

Variables

const double GNUMINearX = 1.48844
const double GNUMINearY = 0.0
const double GNUMINearZ = 1039.35
const double GNUMIFarX = 0.0
const double GNUMIFarY = 0.0
const double GNUMIFarZ = 735.34E3
const double GNUMICosZ = 0.998318471
const double GNUMISinZ = 0.057967487


Detailed Description

Handle class template - a simplified version of boost::intrusive_ptr.

Abstract Factory template that handles arbitrary types

This template creates Factory stores creator functors to template parameter class. Factory is a singelton class which is explicitly deleted.

Source: Andrei Alexandrescu, Modern C++ Design


Typedef Documentation

typedef Anp::Handle<Anp::AlgAdapt> Anp::AlgAdaptPtr
 

Definition at line 88 of file AlgAdapt.h.

Referenced by Anp::SelectFlux::GetAlg(), and Anp::SelectFlux::SetWeight().

typedef Anp::Handle<Anp::AlgEvent> Anp::AlgEventPtr
 

Definition at line 66 of file AlgEvent.h.

Referenced by Anp::RunAlgEvent::Config(), Anp::RunAlgEvent::End(), Anp::PlotSelect::End(), Anp::SelectCount::GetCount(), Anp::PlotSelect::GetEnu(), Anp::PlotSelect::GetRes(), Anp::PlotSelect::GetSel(), Anp::RunAlgEvent::Run(), and Anp::PlotSelect::Run().

typedef Anp::Handle<Anp::AlgSnarl> Anp::AlgSnarlPtr
 

Definition at line 72 of file AlgSnarl.h.

Referenced by Anp::RunAlgSnarl::Config(), Anp::SelectKinem::End(), Anp::SelectFlux::End(), Anp::RunAlgSnarl::End(), Anp::SelectKinem::GetAlg(), Anp::SelectFlux::GetAlg(), Anp::SelectKinem::Run(), and Anp::SelectFlux::Run().

typedef Anp::Handle<Anp::AlgStore> Anp::AlgStorePtr
 

Definition at line 62 of file AlgStore.h.

Referenced by Anp::RunAlgStore::Config(), and Anp::RunAlgStore::Run().

typedef DataItem<Short_t, Float_t> Anp::Data
 

Definition at line 61 of file DataItem.h.

Referenced by Anp::Truth::Add(), Anp::TrueNu::Add(), Anp::Track::Add(), Anp::Strip::Add(), Anp::Record::Add(), Anp::RecoNu::Add(), Anp::Event::Add(), attach_mrcc_path(), attach_mrcc_path_far(), Anp::Truth::DataAt(), Anp::TrueNu::DataAt(), Anp::Track::DataAt(), Anp::Strip::DataAt(), Anp::Record::DataAt(), Anp::RecoNu::DataAt(), Anp::Event::DataAt(), TGeant3::DefineParticle(), Anp::FillkNN::Fill(), Anp::FillData::Fill(), Anp::DataCorr::Fill(), Anp::FillTruth::FillBeamWeight(), Anp::FillkNN::Find(), RerootToTruthModule::Get(), RerootFlsDigitToDigiPE::Get(), Anp::FillkNN::Get(), Anp::Interface::GetData(), GetTrackData(), Anp::PrevDataKey::operator()(), NCExtrapolationJK::PredictSpectrum(), Anp::PrevDataKey::PrevDataKey(), Anp::TrueNu::Print(), Anp::Event::Print(), Anp::PlotSnarl::Run(), Anp::FillkNN::Run(), and Anp::Truth::WeightBeam().

typedef DataVec::const_iterator Anp::DataIter
 

Definition at line 63 of file DataItem.h.

Referenced by Anp::Truth::DataAt(), Anp::TrueNu::DataAt(), Anp::Track::DataAt(), Anp::Strip::DataAt(), Anp::Record::DataAt(), Anp::RecoNu::DataAt(), Anp::Event::DataAt(), Anp::Truth::DataBeg(), Anp::Track::DataBeg(), Anp::Strip::DataBeg(), Anp::Record::DataBeg(), Anp::Event::DataBeg(), Anp::Truth::DataEnd(), Anp::Track::DataEnd(), Anp::Strip::DataEnd(), Anp::Record::DataEnd(), Anp::Event::DataEnd(), Anp::FillkNN::Fill(), Anp::FillData::Fill(), Anp::DataCorr::Fill(), Anp::Plot::Data::Fill(), Anp::FillkNN::Get(), Anp::Interface::GetData(), GetTrackData(), and Anp::PlotSnarl::Run().

typedef DataVec::iterator Anp::DataIterator
 

Definition at line 64 of file DataItem.h.

Referenced by Anp::Track::DataBegIterator(), Anp::Event::DataBegIterator(), Anp::Track::DataEndIterator(), Anp::Event::DataEndIterator(), Anp::Track::Erase(), and Anp::Event::Erase().

typedef std::vector<Anp::Data> Anp::DataVec
 

Definition at line 62 of file DataItem.h.

Referenced by Anp::FillkNN::Find(), and Anp::FillkNN::Run().

typedef std::vector<Anp::Event>::const_iterator Anp::EventIter
 

Definition at line 25 of file Record.h.

Referenced by Anp::AlgCaddy< T >::AllSnarl(), Anp::Record::EventBeg(), Anp::Record::EventEnd(), Anp::FillTruth::FillBeamWeight(), Anp::Record::FindEvent(), Anp::Interface::GetData(), Anp::FillTruth::IsConsistent(), Anp::AlgCaddy< T >::OutSnarl(), Anp::SelectFiducial::PassTruth(), Anp::SelectFiducial::Run(), Anp::RunkNN::Run(), Anp::PlotVtx::Run(), Anp::PlotData::Run(), Anp::PlotBasic::Run(), and Anp::FillData::Run().

typedef std::vector<Anp::Event>::iterator Anp::EventIterator
 

Definition at line 32 of file Record.h.

Referenced by Anp::RunkNN::AddData(), Anp::RunkNN::CutData(), Anp::Record::Erase(), Anp::Record::EventBegIterator(), Anp::Record::EventEndIterator(), Anp::SelectNeutrino::Run(), Anp::SelectKinem::Run(), Anp::SelectFiducial::Run(), Anp::SelectAntiNeutrino::Run(), Anp::RunkNN::Run(), Anp::RunAlgEvent::Run(), Anp::PlotTruth::Run(), Anp::PlotShower::Run(), Anp::PlotSelect::Run(), Anp::PlotPur::Run(), Anp::PlotEvent::Run(), Anp::FillMuonId::Run(), Anp::FillMadId::Run(), Anp::FillkNN::Run(), Anp::FillEnergy::Run(), Anp::AlgThread::Run(), and Anp::SelectFlux::SetWeight().

typedef Anp::Handle<Anp::EventTab> Anp::EventTabPtr
 

Definition at line 54 of file EventTab.h.

Referenced by Anp::EventDisplay::Add(), Anp::DrawSnarl::Config(), Anp::EventDisplay::GetCurrent(), Anp::EventDisplay::InitTab(), and Anp::EventDisplay::PrintTab().

typedef std::vector<Anp::Shower>::const_iterator Anp::ShowerIter
 

Definition at line 29 of file Record.h.

Referenced by Anp::FillEvent::Fill(), GetShower(), Anp::PlotShower::Run(), Anp::PlotBasic::Run(), Anp::FillEnergy::Run(), Anp::Record::ShowerBeg(), and Anp::Record::ShowerEnd().

typedef std::vector<Anp::Shower>::iterator Anp::ShowerIterator
 

Definition at line 36 of file Record.h.

Referenced by Anp::Record::Erase(), Anp::SelectNeutrino::Run(), Anp::SelectFiducial::Run(), Anp::FillEnergy::Run(), Anp::Record::ShowerBegIterator(), and Anp::Record::ShowerEndIterator().

typedef std::vector<ShowerIter> Anp::ShowerVec
 

Definition at line 41 of file Record.h.

Referenced by GetShower(), and Anp::EventHitTab::SetShowers().

typedef std::vector<Anp::StdHep>::const_iterator Anp::StdHepIter
 

Definition at line 30 of file Record.h.

Referenced by Anp::Record::FindStdHep(), Anp::FillTruth::IsConsistent(), Anp::PlotData::Particle(), Anp::Draw::Read(), Anp::FillTruth::Run(), Anp::FillMuonId::Run(), Anp::Record::StdHepBeg(), and Anp::Record::StdHepEnd().

typedef std::vector<Anp::StdHep>::iterator Anp::StdHepIterator
 

Definition at line 37 of file Record.h.

Referenced by Anp::Record::Erase(), Anp::SelectFiducial::Run(), Anp::Record::StdHepBegIterator(), and Anp::Record::StdHepEndIterator().

typedef DataItem<std::string, Float_t> Anp::StringData
 

Definition at line 60 of file DataItem.h.

typedef std::vector<Anp::Strip>::const_iterator Anp::StripIter
 

Definition at line 28 of file Record.h.

Referenced by Anp::SnarlAdcTab::Add(), Anp::PlotPmt::Collect(), Anp::FillSnarl::Fill(), GetStrip(), Anp::SnarlTimeTab::NewSnarl(), Anp::FillMuonId::Select(), Anp::SnarlTimeTab::Set(), Anp::Record::StripBeg(), and Anp::Record::StripEnd().

typedef std::vector<Anp::Strip>::iterator Anp::StripIterator
 

Definition at line 35 of file Record.h.

Referenced by Anp::Record::Erase(), Anp::Record::StripBegIterator(), and Anp::Record::StripEndIterator().

typedef std::vector<StripIter> Anp::StripVec
 

Definition at line 39 of file Record.h.

Referenced by GetStrip(), Anp::StdHepTab::Set(), Anp::SnarlAdcTab::Set(), Anp::EventAdcTab::Set(), Anp::EventHitTab::SetShowers(), and Anp::EventHitTab::SetTrack().

typedef std::vector<Anp::Track>::const_iterator Anp::TrackIter
 

Definition at line 26 of file Record.h.

Referenced by Anp::RunkNN::AddData(), Anp::FillEvent::Fill(), Anp::Interface::GetData(), GetTrack(), Anp::FillTruth::IsConsistent(), LongestTrack(), Anp::SelectFiducial::PassTruth(), Anp::PlotData::Plot(), Anp::SelectNeutrino::Run(), Anp::SelectFiducial::Run(), Anp::RunkNN::Run(), Anp::PlotVtx::Run(), Anp::PlotTrackGeom::Run(), Anp::PlotTrack::Run(), Anp::PlotSelect::Run(), Anp::PlotPmt::Run(), Anp::PlotData::Run(), Anp::PlotBasic::Run(), Anp::FillMuonId::Run(), Anp::FillkNN::Run(), Anp::FillEnergy::Run(), Anp::FillData::Run(), Anp::SelectAntiNeutrino::Run1(), Anp::SelectAntiNeutrino::Run2(), Anp::Record::TrackBeg(), and Anp::Record::TrackEnd().

typedef std::vector<Anp::Track>::iterator Anp::TrackIterator
 

Definition at line 33 of file Record.h.

Referenced by Anp::Record::Erase(), Anp::SelectNeutrino::Run(), Anp::SelectFiducial::Run(), Anp::RunkNN::Run(), Anp::FillTruth::Run(), Anp::FillTrackGeom::Run(), Anp::FillMuonId::Run(), Anp::FillkNN::Run(), Anp::AlgThread::Run(), Anp::Record::TrackBegIterator(), and Anp::Record::TrackEndIterator().

typedef std::vector<TrackIter> Anp::TrackVec
 

Definition at line 40 of file Record.h.

Referenced by GetTrack(), and Anp::EventHitTab::Set().

typedef std::vector<Anp::Truth>::const_iterator Anp::TruthIter
 

Definition at line 27 of file Record.h.

Referenced by Anp::RunkNN::AddData(), Anp::Record::FindStdHep(), Anp::Record::FindTruth(), Anp::FillTruth::IsConsistent(), Anp::PlotData::Plot(), Anp::RecordStore::PrintTruth(), Anp::SelectFiducial::Run(), Anp::SelectCount::Run(), Anp::PlotVtx::Run(), Anp::PlotTruth::Run(), Anp::PlotTrack::Run(), Anp::PlotSelect::Run(), Anp::PlotPur::Run(), Anp::PlotEff::Run(), Anp::PlotData::Run(), Anp::FillkNN::Run(), Anp::SelectKinem::Select(), Anp::StdHepTab::Set(), Anp::Record::TruthBeg(), and Anp::Record::TruthEnd().

typedef std::vector<Anp::Truth>::iterator Anp::TruthIterator
 

Definition at line 34 of file Record.h.

Referenced by Anp::Record::Erase(), Anp::SelectFiducial::Run(), Anp::SelectFlux::SetWeight(), Anp::Record::TruthBegIterator(), and Anp::Record::TruthEndIterator().

typedef std::vector<Anp::TruthReco>::const_iterator Anp::TruthRecoIter
 

Definition at line 101 of file Truth.h.

Referenced by Anp::RunkNN::AddData(), Anp::Truth::Find(), Anp::Record::FindStdHep(), Anp::FillTruth::IsConsistent(), Anp::PlotTruth::Plot(), Anp::RecordStore::PrintTruth(), Anp::Truth::RecoBeg(), Anp::Truth::RecoEnd(), Anp::SelectFiducial::Run(), Anp::PlotEff::Run(), and Anp::TrueNu::TrueNu().

typedef std::vector<Anp::TruthReco>::iterator Anp::TruthRecoIterator
 

Definition at line 102 of file Truth.h.

Referenced by Anp::Truth::Erase(), Anp::Truth::RecoBegIterator(), Anp::Truth::RecoEndIterator(), and Anp::SelectFiducial::Run().

typedef std::vector<Anp::WeightReco>::const_iterator Anp::WeightRecoIter
 

Definition at line 103 of file Truth.h.

Referenced by Anp::Truth::FindWeight(), Anp::SelectFlux::SetWeight(), Anp::Truth::WeightBeg(), and Anp::Truth::WeightEnd().


Function Documentation

double Anp::angle double  x,
double  y
 

Definition at line 86 of file Default.cxx.

References angle(), and pi().

Referenced by angle(), Anp::FillTrackGeom::Fill(), Anp::PlotTrack::FillGeometry(), Anp::PlotTrackGeom::FillProjection(), Anp::PlotTrackGeom::FillRotation(), Anp::PlotTrack::FillRotation(), Anp::PlotTrackGeom::FillXProduct(), and Anp::PlotEvent::Plot().

00087 {
00088    const double radius = std::sqrt(x*x + y*y);
00089    
00090    if(!(radius > 0.0))
00091    {
00092       return 0.0;
00093    }
00094    
00095    if(!(+x < radius))
00096    {
00097       return std::acos(+1.0);
00098    }
00099    if(!(-x < radius))
00100    {
00101       return std::acos(-1.0);
00102    }
00103 
00104    double angle = std::acos(x/radius);
00105    
00106    if(y < 0.0)
00107    {
00108       angle = 2.0 * pi() - angle;
00109    }
00110 
00111    return angle;
00112 }

template<typename T>
TH1 * Anp::CreateTH1 const Hist1d< T > &  h,
const std::string &  name = "h"
 

Definition at line 983 of file Hist1d.h.

References Anp::Hist1d< T >::GetBins(), and Anp::Hist1d< T >::GetIntegral().

00984    {
00985       const std::vector<Bin<T> > &bvec = h.GetBins();
00986 
00987       if(bvec.empty())
00988       {
00989          return 0;
00990       }
00991 
00992       double *array = new double[bvec.size() - 1];
00993 
00994       for(int ibin = 1; ibin < int(bvec.size()); ++ibin)
00995       {
00996          array[ibin - 1] = bvec[ibin].edge();
00997       }
00998 
00999       TH1 *th1 = new TH1D(name.c_str(), name.c_str(), bvec.size() - 2, array);
01000 
01001       delete [] array;
01002 
01003       for(int ibin = 0; ibin < int(bvec.size()); ++ibin)
01004       {
01005          th1 -> SetBinContent(ibin, bvec[ibin].sum());
01006       }
01007 
01008       th1 -> SetDirectory(0);
01009       th1 -> SetEntries(h.GetIntegral("UO"));
01010 
01011       return th1;
01012    }

const Anp::CoordXYZ Anp::far_to_gnumi const CoordXYZ  pos  ) 
 

Definition at line 75 of file Default.cxx.

References GNUMICosZ, GNUMISinZ, Anp::CoordXYZ::y, and Anp::CoordXYZ::z.

00076 {
00077    CoordXYZ new_pos = pos;
00078    
00079    new_pos.z =  pos.z * GNUMICosZ + pos.y * GNUMISinZ + GNUMIFarZ;
00080    new_pos.y = -pos.z * GNUMISinZ + pos.y * GNUMICosZ;
00081 
00082    return new_pos;
00083 }

const std::string Anp::GetBEAMTYPE const Header header  ) 
 

Definition at line 187 of file Header.cxx.

References Anp::Header::GetBeamType(), and Anp::Header::IsValid().

Referenced by Anp::RunModule::Init(), and Anp::RunkNN::SaveParts().

00188 {  
00189    //
00190    // Return beam type type as std::string
00191    //
00192 
00193    if(!header.IsValid())
00194    {
00195       cerr << "Anp::GetBEAMTYPE - invalid Header" << endl;
00196       return "unknown";
00197    }
00198 
00199    if(!header.GetBeamType().Data())
00200    {
00201       cerr << "Anp::GetBEAMTYPE - invalid beam type string" << endl;
00202       return "unknown";
00203    }
00204    
00205    return header.GetBeamType().Data();
00206 }

const std::string Anp::GetDATATYPE const Header header  ) 
 

Definition at line 209 of file Header.cxx.

References GetMCRLTYPE(), Anp::Header::IsData(), Anp::Header::IsValid(), and Anp::Header::RunPeriod().

Referenced by Anp::RunModule::Init().

00210 {  
00211    //
00212    // Return data type type as std::string
00213    //    for data return run period: run-1, run-2, run-3, etc
00214    //    for simulation return Monte-Carlo release type
00215 
00216    if(!header.IsValid())
00217    {
00218       cerr << "Anp::GetBEAMTYPE - invalid Header" << endl;
00219       return "unknown";
00220    }
00221 
00222    if(header.IsData())
00223    {
00224       stringstream rname;
00225       rname << "run-" << header.RunPeriod();
00226       return rname.str();
00227    }
00228    else
00229    {
00230       return Anp::GetMCRLTYPE(header);
00231    }
00232    
00233    return "unknown";
00234 }

const std::string Anp::GetDETECTOR const Header header  ) 
 

Definition at line 237 of file Header.cxx.

References Anp::Header::IsFar(), Anp::Header::IsNear(), and Anp::Header::IsValid().

Referenced by Anp::RunModule::Init(), and Anp::RunkNN::SaveParts().

00238 {
00239    if(!header.IsValid())
00240    {
00241       cerr << "Anp::GetDETECTOR - invalid Header" << endl;
00242       return "unknown";
00243    }
00244 
00245    if(header.IsNear())
00246    {
00247       return "near";
00248    }
00249    else if(header.IsFar())
00250    {
00251       return "far";
00252    }
00253 
00254    cerr << "Anp::GetDETECTOR - unknown detector type" << endl;
00255 
00256    return "unknown";
00257 }

TDirectory * Anp::GetDir std::string  path,
TDirectory *  dir
 

Definition at line 308 of file Default.cxx.

Referenced by Anp::PlotPur::Add(), Anp::PlotEff::Add(), Anp::FillData::Config(), Anp::PlotData::Get(), Anp::SelectKinem::GetAlg(), Anp::SelectFlux::GetAlg(), Anp::SelectCount::GetCount(), Anp::PlotSelect::GetEnu(), Anp::PlotReson::GetPlot(), Anp::PlotSelect::GetRes(), Anp::PlotSelect::GetSel(), Anp::SelectKinem::Set(), Anp::SelectFlux::Set(), Anp::SelectCount::Set(), Anp::PlotVtx::Set(), Anp::PlotSnarl::Set(), Anp::PlotShower::Set(), Anp::PlotSelect::Set(), Anp::PlotPur::Set(), Anp::PlotPmt::Set(), Anp::PlotEff::Set(), Anp::PlotData::Set(), Anp::PlotBasic::Set(), and Anp::FillData::Set().

00309 {
00310    //
00311    // Recursively reate directory path in dir
00312    //
00313    if(!dir || path.empty() || path == "/")
00314    {
00315       return dir;
00316    }
00317    
00318    // remove trailing slash if present
00319    if(path.substr(path.size() - 1, 1) == "/")
00320    {
00321       path = path.substr(0, path.size() - 1);
00322    }
00323 
00324    std::string::size_type pos = path.find_last_of('/');
00325    if(pos != std::string::npos)
00326    {
00327       // recursively walk upward until all slash characters are removed
00328       dir = GetDir(path.substr(0, pos), dir);
00329 
00330       // make directory path of last substring without slash
00331       path = path.substr(pos + 1, path.size() - pos);
00332    }
00333 
00334    if(dir -> Get(path.c_str()))
00335    {
00336       return dynamic_cast<TDirectory *>(dir -> Get(path.c_str()));
00337    }
00338    
00339    return dir -> mkdir(path.c_str());
00340 }

template<typename T>
T GetKernelOverlap const T  lpos,
const T  rpos,
const T  cpos,
const T  width
[inline]
 

Definition at line 293 of file Hist1d.h.

00294    {
00295       // Compute fraction of kernel intergral for kernel centered at x0 = cpos 
00296       // and between lpos and rpos boundaries. Kernel function is (1-((x-x0)/w)^2)^2
00297       // for x < 1.0 and 0 otherwise. Kerner integral I(x) = (x - 2*x^3/3 + x^5/5)/C,
00298       // where C = 16/15.
00299       
00300       if(!(lpos < rpos) || !(width > 0.0))
00301       {
00302          std::cerr << "GetKernelOverlap - invalid input parameters (" 
00303                    << lpos << ", " << rpos << ", " << cpos << ", " << width << ")" << std::endl;
00304          return 0;
00305       }
00306 
00307       T ledge = cpos - width;
00308       T redge = cpos + width;
00309 
00310       if(ledge < lpos) ledge = lpos;
00311       if(redge > rpos) redge = rpos;
00312       
00313       const T x1 = (ledge - cpos)/width;
00314       const T x2 = (redge - cpos)/width;
00315 
00316       const T I1 = x1 - 2.0*x1*x1*x1/3.0 + x1*x1*x1*x1*x1/5.0;
00317       const T I2 = x2 - 2.0*x2*x2*x2/3.0 + x2*x2*x2*x2*x2/5.0;
00318 
00319       const T overlap = 15.0*(I2 - I1)/16.0;
00320 
00321       //std::cout << "(lpos, rpos, cpos) = (" 
00322       //<< lpos << ", " << rpos << ", " << cpos << ")" << std::endl
00323       //<< "(ledg, redg, width, overlap) = (" 
00324       //<< ledge << ", " << redge << ", " << width << ", " << overlap << ")" << std::endl;
00325 
00326       return overlap;
00327    }

const std::string Anp::GetMCRLTYPE const Header header  ) 
 

Definition at line 297 of file Header.cxx.

References ReleaseType::GetMCSubVersion(), ReleaseType::IsDaikon(), Anp::Header::IsData(), Anp::Header::IsValid(), and Anp::Header::Release().

Referenced by GetDATATYPE(), and Anp::RunkNN::SaveParts().

00298 {  
00299    //
00300    // Return Monte-Carlo release type as string formatted for batch processing.
00301    //
00302 
00303    if(!header.IsValid())
00304    {
00305       cerr << "Anp::GetMCRLTYPE - invalid Header" << endl;
00306       return "unknown";
00307    }
00308 
00309    if(header.IsData())
00310    {
00311       return "unknown";
00312    }
00313 
00314   const int rtype = header.Release();
00315 
00316    const int mcver = ReleaseType::GetMCSubVersion(rtype);
00317    if(ReleaseType::IsDaikon(rtype) && mcver >= 0 && mcver <= 99)
00318    {
00319       stringstream mctype;
00320       mctype << "daikon_" << setw(2) << setfill('0') << mcver;
00321       return mctype.str();
00322    }
00323 
00324    cerr << "Anp::GetMCRLTYPE - unknown Monte-Carlo release" << endl;
00325 
00326    return "unknown";
00327 }

const std::string Anp::GetRECOTYPE const Header header  ) 
 

Definition at line 260 of file Header.cxx.

References ReleaseType::GetRecoSubVersion(), ReleaseType::IsCedar(), Anp::Header::IsValid(), and Anp::Header::Release().

Referenced by Anp::RunModule::Init(), and Anp::RunkNN::SaveParts().

00261 {
00262    //
00263    // Return reconstruction release type as string formatted for batch processing.
00264    //
00265 
00266    if(!header.IsValid())
00267    {
00268       cerr << "Anp::GetRECOTYPE - invalid Header" << endl;
00269       return "unknown";
00270    }
00271    
00272    const int rtype = header.Release();
00273    
00274    if(ReleaseType::IsCedar(rtype))
00275    {
00276       if(ReleaseType::GetRecoSubVersion(rtype) == 0 ||
00277          ReleaseType::GetRecoSubVersion(rtype) == 1)
00278       {
00279          return "cedar";
00280       }
00281       else if(ReleaseType::GetRecoSubVersion(rtype) == 2)
00282       {
00283          return "cedar_phy";
00284       }
00285       else if(ReleaseType::GetRecoSubVersion(rtype) == 3)
00286       {
00287          return "cedar_phy_bhcurv";
00288       }
00289    }
00290 
00291    cerr << "Anp::GetRECOTYPE - unknown reconstruction release" << endl;
00292 
00293    return "unknown";
00294 }

Anp::ShowerVec Anp::GetShower const Event &  event,
const Record &  record
 

Definition at line 369 of file Record.cxx.

References Anp::Event::MatchShower(), Anp::Record::ShowerBeg(), Anp::Record::ShowerEnd(), ShowerIter, and ShowerVec.

Referenced by Anp::FillEvent::Run(), and Anp::EventHitTab::SetShowers().

00370 {
00371    //
00372    // Find all showers that belongs this reconstructed event
00373    //
00374 
00375    ShowerVec vec;
00376    for(ShowerIter shower = record.ShowerBeg(); shower != record.ShowerEnd(); ++shower)
00377    {
00378       if(event.MatchShower(shower -> ShowerIndex()))
00379       {
00380          vec.push_back(shower);
00381       }
00382    }   
00383    return vec;
00384 }

const std::pair< std::string, bool > Anp::GetString const std::string &  prefix,
const std::string &  key,
const Registry reg
 

Definition at line 229 of file Default.cxx.

References Registry::Get().

Referenced by Anp::SelectCount::Config(), and PTGuiMainFrame::ProcessMessage().

00232 {
00233    std::pair<std::string, bool> result(std::string(""), false);
00234    
00235    if(prefix.empty() && key.empty())
00236    {
00237       return result;
00238    }
00239 
00240    const char *value_char = 0;
00241    if(reg.Get((prefix + key).c_str(), value_char)  && value_char)
00242    {
00243       result.first = value_char;
00244       result.second = true;      
00245    }
00246    else if(reg.Get(key.c_str(), value_char)  && value_char)
00247    {
00248       result.first = value_char;
00249       result.second = true;     
00250    }
00251 
00252    return result;
00253 }

Anp::StripVec Anp::GetStrip const Shower &  shower,
const Record &  record,
const char *  view = 0
 

Definition at line 475 of file Record.cxx.

References Anp::Shower::ShowerIndex(), Anp::Record::StripBeg(), Anp::Record::StripEnd(), StripIter, and StripVec.

00476 {
00477    //
00478    // Find all strips that belongs this reconstructed shower
00479    //
00480 
00481    short key = 0;
00482    if(view)
00483    {
00484       if(std::strcmp(view, "V") == 0 || std::strcmp(view, "v") == 0)
00485       {
00486          key = 3;
00487       }
00488       else if(std::strcmp(view, "U") == 0 || view && std::strcmp(view, "u") == 0)
00489       {
00490          key = 2;
00491       }
00492    }
00493 
00494    StripVec vec;
00495    for(StripIter strip = record.StripBeg(); strip != record.StripEnd(); ++strip)
00496    {
00497       if(!strip -> MatchShw(shower.ShowerIndex()))
00498       {
00499          continue;
00500       }
00501 
00502       if(key == 0)
00503       {
00504          vec.push_back(strip);
00505       }
00506       else if(key == 3 && strip -> IsVview())
00507       {
00508          vec.push_back(strip);
00509       }
00510       else if(key == 2 && strip -> IsUview())
00511       {
00512          vec.push_back(strip);
00513       }
00514    }
00515 
00516    return vec;
00517 }

Anp::StripVec Anp::GetStrip const Track &  track,
const Record &  record,
const char *  view = 0
 

Definition at line 431 of file Record.cxx.

References Anp::Record::StripBeg(), Anp::Record::StripEnd(), StripIter, StripVec, and Anp::Track::TrackIndex().

00432 {
00433    //
00434    // Find all strips that belongs this reconstructed track
00435    //
00436 
00437    short key = 0;
00438    if(view)
00439    {
00440       if(std::strcmp(view, "V") == 0 || std::strcmp(view, "v") == 0)
00441       {
00442          key = 3;
00443       }
00444       else if(std::strcmp(view, "U") == 0 || view && std::strcmp(view, "u") == 0)
00445       {
00446          key = 2;
00447       }
00448    }
00449 
00450    StripVec vec;
00451    for(StripIter strip = record.StripBeg(); strip != record.StripEnd(); ++strip)
00452    {
00453       if(!strip -> MatchTrk(track.TrackIndex()))
00454       {
00455          continue;
00456       }
00457 
00458       if(key == 0)
00459       {
00460          vec.push_back(strip);
00461       }
00462       else if(key == 3 && strip -> IsVview())
00463       {
00464          vec.push_back(strip);
00465       }
00466       else if(key == 2 && strip -> IsUview())
00467       {
00468          vec.push_back(strip);
00469       }
00470    }   
00471    return vec;
00472 }

Anp::StripVec Anp::GetStrip const Event &  event,
const Record &  record,
const char *  view = 0
 

Definition at line 387 of file Record.cxx.

References Anp::Event::EventIndex(), Anp::Record::StripBeg(), Anp::Record::StripEnd(), StripIter, and StripVec.

Referenced by Anp::PlotPmt::Collect(), Anp::FillSnarl::Fill(), Anp::RunModule::Run(), Anp::FillMuonId::Select(), Anp::StdHepTab::Set(), Anp::SnarlAdcTab::Set(), Anp::EventAdcTab::Set(), Anp::EventHitTab::SetShowers(), and Anp::EventHitTab::SetTrack().

00388 {
00389    //
00390    // Find all strips that belongs this reconstructed event
00391    //
00392 
00393    short key = 0;
00394    if(view)
00395    {
00396       if(std::strcmp(view, "V") == 0 || std::strcmp(view, "v") == 0)
00397       {
00398          key = 3;
00399       }
00400       else if(std::strcmp(view, "U") == 0 || view && std::strcmp(view, "u") == 0)
00401       {
00402          key = 2;
00403       }
00404    }
00405 
00406    StripVec vec;
00407    for(StripIter strip = record.StripBeg(); strip != record.StripEnd(); ++strip)
00408    {
00409       if(!strip -> MatchEvt(event.EventIndex()))
00410       {
00411          continue;
00412       }
00413 
00414       if(key == 0)
00415       {
00416          vec.push_back(strip);
00417       }
00418       else if(key == 3 && strip -> IsVview())
00419       {
00420          vec.push_back(strip);
00421       }
00422       else if(key == 2 && strip -> IsUview())
00423       {
00424          vec.push_back(strip);
00425       }
00426    }   
00427    return vec;
00428 }

Anp::TrackVec Anp::GetTrack const Event &  event,
const Record &  record
 

Definition at line 351 of file Record.cxx.

References Anp::Event::MatchTrack(), Anp::Record::TrackBeg(), Anp::Record::TrackEnd(), TrackIter, and TrackVec.

Referenced by Anp::FillEvent::Run(), and Anp::EventHitTab::Set().

00352 {
00353    //
00354    // Find all tracks that belongs this reconstructed event
00355    //
00356 
00357    TrackVec vec;
00358    for(TrackIter track = record.TrackBeg(); track != record.TrackEnd(); ++track)
00359    {
00360       if(event.MatchTrack(track -> TrackIndex()))
00361       {
00362          vec.push_back(track);
00363       }
00364    }   
00365    return vec;
00366 }

const std::map< short, float > Anp::GetTrackData const Track &  track  ) 
 

Definition at line 188 of file Track.cxx.

References Data, Anp::Track::DataBeg(), Anp::Track::DataEnd(), DataIter, and Anp::Corr::Key.

00189 {
00190    std::map<short, float> dmap;
00191    for(DataIter dit = track.DataBeg(); dit != track.DataEnd(); ++dit)
00192    {
00193       const short key  = dit -> Key();
00194       const float data = dit -> Data();
00195       
00196       std::map<short, float>::iterator fit = dmap.find(key);
00197       if(fit != dmap.end())
00198       {
00199          std::cerr << "Anp::GetTrackData() - found duplicate track data key" << std::endl;
00200          continue;
00201       }
00202 
00203       dmap.insert(std::pair<short, float>(key, data));
00204    }
00205    
00206    return dmap;
00207 }

const VldContext Anp::GetValidity const Header header  ) 
 

Definition at line 330 of file Header.cxx.

References Anp::Header::IsData(), Anp::Header::IsFar(), Anp::Header::IsNear(), Anp::Header::NSec(), and Anp::Header::Sec().

00331 {
00332    //
00333    // Convert Anp::Header to VldContext
00334    //
00335 
00336    const VldTimeStamp time(header.Sec(), header.NSec());
00337    if(header.IsData())
00338    {
00339       if(header.IsNear())
00340       {
00341          return VldContext(Detector::kNear, SimFlag::kData, time);
00342       }
00343       else if(header.IsFar())
00344       {
00345          return VldContext(Detector::kFar, SimFlag::kData, time);
00346       }
00347    }
00348    else
00349    {
00350       if(header.IsNear())
00351       {
00352          return VldContext(Detector::kNear, SimFlag::kMC, time);
00353       }
00354       else if(header.IsFar())
00355       {
00356          return VldContext(Detector::kFar, SimFlag::kMC, time);
00357       }
00358    }
00359 
00360    return VldContext(Detector::kUnknown, SimFlag::kUnknown, time);  
00361 }

const Anp::CoordXYZ Anp::gnumi_to_far const CoordXYZ  pos  ) 
 

Definition at line 64 of file Default.cxx.

References GNUMICosZ, GNUMISinZ, Anp::CoordXYZ::y, and Anp::CoordXYZ::z.

00065 {
00066    CoordXYZ new_pos = pos;
00067    
00068    new_pos.z = (pos.z - GNUMIFarZ) * GNUMICosZ - pos.y * GNUMISinZ;
00069    new_pos.y = (pos.z - GNUMIFarZ) * GNUMISinZ + pos.y * GNUMICosZ;
00070 
00071    return new_pos;
00072 }

const Anp::CoordXYZ Anp::gnumi_to_near const CoordXYZ  pos  ) 
 

Definition at line 40 of file Default.cxx.

References GNUMICosZ, GNUMISinZ, Anp::CoordXYZ::x, Anp::CoordXYZ::y, and Anp::CoordXYZ::z.

00041 {
00042    CoordXYZ new_pos;
00043    
00044    new_pos.x =   pos.x + GNUMINearX;
00045    new_pos.z =  (pos.z - GNUMINearZ) * GNUMICosZ + pos.y * GNUMISinZ;
00046    new_pos.y = -(pos.z - GNUMINearZ) * GNUMISinZ + pos.y * GNUMICosZ;
00047 
00048    return new_pos;
00049 }

Anp::TrackIter Anp::LongestTrack const Event &  event,
const Record &  record
 

Definition at line 520 of file Record.cxx.

References Anp::Event::MatchTrack(), Anp::Record::TrackBeg(), Anp::Record::TrackEnd(), and TrackIter.

Referenced by Anp::RunkNN::AddData(), Anp::FillEvent::Fill(), Anp::PlotData::Plot(), Anp::SelectNeutrino::Run(), Anp::SelectFiducial::Run(), Anp::PlotVtx::Run(), Anp::PlotTrack::Run(), Anp::PlotSelect::Run(), Anp::PlotBasic::Run(), Anp::FillMuonId::Run(), Anp::FillkNN::Run(), Anp::FillEnergy::Run(), Anp::SelectAntiNeutrino::Run1(), and Anp::SelectAntiNeutrino::Run2().

00521 {
00522    //
00523    // Find longest track that belongs this reconstructed event
00524    //
00525 
00526    TrackIter ltrack = record.TrackEnd();
00527 
00528    for(TrackIter itrack = record.TrackBeg(); itrack != record.TrackEnd(); ++itrack)
00529    {
00530       if(!event.MatchTrack(itrack -> TrackIndex()))
00531       {
00532          continue;
00533       }
00534 
00535       if(ltrack == record.TrackEnd())
00536       {
00537          ltrack = itrack;
00538       }
00539       else if(ltrack -> GetBasic().NPlaneScint() < itrack -> GetBasic().NPlaneScint())
00540       {
00541          ltrack = itrack;
00542       }
00543    }
00544 
00545    return ltrack;
00546 }

template<typename T>
Bin< T > Anp::Merge const Bin< T > &  lhs,
const Bin< T > &  rhs
[inline]
 

Definition at line 330 of file Hist1d.h.

References Anp::Bin< T >::bin(), Anp::Bin< T >::edge(), Anp::Bin< T >::entries(), Anp::Bin< T >::set_ent(), Anp::Bin< T >::set_sum(), Anp::Bin< T >::sum(), and Anp::Bin< T >::sum2().

00331    {
00332       Bin<T> bin(std::min<unsigned int>(lhs.bin(), rhs.bin()),
00333                  std::min<T>(lhs.edge(), rhs.edge()));
00334 
00335       bin.set_sum(lhs.sum() + rhs.sum(), lhs.sum2() + rhs.sum2());
00336       bin.set_ent(lhs.entries() + rhs.entries());
00337 
00338       return bin;
00339    }

template<class T>
unsigned int NameWidth const std::vector< AlgCaddy< T > > &  vec  ) 
 

Definition at line 60 of file AlgCaddy.h.

Referenced by Anp::SelectCount::End().

00061    {
00062       unsigned int width = 0;      
00063       for(typename std::vector<AlgCaddy<T> >::const_iterator it = vec.begin(); it != vec.end(); ++it)
00064       {
00065          width = std::max<unsigned int>(width, (it -> name).size());
00066       }
00067 
00068       return width;
00069    }

const Anp::CoordXYZ Anp::near_to_gnumi const CoordXYZ  pos  ) 
 

Definition at line 52 of file Default.cxx.

References GNUMICosZ, GNUMISinZ, Anp::CoordXYZ::x, Anp::CoordXYZ::y, and Anp::CoordXYZ::z.

00053 {
00054    CoordXYZ new_pos;
00055    
00056    new_pos.x = pos.x - GNUMINearX;
00057    new_pos.z = pos.z * GNUMICosZ - pos.y * GNUMISinZ + GNUMINearZ;
00058    new_pos.y = pos.z * GNUMISinZ + pos.y * GNUMICosZ;
00059 
00060    return new_pos;
00061 }

template<class T>
unsigned int NumbWidth const std::vector< AlgCaddy< T > > &  vec  ) 
 

Definition at line 72 of file AlgCaddy.h.

Referenced by Anp::SelectCount::End().

00073    {
00074       unsigned int width = 0;      
00075       for(typename std::vector<AlgCaddy<T> >::const_iterator it = vec.begin(); it != vec.end(); ++it)
00076       {
00077          width = std::max<unsigned int>(width, it -> Width(it -> NSnarlAll));
00078          width = std::max<unsigned int>(width, it -> Width(it -> NSnarlOut));
00079          width = std::max<unsigned int>(width, it -> Width(it -> NEventAll));
00080          width = std::max<unsigned int>(width, it -> Width(it -> NEventAll));
00081          width = std::max<unsigned int>(width, it -> Width(static_cast<unsigned int>(it -> WEventAll)));
00082          width = std::max<unsigned int>(width, it -> Width(static_cast<unsigned int>(it -> WEventOut)));
00083       }
00084 
00085       return width;
00086    }

bool Anp::operator!= const Header lhs,
const Header rhs
 

Definition at line 383 of file Header.cxx.

00384 {
00385    return !(lhs == rhs);
00386 }

bool operator< const PlaneHitColl &  lhs,
const short  rhs
[inline]
 

Definition at line 133 of file PmtHit.h.

References Anp::PlaneHitColl::GetPlane().

00134    {
00135       return lhs.GetPlane() < rhs;
00136    }

bool operator< const short  lhs,
const PlaneHitColl &  rhs
[inline]
 

Definition at line 129 of file PmtHit.h.

References Anp::PlaneHitColl::GetPlane().

00130    {
00131       return lhs < rhs.GetPlane();
00132    }

bool operator< const PlaneHitColl &  lhs,
const PlaneHitColl &  rhs
[inline]
 

Definition at line 120 of file PmtHit.h.

References Anp::PlaneHitColl::GetPlane().

00121    {
00122       return lhs.GetPlane() < rhs.GetPlane();
00123    }

bool Anp::operator< const FitPoint &  rhs,
double  value
 

Definition at line 200 of file FitPoint.cxx.

References Anp::FitPoint::X().

00201 {
00202    return (fit.X() < value);
00203 }

bool Anp::operator< double  value,
const FitPoint &  fit
 

Definition at line 206 of file FitPoint.cxx.

References Anp::FitPoint::X().

00207 {
00208    return (value < fit.X());
00209 }

bool Anp::operator< const FitPoint &  lhs,
const FitPoint &  rhs
 

Definition at line 194 of file FitPoint.cxx.

References Anp::FitPoint::X().

00195 {
00196    return (lhs.X() < rhs.X());
00197 }

template<typename T>
bool Anp::operator< unsigned int  bin,
const Bin< T > &  rhs
[inline]
 

Definition at line 277 of file Hist1d.h.

References Anp::Bin< T >::bin().

00277 { return lhs < rhs.bin(); } 

template<typename T>
bool Anp::operator< const Bin< T > &  lhs,
unsigned int  bin
[inline]
 

Definition at line 274 of file Hist1d.h.

References Anp::Bin< T >::bin().

00274 { return lhs.bin() < rhs; }

template<typename T>
bool Anp::operator< const T &  lhs,
const Bin< T > &  rhs
[inline]
 

Definition at line 271 of file Hist1d.h.

References Anp::Bin< T >::edge().

00271 { return lhs < rhs.edge(); }  

template<typename T>
bool Anp::operator< const Bin< T > &  lhs,
const T &  rhs
[inline]
 

Definition at line 268 of file Hist1d.h.

References Anp::Bin< T >::edge().

00268 { return lhs.edge() < rhs; }

template<typename T>
bool Anp::operator< const Bin< T > &  lhs,
const Bin< T > &  rhs
[inline]
 

Definition at line 265 of file Hist1d.h.

References Anp::Bin< T >::bin().

00265 { return lhs.bin() < rhs.bin(); }

template<class K, class D>
bool Anp::operator< const K &  lhs,
const DataItem< K, D > &  rhs
[inline]
 

Definition at line 105 of file DataItem.h.

00106    {
00107       return (lhs < rhs.Key());
00108    }

template<class K, class D>
bool Anp::operator< const DataItem< K, D > &  lhs,
const K &  rhs
[inline]
 

Definition at line 99 of file DataItem.h.

00100    {
00101       return (lhs.Key() < rhs);
00102    }

template<class K, class D>
bool Anp::operator< const DataItem< K, D > &  lhs,
const DataItem< K, D > &  rhs
[inline]
 

Definition at line 93 of file DataItem.h.

00094    {
00095       return (lhs.Key() < rhs.Key());
00096    }

template<typename T>
std::ostream& operator<< std::ostream &  o,
const KeyPair< T > &  self
 

Definition at line 102 of file KeyPair.h.

00103    {
00104       self.Print(o);
00105       return o;
00106    }

template<typename T>
std::ostream& operator<< std::ostream &  o,
const Hist1d< T > &  self
 

Definition at line 1017 of file Hist1d.h.

References Anp::Hist1d< T >::Print().

01018    {
01019       self.Print(o);
01020       return o;
01021    }

template<typename T>
std::ostream& operator<< std::ostream &  o,
const Bin< T > &  self
[inline]
 

Definition at line 286 of file Hist1d.h.

References Anp::Bin< T >::print().

00287    {
00288       self.print(o);
00289       return o;
00290    }

ostream & Anp::operator<< std::ostream &  o,
const AxisInfo &  self
 

Definition at line 977 of file PhysicsNtuple/Hist/HistMan.cxx.

References Anp::AxisInfo::Print().

00978 {
00979    self.Print(o);
00980    return o;
00981 }

std::ostream & Anp::operator<< std::ostream &  o,
const HistInfo &  self
 

Definition at line 912 of file PhysicsNtuple/Hist/HistMan.cxx.

References Anp::AxisInfo::Print().

00913 {
00914    self.Print(o);
00915    return o;
00916 }

std::ostream & Anp::operator<< std::ostream &  o,
const Header self
 

Definition at line 389 of file Header.cxx.

References VldContext::Print().

00390 {
00391    self.Print(o);
00392    return o;
00393 }

template<typename T>
std::ostream& operator<< std::ostream &  o,
const Handle< T > &  handle
 

Handle<T> can be printed with "cout << handle;"

Definition at line 259 of file PhysicsNtuple/Handle.h.

00260 {
00261    o << *handle;
00262    return o;
00263 }

std::ostream & Anp::operator<< std::ostream &  os,
const Data data
[inline]
 

Definition at line 128 of file DataItem.h.

References Anp::DataItem< K, D >::Data(), and Anp::DataItem< K, D >::Key().

00129    {
00130       os  << "data[" << data.Key() << "]=" << data.Data();
00131       return os;
00132    }

bool Anp::operator== const Truth &  truth,
const Track &  track
[inline]
 

Definition at line 396 of file Truth.h.

References Anp::Truth::Find(), and Anp::Truth::RecoEnd().

00397    {  
00398       return (truth.Find(track) != truth.RecoEnd());
00399    }

bool Anp::operator== const Track &  track,
const Truth &  truth
[inline]
 

Definition at line 392 of file Truth.h.

References Anp::Truth::Find(), and Anp::Truth::RecoEnd().

00393    {   
00394       return (truth.Find(track) != truth.RecoEnd());
00395    }   

bool Anp::operator== const Truth &  truth,
const RecoNu &  reco
[inline]
 

Definition at line 387 of file Truth.h.

References Anp::Truth::Find(), and Anp::Truth::RecoEnd().

00388    {
00389       return (truth.Find(reco) != truth.RecoEnd());
00390    }

bool Anp::operator== const RecoNu &  reco,
const Truth &  truth
[inline]
 

Definition at line 383 of file Truth.h.

References Anp::Truth::Find(), and Anp::Truth::RecoEnd().

00384    {
00385       return (truth.Find(reco) != truth.RecoEnd());
00386    }

bool Anp::operator== const Truth &  truth,
const Event &  event
[inline]
 

Definition at line 374 of file Truth.h.

References Anp::Truth::Find(), and Anp::Truth::RecoEnd().

00375    { 
00376       return (truth.Find(event) != truth.RecoEnd());
00377    }   

bool Anp::operator== const Event &  event,
const Truth &  truth
[inline]
 

Definition at line 378 of file Truth.h.

References Anp::Truth::Find(), and Anp::Truth::RecoEnd().

00379    { 
00380       return (truth.Find(event) != truth.RecoEnd());
00381    }

bool Anp::operator== const Truth &  lhs,
const Truth &  rhs
[inline]
 

Definition at line 369 of file Truth.h.

References Anp::Truth::TruthIndex().

00370    {
00371       return (lhs.TruthIndex() == rhs.TruthIndex());
00372    }

bool Anp::operator== const Truth &  truth,
short  index
[inline]
 

Definition at line 365 of file Truth.h.

References Anp::Truth::TruthIndex().

00366    {
00367       return (index == truth.TruthIndex());
00368    }

bool Anp::operator== short  index,
const Truth &  truth
[inline]
 

Definition at line 361 of file Truth.h.

References Anp::Truth::TruthIndex().

00362    {
00363       return (index == truth.TruthIndex());
00364    }

bool Anp::operator== const RecoNu &  rnu,
const TrueNu &  tnu
[inline]
 

Definition at line 202 of file TrueNu.h.

References Anp::TrueNu::Match().

00203    {
00204       return tnu.Match(rnu);
00205    }

bool Anp::operator== const TrueNu &  tnu,
const RecoNu &  rnu
[inline]
 

Definition at line 198 of file TrueNu.h.

References Anp::TrueNu::Match().

00199    {   
00200       return tnu.Match(rnu);
00201    }

bool Anp::operator== const TrueNu &  lhs,
const TrueNu &  rhs
[inline]
 

Definition at line 194 of file TrueNu.h.

References Anp::TrueNu::Index().

00195    {
00196       return (lhs.Index() == rhs.Index());
00197    }

bool Anp::operator== const TrueNu &  reco,
short  index
[inline]
 

Definition at line 190 of file TrueNu.h.

References Anp::TrueNu::Index().

00191    {
00192       return (index == reco.Index());
00193    }

bool Anp::operator== short  index,
const TrueNu &  reco
[inline]
 

Definition at line 186 of file TrueNu.h.

References Anp::TrueNu::Index().

00187    {
00188       return (index == reco.Index());
00189    }

bool Anp::operator== const Track &  lhs,
const Track &  rhs
[inline]
 

Definition at line 148 of file Track.h.

References Anp::Track::TrackIndex().

00149    {
00150       return (lhs.TrackIndex() == rhs.TrackIndex());
00151    }

bool Anp::operator== const Track &  track,
short  index
[inline]
 

Definition at line 144 of file Track.h.

References Anp::Track::TrackIndex().

00145    {
00146       return (index == track.TrackIndex());
00147    }

bool Anp::operator== short  index,
const Track &  track
[inline]
 

Definition at line 140 of file Track.h.

References Anp::Track::TrackIndex().

00141    {
00142       return (index == track.TrackIndex());
00143    }

bool Anp::operator== const Strip &  lhs,
const Strip &  rhs
[inline]
 

Definition at line 227 of file PhysicsNtuple/Strip.h.

References Anp::Strip::Index().

00228    {
00229       return (lhs.Index() == rhs.Index());
00230    }

bool Anp::operator== const Strip &  strip,
short  index
[inline]
 

Definition at line 223 of file PhysicsNtuple/Strip.h.

References Anp::Strip::Index().

00224    {
00225       return (index == strip.Index());
00226    }

bool Anp::operator== short  index,
const Strip &  strip
[inline]
 

Definition at line 219 of file PhysicsNtuple/Strip.h.

References Anp::Strip::Index().

00220    {
00221       return (index == strip.Index());
00222    }

bool Anp::operator== const Shower &  lhs,
const Shower &  rhs
[inline]
 

Definition at line 113 of file Shower.h.

References Anp::Shower::ShowerIndex().

00114    {
00115       return (lhs.ShowerIndex() == rhs.ShowerIndex());
00116    }

bool Anp::operator== const Shower &  shower,
short  index
[inline]
 

Definition at line 109 of file Shower.h.

References Anp::Shower::ShowerIndex().

00110    {
00111       return (index == shower.ShowerIndex());
00112    }

bool Anp::operator== short  index,
const Shower &  shower
[inline]
 

Definition at line 105 of file Shower.h.

References Anp::Shower::ShowerIndex().

00106    {
00107       return (index == shower.ShowerIndex());
00108    }

bool Anp::operator== const RecoNu &  lhs,
const RecoNu &  rhs
[inline]
 

Definition at line 214 of file RecoNu.h.

References Anp::RecoNu::Index().

00215    {
00216       return (lhs.Index() == rhs.Index());
00217    }

bool Anp::operator== const RecoNu &  reco,
short  index
[inline]
 

Definition at line 210 of file RecoNu.h.

References Anp::RecoNu::Index().

00211    {
00212       return (index == reco.Index());
00213    }

bool Anp::operator== short  index,
const RecoNu &  reco
[inline]
 

Definition at line 206 of file RecoNu.h.

References Anp::RecoNu::Index().

00207    {
00208       return (index == reco.Index());
00209    }

bool operator== const PlaneHitColl &  lhs,
const short  rhs
[inline]
 

Definition at line 142 of file PmtHit.h.

References Anp::PlaneHitColl::GetPlane().

00143    {
00144       return lhs.GetPlane() == rhs;
00145    }

bool operator== const short  lhs,
const PlaneHitColl &  rhs
[inline]
 

Definition at line 138 of file PmtHit.h.

References Anp::PlaneHitColl::GetPlane().

00139    {
00140       return lhs == rhs.GetPlane();
00141    }

bool operator== const PlaneHitColl &  lhs,
const PlaneHitColl &  rhs
[inline]
 

Definition at line 124 of file PmtHit.h.

References Anp::PlaneHitColl::GetPlane().

00125    {
00126       return lhs.GetPlane() == rhs.GetPlane();
00127    }

bool Anp::operator== const Anp::Handle< Anp::CountHist > &  lhs,
const Anp::Handle< Anp::CountHist > &  rhs
 

Definition at line 190 of file CountHist.cxx.

References Anp::Handle< T >::valid().

00191 {
00192    if(!lhs.valid() || !rhs.valid())
00193    {
00194       return false;
00195    }
00196 
00197    if(lhs -> GetInter() != rhs -> GetInter())
00198    {
00199       return false;
00200    }
00201 
00202    if(lhs -> GetReson() != rhs -> GetReson())
00203    {
00204       return false;
00205    }
00206 
00207    if(lhs -> GetParticle() != rhs -> GetParticle())
00208    {
00209       return false;
00210    }   
00211    
00212    return true;
00213 }

bool Anp::operator== const FitPoint &  fit,
int  index
 

Definition at line 218 of file FitPoint.cxx.

References Anp::FitPoint::Index().

00219 {
00220    return (index == fit.Index());
00221 }

bool Anp::operator== int  index,
const FitPoint &  fit
 

Definition at line 212 of file FitPoint.cxx.

References Anp::FitPoint::Index().

00213 {
00214    return (index == fit.Index());
00215 }

bool Anp::operator== const FitPoint &  lhs,
const FitPoint &  rhs
 

Definition at line 188 of file FitPoint.cxx.

References Anp::FitPoint::Index().

00189 {
00190    return (lhs.Index() == rhs.Index());
00191 }

template<typename T>
bool Anp::operator== unsigned int  bin,
const Bin< T > &  rhs
[inline]
 

Definition at line 283 of file Hist1d.h.

References Anp::Bin< T >::bin().

00283 { return lhs == rhs.bin(); } 

template<typename T>
bool Anp::operator== const Bin< T > &  lhs,
unsigned int  bin
[inline]
 

Definition at line 280 of file Hist1d.h.

References Anp::Bin< T >::bin().

00280 { return lhs.bin() == rhs; }

bool Anp::operator== const Header lhs,
const Header rhs
 

Definition at line 364 of file Header.cxx.

References Anp::Header::Run(), Anp::Header::Snarl(), and Anp::Header::SubRun().

00365 {
00366    if(lhs.Run() != rhs.Run())
00367    {
00368       return false;
00369    }
00370    else if(lhs.SubRun() != rhs.SubRun())
00371    {
00372       return false;
00373    }
00374    else if(lhs.Snarl() != rhs.Snarl())
00375    {
00376       return false;
00377    }
00378 
00379    return true;
00380 }

bool Anp::operator== const CountPlaneStrip &  lhs,
const CountPlaneStrip &  rhs
 

Definition at line 237 of file FillSnarl.cxx.

References Anp::CountPlaneStrip::GetPlane(), and Anp::CountPlaneStrip::GetStrip().

00238 {
00239    if(lhs.GetPlane() == rhs.GetPlane() && lhs.GetStrip() == rhs.GetStrip())
00240    {
00241       return true;
00242    }
00243    
00244    return false;
00245 }

bool Anp::operator== const Event &  event,
const Track &  track
 

Definition at line 130 of file Event.cxx.

References Anp::Event::MatchTrack(), and Anp::Track::TrackIndex().

00131 {
00132    return event.MatchTrack(track.TrackIndex());
00133 }

bool Anp::operator== const Track &  track,
const Event &  event
 

Definition at line 124 of file Event.cxx.

References Anp::Event::MatchTrack(), and Anp::Track::TrackIndex().

00125 {
00126    return event.MatchTrack(track.TrackIndex());
00127 }

bool Anp::operator== const Shower &  shower,
const Event &  event
 

Definition at line 118 of file Event.cxx.

References Anp::Event::MatchShower(), and Anp::Shower::ShowerIndex().

00119 {
00120    return event.MatchShower(shower.ShowerIndex());
00121 }

bool Anp::operator== const Event &  event,
const Shower &  shower
 

Definition at line 112 of file Event.cxx.

References Anp::Event::MatchShower(), and Anp::Shower::ShowerIndex().

00113 {
00114    return event.MatchShower(shower.ShowerIndex());
00115 }

bool Anp::operator== const Event &  lhs,
const Event &  rhs
[inline]
 

Definition at line 160 of file Event.h.

References Anp::Event::EventIndex().

00161    {
00162       return (lhs.EventIndex() == rhs.EventIndex());
00163    }

bool Anp::operator== const Event &  event,
short  index
[inline]
 

Definition at line 156 of file Event.h.

References Anp::Event::EventIndex().

00157    {
00158       return (index == event.EventIndex());
00159    }

bool Anp::operator== short  index,
const Event &  event
[inline]
 

Definition at line 152 of file Event.h.

References Anp::Event::EventIndex().

00153    {
00154       return (index == event.EventIndex());
00155    }

template<class K, class D>
bool Anp::operator== const K &  lhs,
const DataItem< K, D > &  rhs
[inline]
 

Definition at line 123 of file DataItem.h.

References Anp::DataItem< K, D >::Key().

00124    {
00125       return (lhs == rhs.Key());
00126    }

template<class K, class D>
bool Anp::operator== const DataItem< K, D > &  lhs,
const K &  rhs
[inline]
 

Definition at line 117 of file DataItem.h.

References Anp::DataItem< K, D >::Key().

00118    {
00119       return (lhs.Key() == rhs);
00120    }

template<class K, class D>
bool Anp::operator== const DataItem< K, D > &  lhs,
const DataItem< K, D > &  rhs
[inline]
 

Definition at line 111 of file DataItem.h.

References Anp::DataItem< K, D >::Key().

00112    {
00113       return (lhs.Key() == rhs.Key());
00114    }

double Anp::pi  )  [inline]
 

Definition at line 78 of file Default.h.

Referenced by angle().

00078 { return 3.1415926536; }

bool Anp::Read const Registry reg,
const std::string &  key,
std::string &  value
 

Definition at line 294 of file Default.cxx.

References Registry::Get().

00295 {
00296    const char *value_char = 0;
00297    if(!reg.Get(key.c_str(), value_char) || !value_char)
00298    {
00299       return false;
00300    }
00301 
00302    value = std::string(value_char);
00303    return true;
00304 }

bool Anp::Read const Registry reg,
const std::string &  key,
bool &  value
 

Definition at line 256 of file Default.cxx.

References Registry::Get().

Referenced by Anp::SelectNeutrino::Config(), Anp::SelectAntiNeutrino::Config(), Anp::RunModule::Config(), Anp::RunkNN::Config(), Anp::RunAlgSnarl::Config(), Anp::PlotTruth::Config(), Anp::PlotTrackGeom::Config(), Anp::PlotReson::Config(), Anp::PlotPmt::Config(), Anp::PlotEff::Config(), Anp::PlotData::Config(), Anp::FillTruth::Config(), Anp::FillSnarl::Config(), Anp::FillMuonId::Config(), Anp::FillkNN::Config(), Anp::FillkNN::Init(), and Anp::FiducialCut::Init().

00257 {
00258    //
00259    // Read "const char*" key from Registry and convert it boolean. Return 
00260    // true if "value" is modified based on Registry value and false otherwise.
00261    //
00262 
00263    if(key.empty())
00264    {
00265       cerr << "Anp::Read - key is empty for bool type" << endl;
00266       return false;
00267    }
00268 
00269    const char *value_char = 0;
00270    if(reg.Get(key.c_str(), value_char)  && value_char)
00271    {
00272       if(std::strcmp(value_char, "yes") == 0 ||
00273          std::strcmp(value_char, "Yes") == 0 ||
00274          std::strcmp(value_char, "true") == 0 ||
00275          std::strcmp(value_char, "True") == 0)
00276       {
00277          value = true;
00278          return true;
00279       }
00280       else if(std::strcmp(value_char, "no") == 0 ||
00281               std::strcmp(value_char, "No") == 0 ||
00282               std::strcmp(value_char, "false") == 0 ||
00283               std::strcmp(value_char, "False") == 0)
00284       {
00285          value = false;
00286          return true;
00287       }
00288    }
00289 
00290    return false;
00291 }

bool Anp::ReadRegistry const std::string &  filepath,
Registry reg,
bool  quiet = true
 

Definition at line 115 of file Default.cxx.

References infile, Registry::KeyExists(), Registry::LockKeys(), Registry::LockValues(), Registry::Set(), Registry::UnLockKeys(), and Registry::UnLockValues().

Referenced by Anp::DrawSnarl::Config(), and Anp::FiducialCut::Init().

00116 {
00117    if(!quiet)
00118    {
00119       std::cout << "-------------------------------------------------------------" << std::endl;
00120       std::cout << "Configuraton file:" << std::endl << "   " << filepath << std::endl;
00121       std::cout << std::endl;
00122    }
00123 
00124    std::ifstream infile(filepath.c_str());
00125    if(!infile || !infile.is_open())
00126    {
00127       std::cerr << "Anp::ReadRegistry - failed to open file: " << filepath << std::endl;
00128       if(quiet)
00129       {
00130          std::cout << "-------------------------------------------------------------" << std::endl;
00131       }
00132       return false;
00133    }
00134 
00135    reg.UnLockKeys();
00136    reg.UnLockValues();
00137    
00138    while(!infile.eof())
00139    {
00140       std::string line;
00141       std::getline(infile, line);
00142 
00143       if(line.empty() || line.find("#",0) != std::string::npos)
00144       {
00145          continue;
00146       }
00147       
00148       const std::string::size_type nbeg = line.find_first_of("[", 0);
00149       const std::string::size_type nend = line.find_first_of("]", 0);
00150 
00151       if(nbeg == std::string::npos || nend == std::string::npos || !(nbeg < nend))
00152       {
00153          if(!quiet) std::cout << "   Failed to parse name" << std::endl;
00154          continue;
00155       }
00156 
00157       const std::string::size_type vbeg = line.find_first_of("[", nend + 1);
00158       const std::string::size_type vend = line.find_first_of("]", nend + 1);
00159       
00160       if(vbeg == std::string::npos || vend == std::string::npos || !(vbeg < vend))
00161       {
00162          if(!quiet) std::cout << "   Failed to parse value" << std::endl;
00163          continue;
00164       }
00165 
00166       const std::string::size_type tbeg = line.find_first_of("[", vend + 1);
00167       const std::string::size_type tend = line.find_first_of("]", vend + 1);
00168       
00169       if(tbeg == std::string::npos || tend == std::string::npos || !(tbeg < tend))
00170       {
00171          if(!quiet) std::cout << "   Failed to parse type" << std::endl;
00172          continue;
00173       }
00174 
00175       const std::string name  = line.substr(nbeg + 1, nend - nbeg - 1);
00176       const std::string value = line.substr(vbeg + 1, vend - vbeg - 1);
00177       const std::string type  = line.substr(tbeg + 1, tend - tbeg - 1);
00178       
00179       if(!quiet) std:: cout << "   " << name  << " = " << value << " (" << type << ")" << std::endl;
00180 
00181       if(reg.KeyExists(name.c_str()))
00182       {
00183          std::cerr << "Anp::ReadRegistry - key [" << name << "] already exists" << std::endl;
00184          continue;
00185       }
00186 
00187       if(type == "string")
00188       {
00189          reg.Set(name.c_str(), value.c_str());
00190       }
00191       else if(type == "double")
00192       {
00193          const double value_double = std::atof(value.c_str());
00194          reg.Set(name.c_str(), value_double);
00195       }
00196       else if(type == "int")
00197       {
00198          if(value.find(".",0) != std::string::npos)
00199          {
00200             if(!quiet) std::cerr << "   Forcing conversion of double to integer" << std::endl;
00201             const int value_int = static_cast<int>(std::atof(value.c_str()));
00202             reg.Set(name.c_str(), value_int);
00203          }
00204          else
00205          {
00206             const int value_int = std::atoi(value.c_str());
00207             reg.Set(name.c_str(), value_int);
00208          }
00209       }
00210    }
00211    
00212    if(infile.is_open())
00213    {
00214       infile.close();
00215    }
00216 
00217    reg.LockKeys();
00218    reg.LockValues();
00219 
00220    if(!quiet)
00221    {
00222       std::cout << "-------------------------------------------------------------" << std::endl;
00223    }
00224    
00225    return true;
00226 }

void * Anp::run_alg_thread void *  data_  ) 
 

Definition at line 13 of file AlgThread.cxx.

00014 {
00015    if(!data_)
00016    {
00017       cerr << "Anp::run_alg_thread - null data pointer" << endl;
00018       return 0;
00019    }
00020 
00021    AlgThread *data = static_cast<AlgThread *> (data_);
00022 
00023    data -> Run();
00024 
00025    return data;
00026 }

float Anp::uv2x float  u,
float  v
[inline]
 

Definition at line 72 of file Default.h.

Referenced by Anp::Vertex::CosX(), and Anp::Vertex::X().

00072 { return (u - v)*0.707106781; }

float Anp::uv2y float  u,
float  v
[inline]
 

Definition at line 73 of file Default.h.

Referenced by Anp::Vertex::CosY(), and Anp::Vertex::Y().

00073 { return (u + v)*0.707106781; }

float Anp::xy2u float  x,
float  y
[inline]
 

Definition at line 75 of file Default.h.

Referenced by Anp::Truth::GetVtx(), and Anp::SelectFiducial::Pass().

00075 { return (y + x)*0.707106781; }

float Anp::xy2v float  x,
float  y
[inline]
 

Definition at line 76 of file Default.h.

Referenced by Anp::Truth::GetVtx(), and Anp::SelectFiducial::Pass().

00076 { return (y - x)*0.707106781; }


Variable Documentation

const double Anp::GNUMICosZ = 0.998318471 [static]
 

Definition at line 35 of file Default.cxx.

Referenced by far_to_gnumi(), gnumi_to_far(), gnumi_to_near(), and near_to_gnumi().

const double Anp::GNUMIFarX = 0.0 [static]
 

Definition at line 31 of file Default.cxx.

const double Anp::GNUMIFarY = 0.0 [static]
 

Definition at line 32 of file Default.cxx.

const double Anp::GNUMIFarZ = 735.34E3 [static]
 

Definition at line 33 of file Default.cxx.

const double Anp::GNUMINearX = 1.48844 [static]
 

Definition at line 27 of file Default.cxx.

const double Anp::GNUMINearY = 0.0 [static]
 

Definition at line 28 of file Default.cxx.

const double Anp::GNUMINearZ = 1039.35 [static]
 

Definition at line 29 of file Default.cxx.

const double Anp::GNUMISinZ = 0.057967487 [static]
 

Definition at line 36 of file Default.cxx.

Referenced by far_to_gnumi(), gnumi_to_far(), gnumi_to_near(), and near_to_gnumi().


Generated on Fri Mar 28 16:15:08 2008 for loon by  doxygen 1.3.9.1