LArSoft  v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
evd::RawDataDrawer::BoxDrawer Class Reference
Inheritance diagram for evd::RawDataDrawer::BoxDrawer:
evd::RawDataDrawer::OperationBaseClass

Public Member Functions

 BoxDrawer (geo::PlaneID const &pid, RawDataDrawer *dataDrawer, evdb::View2D *new_view)
 
virtual bool Initialize () override
 
virtual bool ProcessWire (geo::WireID const &wire) override
 
virtual bool ProcessTick (size_t tick) override
 
virtual bool Operate (geo::WireID const &wireID, size_t tick, float adc) override
 
virtual bool Finish () override
 
virtual std::string Name () const
 
bool operator() (geo::WireID const &wireID, size_t tick, float adc)
 
geo::PlaneID const & PlaneID () const
 
RawDataDrawerRawDataDrawerPtr () const
 

Protected Attributes

RawDataDrawerpRawDataDrawer = nullptr
 

Private Attributes

evdb::View2Dview
 
double rawCharge = 0.
 
double convertedCharge = 0.
 
details::CellGridClass drawingRange
 
std::vector< BoxInfo_tboxInfo
 
details::ADCCorrectorClass ADCCorrector
 

Detailed Description

Definition at line 909 of file RawDataDrawer.cxx.

Constructor & Destructor Documentation

evd::RawDataDrawer::BoxDrawer::BoxDrawer ( geo::PlaneID const &  pid,
RawDataDrawer dataDrawer,
evdb::View2D new_view 
)
inline

Definition at line 912 of file RawDataDrawer.cxx.

917  : OperationBaseClass(pid, dataDrawer)
918  , view(new_view)
919  , rawCharge(0.), convertedCharge(0.)
920  , drawingRange(*(dataDrawer->fDrawingRange))
921  , ADCCorrector(PlaneID())
922  {}
details::CellGridClass drawingRange
OperationBaseClass(geo::PlaneID const &pid, RawDataDrawer *data_drawer=nullptr)
details::ADCCorrectorClass ADCCorrector
geo::PlaneID const & PlaneID() const

Member Function Documentation

virtual bool evd::RawDataDrawer::BoxDrawer::Finish ( )
inlineoverridevirtual

Reimplemented from evd::RawDataDrawer::OperationBaseClass.

Definition at line 966 of file RawDataDrawer.cxx.

967  {
968  // write the information back
969  geo::PlaneID::PlaneID_t const plane = PlaneID().Plane;
972 
973  // the cell size might have changed because of minimum size settings
974  // from configuration (see Initialize())
976 
977  // complete the drawing
979 
980  return true;
981  }
details::CellGridClass drawingRange
std::vector< BoxInfo_t > boxInfo
std::vector< double > fRawCharge
Sum of Raw Charge.
unsigned int PlaneID_t
Type for the ID number.
Definition: geo_types.h:251
PlaneID_t Plane
Index of the plane within its TPC.
Definition: geo_types.h:258
geo::PlaneID const & PlaneID() const
void QueueDrawingBoxes(evdb::View2D *view, geo::PlaneID const &pid, std::vector< BoxInfo_t > const &BoxInfo)
RawDataDrawer * RawDataDrawerPtr() const
details::CellGridClass * fDrawingRange
information about the viewport
std::vector< double > fConvertedCharge
Sum of Charge Converted using Birks&#39; formula.
virtual bool evd::RawDataDrawer::BoxDrawer::Initialize ( )
inlineoverridevirtual

Reimplemented from evd::RawDataDrawer::OperationBaseClass.

Definition at line 924 of file RawDataDrawer.cxx.

References evd::RawDrawingOptions::fTicksPerPoint.

925  {
927 
928  // set up the size of the grid to be visualized;
929  // the information on the size has to be already there:
930  // caller should have user ExtractRange(), or similar, first.
931  // set the minimum cell in ticks to at least match fTicksPerPoint
933  // also set the minimum wire cell size to 1,
934  // otherwise there will be cells represented by no wire.
936  boxInfo.clear();
937  boxInfo.resize(drawingRange.NCells());
938  return true;
939  }
details::CellGridClass drawingRange
bool SetMinTDCCellSize(float min_size)
Sets the minimum size for TDC cells.
std::vector< BoxInfo_t > boxInfo
bool SetMinWireCellSize(float min_size)
Sets the minimum size for wire cells.
int fTicksPerPoint
number of ticks to include in one point
size_t NCells() const
Returns the total number of cells in the grid.
virtual std::string evd::RawDataDrawer::OperationBaseClass::Name ( ) const
inlinevirtualinherited

