Anp::Draw Namespace Reference

Typedefs

typedef std::vector
< Anp::StripIter
SVec
typedef SVec::iterator SIterator
typedef SVec::const_iterator SIter
typedef std::vector
< Anp::StdHepIter
HepVec
typedef HepVec::iterator HepIterator
typedef HepVec::const_iterator HepIter

Functions

void Config (TPad *pad, const std::string &prefix, const Registry &reg)
void Config (TH1 *h, const std::string &prefix, const Registry &reg)
TH2 * CreateTH2 (const std::string &prefix, const Registry &reg, const Header &header)
TGraph * CreateTGraph (const std::string &prefix, const Registry &reg)
double Read (const std::string &key, double pvalue, const Registry &reg)
int Read (const std::string &key, int pvalue, const Registry &reg)
const std::string Read (const std::string &key, const std::string &pvalue, const Registry &reg)
int Read (const Record &record, HepVec &hvec, int beg, int end)
const VldContext GetValidity (const Header &header)

Typedef Documentation

typedef HepVec::const_iterator Anp::Draw::HepIter

Definition at line 29 of file DrawUtil.h.

typedef HepVec::iterator Anp::Draw::HepIterator

Definition at line 28 of file DrawUtil.h.

typedef std::vector<Anp::StdHepIter> Anp::Draw::HepVec

Definition at line 27 of file DrawUtil.h.

typedef SVec::const_iterator Anp::Draw::SIter

Definition at line 25 of file DrawUtil.h.

typedef SVec::iterator Anp::Draw::SIterator

Definition at line 24 of file DrawUtil.h.

typedef std::vector<Anp::StripIter> Anp::Draw::SVec

Definition at line 23 of file DrawUtil.h.


Function Documentation

void Anp::Draw::Config ( TH1 *  h,
const std::string &  prefix,
const Registry reg 
)
void Anp::Draw::Config ( TPad *  pad,
const std::string &  prefix,
const Registry reg 
)
TGraph* Anp::Draw::CreateTGraph ( const std::string &  prefix,
const Registry reg 
)

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

TH2* Anp::Draw::CreateTH2 ( const std::string &  prefix,
const Registry reg,
const Header header 
)
const VldContext Anp::Draw::GetValidity ( const Header header  ) 

Definition at line 367 of file DrawUtil.cxx.

References Anp::Header::IsData(), Anp::Header::IsFar(), Anp::Header::IsNear(), SimFlag::kData, Detector::kFar, SimFlag::kMC, Detector::kNear, SimFlag::kUnknown, Detector::kUnknown, Anp::Header::NSec(), and Anp::Header::Sec().

Referenced by Anp::PlotPmt::Collect().

00368 {
00369    //
00370    // Convert Anp::Header to VldContext
00371    //
00372 
00373    const VldTimeStamp time(header.Sec(), header.NSec());
00374    if(header.IsData())
00375    {
00376       if     (header.IsNear()) return VldContext(Detector::kNear, SimFlag::kData, time);
00377       else if(header.IsFar())  return VldContext(Detector::kFar, SimFlag::kData, time);
00378    }
00379    else
00380    {
00381       if     (header.IsNear()) return VldContext(Detector::kNear, SimFlag::kMC, time);
00382       else if(header.IsFar())  return VldContext(Detector::kFar, SimFlag::kMC, time);
00383    }
00384 
00385    return VldContext(Detector::kUnknown, SimFlag::kUnknown, time);  
00386 }

int Anp::Draw::Read ( const Record &  record,
HepVec &  hvec,
int  beg,
int  end 
)

Definition at line 339 of file DrawUtil.cxx.

References count, it, Read(), Anp::Record::StdHepBeg(), and Anp::Record::StdHepEnd().

00340 {
00341    if(beg > end)
00342    {
00343       cerr << "Draw::ReadStdHep - invalid StdHep index range" << endl;
00344       return 0;
00345    }
00346 
00347    int count = 0;
00348 
00349    for(StdHepIter it = record.StdHepBeg(); it != record.StdHepEnd(); ++it)
00350    {
00351       if(it -> StdHepIndex() < beg || it -> StdHepIndex() > end)
00352       {
00353          continue;
00354       }
00355 
00356       ++count;
00357       
00358       hvec.push_back(it);
00359 
00360       count += Anp::Draw::Read(record, hvec, it -> ChildBeg(), it -> ChildEnd());
00361    }
00362    
00363    return count;
00364 }

const std::string Anp::Draw::Read ( const std::string &  key,
const std::string &  pvalue,
const Registry reg 
)
int Anp::Draw::Read ( const std::string &  key,
int  pvalue,
const Registry reg 
)
double Anp::Draw::Read ( const std::string &  key,
double  pvalue,
const Registry reg 
)

Referenced by Read().


Generated on 19 Jan 2018 for loon by  doxygen 1.6.1