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

Public Member Functions

 RoIextractorClass (geo::PlaneID const &pid, RawDataDrawer *data_drawer)
 
virtual bool Operate (geo::WireID const &wireID, size_t tick, float adc) override
 
virtual bool Finish () override
 
virtual bool Initialize ()
 
virtual bool ProcessWire (geo::WireID const &)
 
virtual bool ProcessTick (size_t)
 
virtual std::string Name () const
 
bool operator() (geo::WireID const &wireID, size_t tick, float adc)
 
geo::PlaneID const & PlaneID () const
 
RawDataDrawerRawDataDrawerPtr () const
 

Public Attributes

float const RoIthreshold
 

Protected Attributes

RawDataDrawerpRawDataDrawer = nullptr
 

Private Attributes

lar::util::MinMaxCollector< float > WireRange
 
lar::util::MinMaxCollector< float > TDCrange
 

Detailed Description

Definition at line 1117 of file RawDataDrawer.cxx.

Constructor & Destructor Documentation

evd::RawDataDrawer::RoIextractorClass::RoIextractorClass ( geo::PlaneID const &  pid,
RawDataDrawer data_drawer 
)
inline

Definition at line 1124 of file RawDataDrawer.cxx.

1125  : OperationBaseClass(pid, data_drawer)
1126  , RoIthreshold
1128  {}
OperationBaseClass(geo::PlaneID const &pid, RawDataDrawer *data_drawer=nullptr)
geo::PlaneID const & PlaneID() const

Member Function Documentation

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

Reimplemented from evd::RawDataDrawer::OperationBaseClass.

Definition at line 1139 of file RawDataDrawer.cxx.

References geo::GeometryCore::Nwires().

1140  {
1141  geo::PlaneID::PlaneID_t const plane = PlaneID().Plane;
1142  int& WireMin = pRawDataDrawer->fWireMin[plane];
1143  int& WireMax = pRawDataDrawer->fWireMax[plane];
1144  int& TimeMin = pRawDataDrawer->fTimeMin[plane];
1145  int& TimeMax = pRawDataDrawer->fTimeMax[plane];
1146 
1147  if ((WireMin == WireMax) && WireRange.has_data()) {
1149  mf::LogInfo("RawDataDrawer") << "Region of interest for "
1150  << std::string(PlaneID()) << " detected to be within wires "
1151  << WireRange.min() << " to " << WireRange.max()
1152  << " (plane has " << geom.Nwires(PlaneID()) << " wires)";
1153  WireMax = WireRange.max() + 1;
1154  WireMin = WireRange.min();
1155  }
1156  if ((TimeMin == TimeMax) && TDCrange.has_data()) {
1157  mf::LogInfo("RawDataDrawer") << "Region of interest for "
1158  << std::string(PlaneID()) << " detected to be within ticks "
1159  << TDCrange.min() << " to " << TDCrange.max();
1160  TimeMax = TDCrange.max() + 1;
1161  TimeMin = TDCrange.min();
1162  }
1163  return true;
1164  } // Finish()
Data_t max() const
Returns the accumulated maximum, or a very small number if no values.
bool has_data() const
Returns whether at least one datum has been added.
MaybeLogger_< ELseverityLevel::ELsev_info, false > LogInfo
lar::util::MinMaxCollector< float > WireRange
unsigned int Nwires(unsigned int p, unsigned int tpc=0, unsigned int cstat=0) const
Returns the total number of wires in the specified plane.
std::vector< int > fWireMin
lowest wire in interesting region for each plane
std::vector< int > fTimeMax
highest time in interesting region for each plane
unsigned int PlaneID_t
Type for the ID number.
Definition: geo_types.h:251
Data_t min() const
Returns the accumulated minimum, or a very large number if no values.
lar::util::MinMaxCollector< float > TDCrange
std::vector< int > fWireMax
highest wire in interesting region for each plane
PlaneID_t Plane
Index of the plane within its TPC.
Definition: geo_types.h:258
Description of geometry of one entire detector.
geo::PlaneID const & PlaneID() const
std::vector< int > fTimeMin
lowest time in interesting region for each plane
virtual bool evd::RawDataDrawer::OperationBaseClass::Initialize ( )
inlinevirtualinherited

Reimplemented in evd::RawDataDrawer::BoxDrawer, and evd::RawDataDrawer::ManyOperations.

Definition at line 696 of file RawDataDrawer.cxx.

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

696 { return true; }
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::RoIextractorClass::Operate ( geo::WireID const &  wireID,
size_t  tick,
float  adc 
)
inlineoverridevirtual

Implements evd::RawDataDrawer::OperationBaseClass.

Definition at line 1131 of file RawDataDrawer.cxx.

References geo::WireID::Wire.

1132  {
1133  if (std::abs(adc) < RoIthreshold) return true;
1134  WireRange.add(wireID.Wire);
1135  TDCrange.add(tick);
1136  return true;
1137  } // Operate()
This_t & add(Data_t value)
Include a single value in the statistics.
lar::util::MinMaxCollector< float > WireRange
lar::util::MinMaxCollector< float > TDCrange
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::OperationBaseClass::ProcessTick ( size_t  )
inlinevirtualinherited

Reimplemented in evd::RawDataDrawer::BoxDrawer, and evd::RawDataDrawer::ManyOperations.

Definition at line 699 of file RawDataDrawer.cxx.

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

699 { return true; }
virtual bool evd::RawDataDrawer::OperationBaseClass::ProcessWire ( geo::WireID const &  )
inlinevirtualinherited

Reimplemented in evd::RawDataDrawer::BoxDrawer, and evd::RawDataDrawer::ManyOperations.

Definition at line 698 of file RawDataDrawer.cxx.

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

698 { return true; }
RawDataDrawer* evd::RawDataDrawer::OperationBaseClass::RawDataDrawerPtr ( ) const
inlineinherited

Definition at line 712 of file RawDataDrawer.cxx.

712 { return pRawDataDrawer; }

Member Data Documentation

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

Definition at line 715 of file RawDataDrawer.cxx.

float const evd::RawDataDrawer::RoIextractorClass::RoIthreshold

Definition at line 1122 of file RawDataDrawer.cxx.

lar::util::MinMaxCollector<float> evd::RawDataDrawer::RoIextractorClass::TDCrange
private

Definition at line 1167 of file RawDataDrawer.cxx.

lar::util::MinMaxCollector<float> evd::RawDataDrawer::RoIextractorClass::WireRange
private

Definition at line 1167 of file RawDataDrawer.cxx.


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