Reimplemented in evd::RawDataDrawer::ManyOperations.

Definition at line 705 of file RawDataDrawer.cxx.

Referenced by evd::RawDataDrawer::RunOperation().

706  { return cet::demangle_symbol(typeid(*this).name()); }
virtual bool evd::RawDataDrawer::BoxDrawer::Operate ( geo::WireID const &  wireID,
size_t  tick,
float  adc 
)
inlineoverridevirtual

Implements evd::RawDataDrawer::OperationBaseClass.

Definition at line 948 of file RawDataDrawer.cxx.

References evd::RawDataDrawer::BoxInfo_t::adc, evd::RawDataDrawer::BoxInfo_t::good, and geo::WireID::Wire.

949  {
950  geo::WireID::WireID_t const wire = wireID.Wire;
951  std::ptrdiff_t cell = drawingRange.GetCell(wire, tick);
952  if (cell < 0) return true;
953 
954  BoxInfo_t& info = boxInfo[cell];
955  info.good = true; // if in range, we mark this cell as good
956 
957  rawCharge += adc;
959 
960  // draw maximum digit in the cell
961  if (std::abs(info.adc) <= std::abs(adc)) info.adc = adc;
962 
963  return true;
964  }
details::CellGridClass drawingRange
std::ptrdiff_t GetCell(float wire, float tick) const
Returns the index of specified cell, or -1 if out of range.
std::vector< BoxInfo_t > boxInfo
details::ADCCorrectorClass ADCCorrector
unsigned int WireID_t
Type for the ID number.
Definition: geo_types.h:306
bool evd::RawDataDrawer::OperationBaseClass::operator() ( geo::WireID const &  wireID,
size_t  tick,
float  adc 
)
inlineinherited

Definition at line 708 of file RawDataDrawer.cxx.

709  { return Operate(wireID, tick, adc); }
virtual bool Operate(geo::WireID const &wireID, size_t tick, float adc)=0
geo::PlaneID const& evd::RawDataDrawer::OperationBaseClass::PlaneID ( ) const
inlineinherited

Definition at line 711 of file RawDataDrawer.cxx.

Referenced by evd::RawDataDrawer::RunOperation().

711 { return planeID; }
virtual bool evd::RawDataDrawer::BoxDrawer::ProcessTick ( size_t  tick)
inlineoverridevirtual

Reimplemented from evd::RawDataDrawer::OperationBaseClass.

Definition at line 944 of file RawDataDrawer.cxx.

945  { return drawingRange.hasTick((float) tick); }
details::CellGridClass drawingRange
bool hasTick(float tick) const
Returns whether the range includes the specified wire.
virtual bool evd::RawDataDrawer::BoxDrawer::ProcessWire ( geo::WireID const &  wire)
inlineoverridevirtual

Reimplemented from evd::RawDataDrawer::OperationBaseClass.

Definition at line 941 of file RawDataDrawer.cxx.

References geo::WireID::Wire.

942  { return drawingRange.hasWire((int) wire.Wire); }
details::CellGridClass drawingRange
bool hasWire(float wire) const
Returns whether the range includes the specified wire.
RawDataDrawer* evd::RawDataDrawer::OperationBaseClass::RawDataDrawerPtr ( ) const
inlineinherited

Definition at line 712 of file RawDataDrawer.cxx.

712 { return pRawDataDrawer; }

Member Data Documentation

details::ADCCorrectorClass evd::RawDataDrawer::BoxDrawer::ADCCorrector
private

Definition at line 989 of file RawDataDrawer.cxx.

std::vector<BoxInfo_t> evd::RawDataDrawer::BoxDrawer::boxInfo
private

Definition at line 988 of file RawDataDrawer.cxx.

double evd::RawDataDrawer::BoxDrawer::convertedCharge = 0.
private

Definition at line 986 of file RawDataDrawer.cxx.

details::CellGridClass evd::RawDataDrawer::BoxDrawer::drawingRange
private

Definition at line 987 of file RawDataDrawer.cxx.

RawDataDrawer* evd::RawDataDrawer::OperationBaseClass::pRawDataDrawer = nullptr
protectedinherited

Definition at line 715 of file RawDataDrawer.cxx.

double evd::RawDataDrawer::BoxDrawer::rawCharge = 0.
private

Definition at line 986 of file RawDataDrawer.cxx.

evdb::View2D* evd::RawDataDrawer::BoxDrawer::view
private

Definition at line 984 of file RawDataDrawer.cxx.


The documentation for this class was generated from the following file: