LArSoft  v09_90_00
Liquid Argon Software toolkit - https://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)
 
bool Operate (geo::WireID const &wireID, size_t tick, float adc) override
 
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 1044 of file RawDataDrawer.cxx.

Constructor & Destructor Documentation

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

Definition at line 1048 of file RawDataDrawer.cxx.

1049  : OperationBaseClass(pid, data_drawer)
1051  {}
OperationBaseClass(geo::PlaneID const &pid, RawDataDrawer *data_drawer=nullptr)
geo::PlaneID const & PlaneID() const

Member Function Documentation

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

Reimplemented from evd::RawDataDrawer::OperationBaseClass.

Definition at line 1061 of file RawDataDrawer.cxx.

References geo::GeometryCore::Nwires().

1062  {
1063  geo::PlaneID::PlaneID_t const plane = PlaneID().Plane;
1064  int& WireMin = pRawDataDrawer->fWireMin[plane];
1065  int& WireMax = pRawDataDrawer->fWireMax[plane];
1066  int& TimeMin = pRawDataDrawer->fTimeMin[plane];
1067  int& TimeMax = pRawDataDrawer->fTimeMax[plane];
1068 
1069  if ((WireMin == WireMax) && WireRange.has_data()) {
1071  mf::LogInfo("RawDataDrawer")
1072  << "Region of interest for " << std::string(PlaneID()) << " detected to be within wires "
1073  << WireRange.min() << " to " << WireRange.max() << " (plane has "
1074  << geom.Nwires(PlaneID()) << " wires)";
1075  WireMax = WireRange.max() + 1;
1076  WireMin = WireRange.min();
1077  }
1078  if ((TimeMin == TimeMax) && TDCrange.has_data()) {
1079  mf::LogInfo("RawDataDrawer")
1080  << "Region of interest for " << std::string(PlaneID()) << " detected to be within ticks "
1081  << TDCrange.min() << " to " << TDCrange.max();
1082  TimeMax = TDCrange.max() + 1;
1083  TimeMin = TDCrange.min();
1084  }
1085  return true;
1086  } // 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
unsigned int PlaneID_t
Type for the ID number.
Definition: geo_types.h:464
lar::util::MinMaxCollector< float > WireRange
std::vector< int > fWireMin
lowest wire in interesting region for each plane
std::vector< int > fTimeMax
highest time in interesting region for each plane
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:481
Description of geometry of one entire detector.
Definition: GeometryCore.h:119
geo::PlaneID const & PlaneID() const
unsigned int Nwires(PlaneID const &planeid) const
Returns the total number of wires in the specified plane.
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 653 of file RawDataDrawer.cxx.

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

653 { return true; }
virtual std::string evd::RawDataDrawer::OperationBaseClass::Name ( ) const
inlinevirtualinherited

Reimplemented in evd::RawDataDrawer::ManyOperations.

Definition at line 662 of file RawDataDrawer.cxx.

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

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

Implements evd::RawDataDrawer::OperationBaseClass.

Definition at line 1053 of file RawDataDrawer.cxx.

References util::abs(), and geo::WireID::Wire.

1054  {
1055  if (std::abs(adc) < RoIthreshold) return true;
1056  WireRange.add(wireID.Wire);
1057  TDCrange.add(tick);
1058  return true;
1059  } // Operate()
This_t & add(Data_t value)
Include a single value in the statistics.
constexpr auto abs(T v)
Returns the absolute value of the argument.
lar::util::MinMaxCollector< float > WireRange
lar::util::MinMaxCollector< float > TDCrange
tick_as<> tick
Tick number, represented by std::ptrdiff_t.
Definition: electronics.h:73
bool evd::RawDataDrawer::OperationBaseClass::operator() ( geo::WireID const &  wireID,
size_t  tick,
float  adc 
)
inlineinherited

Definition at line 664 of file RawDataDrawer.cxx.

665  {
666  return Operate(wireID, tick, adc);
667  }
tick_as<> tick
Tick number, represented by std::ptrdiff_t.
Definition: electronics.h:73
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 669 of file RawDataDrawer.cxx.

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

669 { return planeID; }
virtual bool evd::RawDataDrawer::OperationBaseClass::ProcessTick ( size_t  )
inlinevirtualinherited

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

Definition at line 656 of file RawDataDrawer.cxx.

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

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

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

Definition at line 655 of file RawDataDrawer.cxx.

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

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

Definition at line 670 of file RawDataDrawer.cxx.

670 { return pRawDataDrawer; }

Member Data Documentation

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

Definition at line 673 of file RawDataDrawer.cxx.

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

Definition at line 1046 of file RawDataDrawer.cxx.

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

Definition at line 1089 of file RawDataDrawer.cxx.

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

Definition at line 1089 of file RawDataDrawer.cxx.


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