.. _program_listing_file_larflow_Voxelizer_VoxelizeTriplets.h: Program Listing for File VoxelizeTriplets.h =========================================== |exhale_lsh| :ref:`Return to documentation for file ` (``larflow/Voxelizer/VoxelizeTriplets.h``) .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS .. code-block:: cpp #ifndef __VOXELIZE_TRIPLETS_H__ #define __VOXELIZE_TRIPLETS_H__ #include #include "bytesobject.h" #define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION #include #include #include #include "larcv/core/DataFormat/IOManager.h" #include "DataFormat/storage_manager.h" #include "larflow/PrepFlowMatchData/PrepMatchTriplets.h" namespace larflow { namespace voxelizer { class VoxelizeTriplets { public: VoxelizeTriplets(); VoxelizeTriplets( std::vector origin, std::vector dim_len, float voxel_size ); ~VoxelizeTriplets() {}; void process_fullchain( larcv::IOManager& iolcv, std::string adc_producer, std::string chstatus_producer, bool has_mc=false ); protected: int _ndims; std::vector _origin; std::vector _len; float _voxel_size; std::vector _nvoxels; void _define_voxels(); std::set< std::array > _voxel_set; std::map< std::array, int > _voxel_list; std::vector< std::vector > _voxelidx_to_tripidxlist; std::vector _trip2voxelidx; larflow::prep::PrepMatchTriplets _triplet_maker; public: int get_axis_voxel( int axis, float coord ) const; void make_voxeldata( const larflow::prep::PrepMatchTriplets& triplet_data ); PyObject* make_voxeldata_dict( const larflow::prep::PrepMatchTriplets& triplet_data ); PyObject* make_voxeldata_dict(); const std::vector& get_nvoxels() const { return _nvoxels; }; const std::vector& get_origin() const { return _origin; }; const std::vector& get_dim_len() const { return _len; }; float get_voxel_size() const { return _voxel_size; }; protected: private: static bool _setup_numpy; }; } } #endif