All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Namespaces | Functions
RawDataDrawer.cxx File Reference

Class to aid in the rendering of RawData objects. More...

#include <algorithm>
#include <cmath>
#include <cstddef>
#include <limits>
#include <memory>
#include <tuple>
#include <type_traits>
#include <typeinfo>
#include <utility>
#include "TBox.h"
#include "TFrame.h"
#include "TH1F.h"
#include "TVirtualPad.h"
#include "larcore/Geometry/Geometry.h"
#include "lardata/DetectorInfoServices/DetectorPropertiesService.h"
#include "lardataalg/Utilities/StatCollector.h"
#include "lardataobj/RawData/RawDigit.h"
#include "lardataobj/RawData/raw.h"
#include "lareventdisplay/EventDisplay/ChangeTrackers.h"
#include "lareventdisplay/EventDisplay/ColorDrawingOptions.h"
#include "lareventdisplay/EventDisplay/RawDataDrawer.h"
#include "lareventdisplay/EventDisplay/RawDrawingOptions.h"
#include "larevt/CalibrationDBI/Interface/ChannelStatusProvider.h"
#include "larevt/CalibrationDBI/Interface/ChannelStatusService.h"
#include "larevt/CalibrationDBI/Interface/DetPedestalProvider.h"
#include "larevt/CalibrationDBI/Interface/DetPedestalService.h"
#include "nuevdb/EventDisplayBase/View2D.h"
#include "art/Framework/Principal/Event.h"
#include "art/Framework/Principal/Handle.h"
#include "art/Framework/Services/Registry/ServiceHandle.h"
#include "canvas/Persistency/Common/Ptr.h"
#include "canvas/Utilities/Exception.h"
#include "canvas/Utilities/InputTag.h"
#include "cetlib_except/demangle.h"
#include "messagefacility/MessageLogger/MessageLogger.h"

Go to the source code of this file.

Classes

class  details::PointerToData_t< T >
 
class  evd::details::RawDigitInfo_t
 Information about a RawDigit; may contain uncompressed duplicate of data. More...
 
struct  evd::details::RawDigitInfo_t::SampleInfo_t
 
class  evd::details::RawDigitCacheDataClass
 Cached set of RawDigitInfo_t. More...
 
struct  evd::details::RawDigitCacheDataClass::BoolWithUpToDateMetadata
 
class  evd::details::GridAxisClass
 Manages a cell-like division of a coordinate. More...
 
class  evd::details::CellGridClass
 Manages a grid-like division of 2D space. More...
 
class  evd::details::ADCCorrectorClass
 Applies Birks correction. More...
 
class  evd::RawDataDrawer::OperationBaseClass
 
class  evd::RawDataDrawer::ManyOperations
 
class  evd::RawDataDrawer::BoxDrawer
 
class  evd::RawDataDrawer::RoIextractorClass
 

Namespaces

 details
 
 evd
 LArSoft includes.
 
 evd::details
 

Functions

std::vector
< evd::details::RawDigitInfo_t >
::const_iterator 
evd::details::begin (RawDigitCacheDataClass const &cache)
 
std::vector
< evd::details::RawDigitInfo_t >
::const_iterator 
evd::details::end (RawDigitCacheDataClass const &cache)
 

Detailed Description

Class to aid in the rendering of RawData objects.

Author
messi.nosp@m.er@i.nosp@m.ndian.nosp@m.a.ed.nosp@m.u

This class prepares the rendering of the raw digits content for the 2D view of the display. In particular, it fills the 2D view of detected charge vs. time and wire number for a single TPC. The code is not ready to support an arbitrary TPC from the detector; it can be fixed to support that, but a good deal of the calling code also has to change.

Notes from Gianluca Petrillo (petri.nosp@m.llo@.nosp@m.fnal..nosp@m.gov) on August 19, 2015

As of August 2015, this class performs some preprocessing for the data to be displayed. The main argument here is that the display assigns to each plane a space of 600x250 pixels, while the amound of data is typically 500x5000 elements. These numbers vary wildly: while the first number is close to the current default size for a new window, that window can be resized and windows many times larger can be obtained; for the data content, a MicroBooNE plane contains 2400x9600 elements (that's roughly 25 millions, and there is three of them), each of the two LArIAT planes contains 240x3200 (less than 1 million), and a single TPC of DUNE's 35t prototype about 350x4800 (but it is larger when extended readout window modes are used). The code produces TBox'es to be rendered by the nuevdb event display infrastructure. The code before August 2015 would produce one box for each of the aggregated charge; charge could be aggregated in time by FHiCL configuration to merge TDC ticks. This typically bloats rendering time, since rendering of all boxes is attempted. The new code performs dynamic aggregation after discovering the actual size of the graphical viewport, and it submits at most one TBox per pixel. Additional improvement is caching of the uncompressed raw data, so that following zooming is faster, and especially a way to bypass the decompression when the original data is not compressed in the first place, that saves a bit of time and quite some memory.

Todo:
There are probably a number of glitches and shortcuts in the current preprocessing implementation. If they become a problem, they can probably be fixed on demand. Examples include:
  • no alignment of the boxes with the wire and tick numbers
  • possible border effects
  • the fact that only the maximum charge is displayed on each box , and no dynamic charge range detection is in place
  • the first drawing is performed with a grid that is not the final one (because for some reason the frame starts larger than it should and is resized later)
  • the drawing honours the zoom region the user selected, even if the viewport ends up being larger (that is, if upstream decides that the zoom region is too small and a larger area will be drawn, the additional area will be blank)

Definition in file RawDataDrawer.cxx.