Public Member Functions | Public Attributes | Private Attributes | List of all members
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
 
- Public Member Functions inherited from evd::RawDataDrawer::OperationBaseClass
 OperationBaseClass (geo::PlaneID const &pid, RawDataDrawer *data_drawer=nullptr)
 
virtual ~OperationBaseClass ()=default
 
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
 

Private Attributes

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

Additional Inherited Members

- Protected Attributes inherited from evd::RawDataDrawer::OperationBaseClass
RawDataDrawerpRawDataDrawer = nullptr
 

Detailed Description

Definition at line 1258 of file RawDataDrawer.cxx.

Constructor & Destructor Documentation

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

Definition at line 1262 of file RawDataDrawer.cxx.

1263  : OperationBaseClass(pid, data_drawer)
1265  {}
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 1277 of file RawDataDrawer.cxx.

1278  {
1279  geo::PlaneID::PlaneID_t const plane = PlaneID().Plane;
1280  int& WireMin = pRawDataDrawer->fWireMin[plane];
1281  int& WireMax = pRawDataDrawer->fWireMax[plane];
1282  int& TimeMin = pRawDataDrawer->fTimeMin[plane];
1283  int& TimeMax = pRawDataDrawer->fTimeMax[plane];
1284 
1285  if ((WireMin == WireMax) && WireRange.has_data()) {
1287  mf::LogInfo("RawDataDrawer")
1288  << "Region of interest for " << std::string(PlaneID()) << " detected to be within wires "
1289  << WireRange.min() << " to " << WireRange.max() << " (plane has "
1290  << geom.Nwires(PlaneID()) << " wires)";
1291  WireMax = WireRange.max() + 1;
1292  WireMin = WireRange.min();
1293  }
1294  if ((TimeMin == TimeMax) && TDCrange.has_data()) {
1295  mf::LogInfo("RawDataDrawer")
1296  << "Region of interest for " << std::string(PlaneID()) << " detected to be within ticks "
1297  << TDCrange.min() << " to " << TDCrange.max();
1298  TimeMax = TDCrange.max() + 1;
1299  TimeMin = TDCrange.min();
1300  }
1301  return true;
1302  } // 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.
std::string string
Definition: nybbler.cc:12
MaybeLogger_< ELseverityLevel::ELsev_info, false > LogInfo
unsigned int PlaneID_t
Type for the ID number.
Definition: geo_types.h:473
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
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:493
Description of geometry of one entire detector.
geo::PlaneID const & PlaneID() const
std::vector< int > fTimeMin
lowest time in interesting region for each plane
bool evd::RawDataDrawer::RoIextractorClass::Operate ( geo::WireID const &  wireID,
size_t  tick,
float  adc 
)
inlineoverridevirtual

Implements evd::RawDataDrawer::OperationBaseClass.

Definition at line 1268 of file RawDataDrawer.cxx.

1269  {
1270  if (std::abs(adc) < RoIthreshold) return true;
1271  WireRange.add(wireID.Wire);
1272  TDCrange.add(tick);
1273  return true;
1274  } // Operate()
This_t & add(Data_t value)
Include a single value in the statistics.
int16_t adc
Definition: CRTFragment.hh:202
lar::util::MinMaxCollector< float > WireRange
T abs(T value)
lar::util::MinMaxCollector< float > TDCrange
tick_as<> tick
Tick number, represented by std::ptrdiff_t.
Definition: electronics.h:75

Member Data Documentation

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

Definition at line 1260 of file RawDataDrawer.cxx.

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

Definition at line 1305 of file RawDataDrawer.cxx.

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

Definition at line 1305 of file RawDataDrawer.cxx.


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