8#include <framework/dataobjects/DisplayData.h>
10#include <framework/datastore/DataStore.h>
11#include <framework/logging/Logger.h>
24void DisplayData::addArrow(
const std::string& name,
const ROOT::Math::XYZVector& start,
const ROOT::Math::XYZVector& end,
int color)
41 auto* newhist =
static_cast<TH1*
>(hist->Clone(name.c_str()));
42 newhist->SetDirectory(
nullptr);
56 B2WARNING(
"DisplayData::select(): object must be part of a StoreArray!");
bool findStoreEntry(const TObject *object, StoreEntry *&entry, int &index)
Find an object in an array in the data store.
static DataStore & Instance()
Instance of singleton Store.
void select(const TObject *object)
Select the given object in the display.
void addHistogram(const std::string &name, const TH1 *hist)
Add histogram with the given name.
void addPoint(const std::string &name, const ROOT::Math::XYZVector &pos)
Add a point at the given position, as part of a collection specified by name.
std::vector< TH1 * > m_histograms
Histograms to be shown in Eve.
std::vector< Arrow > m_arrows
List of arrows.
void addArrow(const std::string &name, const ROOT::Math::XYZVector &start, const ROOT::Math::XYZVector &end, int color=-1)
Add an arrow in the display (for axes, to point out some specific location).
void addLabel(const std::string &text, const ROOT::Math::XYZVector &pos)
Add a text label at the given position.
std::map< std::string, std::vector< ROOT::Math::XYZVector > > m_pointSets
name -> points map
std::vector< std::pair< std::string, unsigned int > > m_selectedObjects
List of selected objects (array name, index).
std::vector< std::pair< std::string, ROOT::Math::XYZVector > > m_labels
text labels (to be shown at a given position).
~DisplayData()
Destructor.
Abstract base class for different kinds of events.
Stores data associated with an arrow.
Wraps a stored array/object, stored under unique (name, durability) key.
std::string name
Name of the entry.