LArSoft
v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
|
Aid in the rendering of RawData objects. More...
#include "RawDataDrawer.h"
Classes | |
class | BoxDrawer |
struct | BoxInfo_t |
class | ManyOperations |
class | OperationBaseClass |
struct | PadResolution_t |
class | RoIextractorClass |
Public Member Functions | |
RawDataDrawer () | |
~RawDataDrawer () | |
void | RawDigit2D (art::Event const &evt, evdb::View2D *view, unsigned int plane, bool bZoomToRoI=false) |
Draws raw digit content in 2D wire plane representation. More... | |
void | FillQHisto (const art::Event &evt, unsigned int plane, TH1F *histo) |
void | FillTQHisto (const art::Event &evt, unsigned int plane, unsigned int wire, TH1F *histo) |
double | StartTick () const |
double | TotalClockTicks () const |
void | ExtractRange (TVirtualPad *pPad, std::vector< double > const *zoom=nullptr) |
Fills the viewport information from the specified pad. More... | |
void | SetDrawingLimits (float low_wire, float high_wire, float low_tdc, float high_tdc) |
Fills the viewport borders from the specified extremes. More... | |
int | GetRegionOfInterest (int plane, int &minw, int &maxw, int &mint, int &maxt) |
void | ResetRegionOfInterest () |
Forgets about the current region of interest. More... | |
bool | hasRegionOfInterest (geo::PlaneID::PlaneID_t plane) const |
void | GetChargeSum (int plane, double &charge, double &convcharge) |
Private Member Functions | |
void | Reset (art::Event const &event) |
Prepares for a new event (if somebody tells it to) More... | |
void | GetRawDigits (art::Event const &evt) |
Reads raw::RawDigits; also triggers Reset() More... | |
bool | ProcessChannelWithStatus (lariov::ChannelStatusProvider::Status_t channel_status) const |
Returns whether a channel with the specified status should be processed. More... | |
void | DrawRawDigit2D (art::Event const &evt, evdb::View2D *view, unsigned int plane) |
Performs the 2D wire plane drawing. More... | |
void | GetRawDigits (art::Event const &evt, details::CacheID_t const &new_timestamp) |
Makes sure raw::RawDigit's are available for the current settings. More... | |
bool | RunOperation (art::Event const &evt, OperationBaseClass *operation) |
void | QueueDrawingBoxes (evdb::View2D *view, geo::PlaneID const &pid, std::vector< BoxInfo_t > const &BoxInfo) |
void | RunDrawOperation (art::Event const &evt, evdb::View2D *view, unsigned int plane) |
void | RunRoIextractor (art::Event const &evt, unsigned int plane) |
void | SetDrawingLimitsFromRoI (geo::PlaneID::PlaneID_t plane) |
void | SetDrawingLimitsFromRoI (geo::PlaneID const pid) |
Private Attributes | |
evd::details::RawDigitCacheDataClass * | digit_cache |
Cache of raw digits. More... | |
double | fStartTick |
low tick More... | |
double | fTicks |
number of ticks of the clock More... | |
std::vector< int > | fWireMin |
lowest wire in interesting region for each plane More... | |
std::vector< int > | fWireMax |
highest wire in interesting region for each plane More... | |
std::vector< int > | fTimeMin |
lowest time in interesting region for each plane More... | |
std::vector< int > | fTimeMax |
highest time in interesting region for each plane More... | |
std::vector< double > | fRawCharge |
Sum of Raw Charge. More... | |
std::vector< double > | fConvertedCharge |
Sum of Charge Converted using Birks' formula. More... | |
PadResolution_t | PadResolution |
stored pad resolution More... | |
details::CacheID_t * | fCacheID |
information about the last processed plane More... | |
details::CellGridClass * | fDrawingRange |
information about the viewport More... | |
Static Private Attributes | |
static std::vector< raw::RawDigit > const | EmptyRawDigits |
Empty collection, used in return value of invalid digits. More... | |
Friends | |
class | BoxDrawer |
class | RoIextractorClass |
Aid in the rendering of RawData objects.
Definition at line 40 of file RawDataDrawer.h.
evd::RawDataDrawer::RawDataDrawer | ( | ) |
Definition at line 568 of file RawDataDrawer.cxx.
References fConvertedCharge, evd::RawDrawingOptions::fCryostat, fRawCharge, evd::RawDrawingOptions::fStartTick, fStartTick, evd::RawDrawingOptions::fTicks, fTicks, fTimeMax, fTimeMin, evd::RawDrawingOptions::fTPC, fWireMax, fWireMin, and geo::GeometryCore::Nplanes().
evd::RawDataDrawer::~RawDataDrawer | ( | ) |
Definition at line 593 of file RawDataDrawer.cxx.
References digit_cache, fCacheID, fDrawingRange, and SetDrawingLimits().
|
private |
Performs the 2D wire plane drawing.
void evd::RawDataDrawer::ExtractRange | ( | TVirtualPad * | pPad, |
std::vector< double > const * | zoom = nullptr |
||
) |
Fills the viewport information from the specified pad.
Definition at line 640 of file RawDataDrawer.cxx.
References fDrawingRange, evd::RawDataDrawer::PadResolution_t::height, PadResolution, evd::details::CellGridClass::SetTDCRange(), evd::details::CellGridClass::SetWireRange(), and evd::RawDataDrawer::PadResolution_t::width.
Referenced by SetDrawingLimitsFromRoI().
void evd::RawDataDrawer::FillQHisto | ( | const art::Event & | evt, |
unsigned int | plane, | ||
TH1F * | histo | ||
) |
Definition at line 1307 of file RawDataDrawer.cxx.
References raw::RawDigit::Channel(), geo::GeometryCore::ChannelToWire(), evd::RawDrawingOptions::CurrentTPC(), d, digit_cache, evd::RawDrawingOptions::fDrawRawDataOrCalibWires, evd::RawDrawingOptions::fRawDataLabel, evd::RawDrawingOptions::fSeeBadChannels, GetRawDigits(), and ProcessChannelWithStatus().
void evd::RawDataDrawer::FillTQHisto | ( | const art::Event & | evt, |
unsigned int | plane, | ||
unsigned int | wire, | ||
TH1F * | histo | ||
) |
Definition at line 1361 of file RawDataDrawer.cxx.
References evd::RawDrawingOptions::CurrentTPC(), evd::details::RawDigitInfo_t::Data(), digit_cache, evd::details::RawDigitCacheDataClass::empty(), evd::RawDrawingOptions::fDrawRawDataOrCalibWires, evd::details::RawDigitCacheDataClass::FindChannel(), evd::RawDrawingOptions::fRawDataLabel, evd::RawDrawingOptions::fSeeBadChannels, GetRawDigits(), raw::isValidChannelID(), geo::GeometryCore::PlaneWireToChannel(), and ProcessChannelWithStatus().
Referenced by evd::TQPad::Draw().
void evd::RawDataDrawer::GetChargeSum | ( | int | plane, |
double & | charge, | ||
double & | convcharge | ||
) |
Definition at line 1299 of file RawDataDrawer.cxx.
References fConvertedCharge, and fRawCharge.
|
private |
Reads raw::RawDigits; also triggers Reset()
Referenced by FillQHisto(), FillTQHisto(), RawDigit2D(), ResetRegionOfInterest(), and RunOperation().
|
private |
Makes sure raw::RawDigit's are available for the current settings.
evt | event to read the digits from |
ts | a cache ID assessing the new state the cache should move to |
The function will ask the data cache for an update (RawDigitCacheDataClass::Update()). The cache will evaluate whether it is already in a state compatible with ts or if cache needs to be invalidated, in which case it will fill with new data. This method also triggers a Reset() if the target state differs from the old one.
Definition at line 1540 of file RawDataDrawer.cxx.
References digit_cache, fCacheID, LOG_DEBUG, ProcessChannelWithStatus(), ResetRegionOfInterest(), and evd::details::RawDigitCacheDataClass::Update().
int evd::RawDataDrawer::GetRegionOfInterest | ( | int | plane, |
int & | minw, | ||
int & | maxw, | ||
int & | mint, | ||
int & | maxt | ||
) |
Definition at line 1272 of file RawDataDrawer.cxx.
References fTimeMax, fTimeMin, fWireMax, fWireMin, geo::GeometryCore::Nwires(), and TotalClockTicks().
Referenced by evd::TWireProjPad::ShowFull().
bool evd::RawDataDrawer::hasRegionOfInterest | ( | geo::PlaneID::PlaneID_t | plane | ) | const |
Returns whether there is currently a valid region of interest for the specified plane
Definition at line 1516 of file RawDataDrawer.cxx.
References fTimeMax, and fWireMax.
Referenced by RawDigit2D(), and RunRoIextractor().
|
private |
Returns whether a channel with the specified status should be processed.
Definition at line 1561 of file RawDataDrawer.cxx.
References evd::RawDrawingOptions::fMaxChannelStatus.
Referenced by FillQHisto(), FillTQHisto(), GetRawDigits(), and RunOperation().
|
private |
Definition at line 993 of file RawDataDrawer.cxx.
References evd::RawDataDrawer::BoxInfo_t::adc, evdb::View2D::AddBox(), color(), evd::RawDrawingOptions::fAxisOrientation, fDrawingRange, evd::RawDrawingOptions::fMinSignal, evd::RawDrawingOptions::fScaleDigitsByCharge, evd::details::CellGridClass::GetCellBox(), evdb::ColorScale::GetColor(), evd::RawDataDrawer::BoxInfo_t::good, LOG_DEBUG, min, evd::ColorDrawingOptions::RawQ(), RunDrawOperation(), and geo::GeometryCore::SignalType().
void evd::RawDataDrawer::RawDigit2D | ( | art::Event const & | evt, |
evdb::View2D * | view, | ||
unsigned int | plane, | ||
bool | bZoomToRoI = false |
||
) |
Draws raw digit content in 2D wire plane representation.
evt | source for raw digits |
view | target rendered object |
plane | number of the plane to be drawn |
bZoomToRoI | whether to render only te region of interest |
This function performs pre-rendering of the raw digit content into a 2D view of the wire plane as TDC vs. wire number. The material for rendering is created and sent to view object for actual rendering. The pre-rendering result currently depends on information from the current rendering canvas, and in particular on its viewport in the (wire, TDC) space.
If no zoom to the region of interest is required, the region itself is computed (only if not known yet) while the rendering is performed. If the zoom is required instead, rendering is performed in two steps; in the first, run only of no region of interest is known yet, the region is extracted. In the second, that information is used for rendering.
Definition at line 1178 of file RawDataDrawer.cxx.
References evd::RawDataDrawer::ManyOperations::AddOperation(), BoxDrawer, evd::RawDrawingOptions::CurrentTPC(), evd::RawDrawingOptions::fDrawRawDataOrCalibWires, evd::RawDrawingOptions::fRawDataLabel, fTimeMax, fTimeMin, fWireMax, fWireMin, GetRawDigits(), hasRegionOfInterest(), LOG_DEBUG, RoIextractorClass, RunOperation(), SetDrawingLimitsFromRoI(), and art::errors::Unknown.
|
private |
Prepares for a new event (if somebody tells it to)
void evd::RawDataDrawer::ResetRegionOfInterest | ( | ) |
Forgets about the current region of interest.
Definition at line 1524 of file RawDataDrawer.cxx.
References trkf::fill(), fTimeMax, fTimeMin, fWireMax, fWireMin, GetRawDigits(), and LOG_DEBUG.
Referenced by GetRawDigits().
|
private |
Definition at line 1081 of file RawDataDrawer.cxx.
References evd::RawDrawingOptions::CurrentTPC(), evd::RawDrawingOptions::fDrawRawDataOrCalibWires, RunOperation(), and art::errors::Unknown.
Referenced by QueueDrawingBoxes().
|
private |
Definition at line 811 of file RawDataDrawer.cxx.
References raw::RawDigit::Channel(), geo::GeometryCore::ChannelToWire(), digit_cache, evd::details::RawDigitCacheDataClass::empty(), evd::RawDataDrawer::OperationBaseClass::Finish(), evd::RawDrawingOptions::fRawDataLabel, evd::RawDrawingOptions::fSeeBadChannels, fStartTick, fTicks, GetRawDigits(), evd::RawDataDrawer::OperationBaseClass::Initialize(), LOG_DEBUG, min, evd::RawDataDrawer::OperationBaseClass::Name(), evd::RawDataDrawer::OperationBaseClass::Operate(), evd::RawDataDrawer::OperationBaseClass::PlaneID(), ProcessChannelWithStatus(), evd::RawDataDrawer::OperationBaseClass::ProcessTick(), and evd::RawDataDrawer::OperationBaseClass::ProcessWire().
Referenced by evd::RawDataDrawer::ManyOperations::AddOperation(), RawDigit2D(), RunDrawOperation(), and RunRoIextractor().
|
private |
Definition at line 1155 of file RawDataDrawer.cxx.
References evd::RawDrawingOptions::CurrentTPC(), hasRegionOfInterest(), LOG_TRACE, and RunOperation().
void evd::RawDataDrawer::SetDrawingLimits | ( | float | low_wire, |
float | high_wire, | ||
float | low_tdc, | ||
float | high_tdc | ||
) |
Fills the viewport borders from the specified extremes.
Definition at line 603 of file RawDataDrawer.cxx.
References fDrawingRange, evd::RawDataDrawer::PadResolution_t::height, LOG_DEBUG, PadResolution, SetDrawingLimitsFromRoI(), evd::details::CellGridClass::SetMinTDCCellSize(), evd::details::CellGridClass::SetMinWireCellSize(), evd::details::CellGridClass::SetTDCRange(), evd::details::CellGridClass::SetWireRange(), and evd::RawDataDrawer::PadResolution_t::width.
Referenced by SetDrawingLimitsFromRoI(), and ~RawDataDrawer().
|
private |
Definition at line 632 of file RawDataDrawer.cxx.
References ExtractRange(), fTimeMax, fTimeMin, fWireMax, fWireMin, and SetDrawingLimits().
Referenced by RawDigit2D(), and SetDrawingLimits().
|
inlineprivate |
Definition at line 211 of file RawDataDrawer.h.
References geo::PlaneID::Plane.
|
inline |
Definition at line 84 of file RawDataDrawer.h.
Referenced by evd::TQPad::BookHistogram(), and evd::TWireProjPad::TWireProjPad().
|
inline |
Definition at line 85 of file RawDataDrawer.h.
Referenced by evd::TQPad::BookHistogram(), GetRegionOfInterest(), and evd::TWireProjPad::TWireProjPad().
|
friend |
Definition at line 134 of file RawDataDrawer.h.
Referenced by RawDigit2D().
|
friend |
Definition at line 144 of file RawDataDrawer.h.
Referenced by RawDigit2D().
|
private |
Cache of raw digits.
Definition at line 148 of file RawDataDrawer.h.
Referenced by FillQHisto(), FillTQHisto(), GetRawDigits(), RunOperation(), and ~RawDataDrawer().
|
staticprivate |
Empty collection, used in return value of invalid digits.
Definition at line 215 of file RawDataDrawer.h.
|
private |
information about the last processed plane
Definition at line 175 of file RawDataDrawer.h.
Referenced by GetRawDigits(), and ~RawDataDrawer().
|
private |
Sum of Charge Converted using Birks' formula.
Definition at line 171 of file RawDataDrawer.h.
Referenced by GetChargeSum(), and RawDataDrawer().
|
private |
information about the viewport
Definition at line 178 of file RawDataDrawer.h.
Referenced by ExtractRange(), QueueDrawingBoxes(), SetDrawingLimits(), and ~RawDataDrawer().
|
private |
Sum of Raw Charge.
Definition at line 170 of file RawDataDrawer.h.
Referenced by GetChargeSum(), and RawDataDrawer().
|
private |
low tick
Definition at line 162 of file RawDataDrawer.h.
Referenced by RawDataDrawer(), and RunOperation().
|
private |
number of ticks of the clock
Definition at line 163 of file RawDataDrawer.h.
Referenced by RawDataDrawer(), and RunOperation().
|
private |
highest time in interesting region for each plane
Definition at line 168 of file RawDataDrawer.h.
Referenced by GetRegionOfInterest(), hasRegionOfInterest(), RawDataDrawer(), RawDigit2D(), ResetRegionOfInterest(), and SetDrawingLimitsFromRoI().
|
private |
lowest time in interesting region for each plane
Definition at line 167 of file RawDataDrawer.h.
Referenced by GetRegionOfInterest(), RawDataDrawer(), RawDigit2D(), ResetRegionOfInterest(), and SetDrawingLimitsFromRoI().
|
private |
highest wire in interesting region for each plane
Definition at line 166 of file RawDataDrawer.h.
Referenced by GetRegionOfInterest(), hasRegionOfInterest(), RawDataDrawer(), RawDigit2D(), ResetRegionOfInterest(), and SetDrawingLimitsFromRoI().
|
private |
lowest wire in interesting region for each plane
Definition at line 165 of file RawDataDrawer.h.
Referenced by GetRegionOfInterest(), RawDataDrawer(), RawDigit2D(), ResetRegionOfInterest(), and SetDrawingLimitsFromRoI().
|
private |
stored pad resolution
Definition at line 173 of file RawDataDrawer.h.
Referenced by ExtractRange(), and SetDrawingLimits().