LArSoft  v07_13_02
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 926 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 929 of file RawDataDrawer.cxx.

934  : OperationBaseClass(pid, dataDrawer)
935  , view(new_view)
936  , rawCharge(0.), convertedCharge(0.)
937  , drawingRange(*(dataDrawer->fDrawingRange))
938  , ADCCorrector(PlaneID())
939  {}
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 983 of file RawDataDrawer.cxx.

984  {
985  // write the information back
986  geo::PlaneID::PlaneID_t const plane = PlaneID().Plane;
989 
990  // the cell size might have changed because of minimum size settings
991  // from configuration (see Initialize())
993 
994  // complete the drawing
996 
997  return true;
998  }
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 941 of file RawDataDrawer.cxx.

References evd::RawDrawingOptions::fTicksPerPoint.

942  {
944 
945  // set up the size of the grid to be visualized;
946  // the information on the size has to be already there:
947  // caller should have user ExtractRange(), or similar, first.
948  // set the minimum cell in ticks to at least match fTicksPerPoint
950  // also set the minimum wire cell size to 1,
951  // otherwise there will be cells represented by no wire.
953  boxInfo.clear();
954  boxInfo.resize(drawingRange.NCells());
955  return true;
956  }
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 965 of file RawDataDrawer.cxx.

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

966  {
967  geo::WireID::WireID_t const wire = wireID.Wire;
968  std::ptrdiff_t cell = drawingRange.GetCell(wire, tick);
969  if (cell < 0) return true;
970 
971  BoxInfo_t& info = boxInfo[cell];
972  info.good = true; // if in range, we mark this cell as good
973 
974  rawCharge += adc;
976 
977  // draw maximum digit in the cell
978  if (std::abs(info.adc) <= std::abs(adc)) info.adc = adc;
979 
980  return true;
981  }
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 961 of file RawDataDrawer.cxx.

962  { 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 958 of file RawDataDrawer.cxx.

References geo::WireID::Wire.

959  { 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 1006 of file RawDataDrawer.cxx.

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

Definition at line 1005 of file RawDataDrawer.cxx.

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

Definition at line 1003 of file RawDataDrawer.cxx.

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

Definition at line 1004 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 1003 of file RawDataDrawer.cxx.

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

Definition at line 1001 of file RawDataDrawer.cxx.


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