ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
FPGATrackSimGenScanMonitoring::eventDispSet Struct Reference
Collaboration diagram for FPGATrackSimGenScanMonitoring::eventDispSet:

Public Member Functions

 eventDispSet (std::string name, int maxevts)
 
TGraph * initGraph (const std::string &name)
 
void AddPoint (TGraph *g, double x, double y)
 
void addEvent (const std::vector< std::shared_ptr< const FPGATrackSimHit >> &hits)
 
void addEvent (const std::vector< FPGATrackSimBinUtil::StoredHit > &hits)
 
void addEvent (const std::vector< const FPGATrackSimBinUtil::StoredHit * > &hits)
 
StatusCode registerGraphs (FPGATrackSimGenScanMonitoring *parent)
 

Private Attributes

const std::string m_name
 
const unsigned m_maxEvts
 
std::vector< TGraph * > m_rZ
 
std::vector< TGraph * > m_xY
 
std::vector< TGraph * > m_rEta
 
std::vector< TGraph * > m_rPhi
 

Detailed Description

Definition at line 226 of file FPGATrackSimGenScanMonitoring.h.

Constructor & Destructor Documentation

◆ eventDispSet()

FPGATrackSimGenScanMonitoring::eventDispSet::eventDispSet ( std::string  name,
int  maxevts 
)
inline

Definition at line 227 of file FPGATrackSimGenScanMonitoring.h.

228  : m_name(name), m_maxEvts(maxevts) {}

Member Function Documentation

◆ addEvent() [1/3]

void FPGATrackSimGenScanMonitoring::eventDispSet::addEvent ( const std::vector< const FPGATrackSimBinUtil::StoredHit * > &  hits)

Definition at line 631 of file FPGATrackSimGenScanMonitoring.cxx.

631  {
632  unsigned int count = m_rZ.size(); // all four graph sets should have the same size
633 
634  // If over limit on number of event displays just return
635  if (count > m_maxEvts) return;
636 
637  // make the graphs to store the event display points
638  m_rZ.push_back(initGraph("EventDisp_RZ_" + m_name + std::to_string(count)));
639  m_xY.push_back(initGraph("EventDisp_XY_" + m_name + std::to_string(count)));
640  m_rPhi.push_back(initGraph("EventDisp_RPhi_" + m_name + std::to_string(count)));
641  m_rEta.push_back(initGraph("EventDisp_REta_" + m_name + std::to_string(count)));
642 
643  for (auto &hit : hits) {
644  AddPoint(m_rZ.back(), hit->hitptr->getZ(), hit->hitptr->getR());
645  AddPoint(m_xY.back(), hit->hitptr->getX(), hit->hitptr->getY());
646  AddPoint(m_rEta.back(), hit->etaShift, hit->hitptr->getR());
647  AddPoint(m_rPhi.back(), hit->phiShift, hit->hitptr->getR());
648  }
649 }

◆ addEvent() [2/3]

void FPGATrackSimGenScanMonitoring::eventDispSet::addEvent ( const std::vector< FPGATrackSimBinUtil::StoredHit > &  hits)

Definition at line 617 of file FPGATrackSimGenScanMonitoring.cxx.

617  {
618  // If over limit on number of event displays just return
619  if (m_rZ.size() > m_maxEvts) return;
620 
621  // convert vector of instances to vector of pointers to instances
622  std::vector<const FPGATrackSimBinUtil::StoredHit *> ptrvec;
623  for (auto &hit : hits) {
624  ptrvec.push_back(&hit);
625  }
626 
627  // then just call pointer-based implementation
628  return addEvent(ptrvec);
629 }

◆ addEvent() [3/3]

void FPGATrackSimGenScanMonitoring::eventDispSet::addEvent ( const std::vector< std::shared_ptr< const FPGATrackSimHit >> &  hits)

Definition at line 601 of file FPGATrackSimGenScanMonitoring.cxx.

601  {
602  unsigned int count = m_rZ.size(); // both graph sets should have the same size
603 
604  // If over limit on number of event displays just return
605  if (count > m_maxEvts)
606  return;
607 
608  m_rZ.push_back(initGraph("EventDisp_RZ_" + m_name + std::to_string(count)));
609  m_xY.push_back(initGraph("EventDisp_XY_" + m_name + std::to_string(count)));
610 
611  for (auto &hit : hits) {
612  AddPoint(m_rZ.back(), hit->getZ(), hit->getR());
613  AddPoint(m_xY.back(), hit->getX(), hit->getY());
614  }
615 }

◆ AddPoint()

void FPGATrackSimGenScanMonitoring::eventDispSet::AddPoint ( TGraph *  g,
double  x,
double  y 
)

Definition at line 595 of file FPGATrackSimGenScanMonitoring.cxx.

596  {
597  g->SetPoint(g->GetN(), x, y);
598 }

◆ initGraph()

TGraph * FPGATrackSimGenScanMonitoring::eventDispSet::initGraph ( const std::string &  name)

Definition at line 588 of file FPGATrackSimGenScanMonitoring.cxx.

589  {
590  TGraph *retv = new TGraph();
591  retv->SetName(name.c_str());
592  return retv;
593 }

◆ registerGraphs()

StatusCode FPGATrackSimGenScanMonitoring::eventDispSet::registerGraphs ( FPGATrackSimGenScanMonitoring parent)

Definition at line 651 of file FPGATrackSimGenScanMonitoring.cxx.

651  {
652  // Make a vector of all the vectors of graphs and then loop to register
653  // them all...
654  for (auto &graphs : std::vector<std::vector<TGraph *> *>({&m_rZ, &m_xY, &m_rPhi, &m_rEta})) {
655  for (auto &g : *graphs) {
656  ATH_CHECK(parent->regGraph(g));
657  }
658  }
659  return StatusCode::SUCCESS;
660 }

Member Data Documentation

◆ m_maxEvts

const unsigned FPGATrackSimGenScanMonitoring::eventDispSet::m_maxEvts
private

Definition at line 241 of file FPGATrackSimGenScanMonitoring.h.

◆ m_name

const std::string FPGATrackSimGenScanMonitoring::eventDispSet::m_name
private

Definition at line 240 of file FPGATrackSimGenScanMonitoring.h.

◆ m_rEta

std::vector<TGraph *> FPGATrackSimGenScanMonitoring::eventDispSet::m_rEta
private

Definition at line 245 of file FPGATrackSimGenScanMonitoring.h.

◆ m_rPhi

std::vector<TGraph *> FPGATrackSimGenScanMonitoring::eventDispSet::m_rPhi
private

Definition at line 246 of file FPGATrackSimGenScanMonitoring.h.

◆ m_rZ

std::vector<TGraph *> FPGATrackSimGenScanMonitoring::eventDispSet::m_rZ
private

Definition at line 243 of file FPGATrackSimGenScanMonitoring.h.

◆ m_xY

std::vector<TGraph *> FPGATrackSimGenScanMonitoring::eventDispSet::m_xY
private

Definition at line 244 of file FPGATrackSimGenScanMonitoring.h.


The documentation for this struct was generated from the following files:
FPGATrackSimGenScanMonitoring::eventDispSet::initGraph
TGraph * initGraph(const std::string &name)
Definition: FPGATrackSimGenScanMonitoring.cxx:588
TRTCalib_Extractor.hits
hits
Definition: TRTCalib_Extractor.py:35
graphs
Definition: graphs.py:1
x
#define x
XMLtoHeader.count
count
Definition: XMLtoHeader.py:84
FPGATrackSimGenScanMonitoring::eventDispSet::m_xY
std::vector< TGraph * > m_xY
Definition: FPGATrackSimGenScanMonitoring.h:244
FPGATrackSimGenScanMonitoring::eventDispSet::addEvent
void addEvent(const std::vector< std::shared_ptr< const FPGATrackSimHit >> &hits)
Definition: FPGATrackSimGenScanMonitoring.cxx:601
python.CaloCondTools.g
g
Definition: CaloCondTools.py:15
FPGATrackSimGenScanMonitoring::eventDispSet::m_rZ
std::vector< TGraph * > m_rZ
Definition: FPGATrackSimGenScanMonitoring.h:243
test_pyathena.parent
parent
Definition: test_pyathena.py:15
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
ActsTrk::to_string
std::string to_string(const DetectorType &type)
Definition: GeometryDefs.h:34
FPGATrackSimGenScanMonitoring::eventDispSet::AddPoint
void AddPoint(TGraph *g, double x, double y)
Definition: FPGATrackSimGenScanMonitoring.cxx:595
FPGATrackSimGenScanMonitoring::eventDispSet::m_rEta
std::vector< TGraph * > m_rEta
Definition: FPGATrackSimGenScanMonitoring.h:245
FPGATrackSimGenScanMonitoring::eventDispSet::m_maxEvts
const unsigned m_maxEvts
Definition: FPGATrackSimGenScanMonitoring.h:241
y
#define y
FPGATrackSimGenScanMonitoring::eventDispSet::m_rPhi
std::vector< TGraph * > m_rPhi
Definition: FPGATrackSimGenScanMonitoring.h:246
FPGATrackSimGenScanMonitoring::eventDispSet::m_name
const std::string m_name
Definition: FPGATrackSimGenScanMonitoring.h:240