8 #ifndef SBND_OPDETSIM_OPDETDIGITIZERWORKER_HH
9 #define SBND_OPDETSIM_OPDETDIGITIZERWORKER_HH
11 #include <unordered_map>
14 #include <condition_variable>
22 class DetectorClocksData;
60 std::condition_variable
cv;
91 std::unordered_map<int, sim::SimPhotons>& directPhotonsOnPMTS,
92 std::vector<art::Handle<std::vector<sim::SimPhotons>>> photon_handles)
const;
94 std::unordered_map<int, sim::SimPhotonsLite>& directPhotonsOnPMTS,
95 std::vector<art::Handle<std::vector<sim::SimPhotonsLite>>> photon_handles)
const;
117 bool ApplyTriggerLocations,
bool *finished);
121 #endif // SBND_OPDETSIM_OPDETDIGITIZERWORKER_HH
unsigned StartChannelToProcess(unsigned n) const
Semaphore(unsigned count_=0)
void SetWaveformHandle(std::vector< raw::OpDetWaveform > *Waveforms)
std::vector< raw::OpDetWaveform > * fWaveforms
void CreateDirectPhotonMap(std::unordered_map< int, sim::SimPhotons > &directPhotonsOnPMTS, std::vector< art::Handle< std::vector< sim::SimPhotons >>> photon_handles) const
void opDetDigitizerWorkerThread(const opDetDigitizerWorker &worker, detinfo::DetectorClocksData const &clockData, opDetDigitizerWorker::Semaphore &sem_start, opDetDigitizerWorker::Semaphore &sem_finish, bool ApplyTriggerLocations, bool *finished)
void SetTriggeredWaveformHandle(std::vector< raw::OpDetWaveform > *Waveforms)
opdet::DigiArapucaSBNDAlgMaker makeArapucaDigi
void StartopDetDigitizerWorkers(unsigned n_workers, opDetDigitizerWorker::Semaphore &sem_start)
std::condition_variable cv
const std::vector< art::Handle< std::vector< sim::SimPhotonsLite > > > * fPhotonLiteHandles
void decrement(unsigned n=1)
void WaitopDetDigitizerWorkers(unsigned n_workers, opDetDigitizerWorker::Semaphore &sem_finish)
void SetPhotonLiteHandles(const std::vector< art::Handle< std::vector< sim::SimPhotonsLite >>> *PhotonLiteHandles)
opdet::sbndPDMapAlg pdsMap
void SetPhotonHandles(const std::vector< art::Handle< std::vector< sim::SimPhotons >>> *PhotonHandles)
auto vector(Vector const &v)
Returns a manipulator which will print the specified array.
std::array< double, 2 > EnableWindow
unsigned NChannelsToProcess(unsigned n) const
void increment(unsigned n=1)
std::vector< raw::OpDetWaveform > * fTriggeredWaveforms
opDetDigitizerWorker(unsigned no, const Config &config, CLHEP::HepRandomEngine *Engine, const opDetSBNDTriggerAlg &trigger_alg)
const std::vector< art::Handle< std::vector< sim::SimPhotons > > > * fPhotonHandles
void Start(detinfo::DetectorClocksData const &clockData) const
Contains all timing reference information for the detector.
CLHEP::HepRandomEngine * fEngine
art::InputTag InputModuleName
void MakeWaveforms(opdet::DigiPMTSBNDAlg *pmtDigitizer, opdet::DigiArapucaSBNDAlg *arapucaDigitizer) const
void ApplyTriggerLocations(detinfo::DetectorClocksData const &clockData) const
Config(const opdet::DigiPMTSBNDAlgMaker::Config &pmt_config, const opdet::DigiArapucaSBNDAlgMaker::Config &arapuca_config)
opdet::DigiPMTSBNDAlgMaker makePMTDigi
void CreateDirectPhotonMapLite(std::unordered_map< int, sim::SimPhotonsLite > &directPhotonsOnPMTS, std::vector< art::Handle< std::vector< sim::SimPhotonsLite >>> photon_handles) const
unsigned int Nsamples_Daphne
const opDetSBNDTriggerAlg & fTriggerAlg