Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 2 additions & 15 deletions Steer/DigitizerWorkflow/src/CPVDigitizerSpec.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -55,20 +55,6 @@ void DigitizerSpec::initDigitizerTask(framework::InitContext& ic)
mDeadTime = o2::cpv::CPVSimParams::Instance().mDeadTime; // PHOS dead time (should include readout => mReadoutTime< mDeadTime)
}
}
// helper function which will be offered as a service
void DigitizerSpec::retrieveHits(const char* brname,
int sourceID,
int entryID)
{
auto br = mSimChains[sourceID]->GetBranch(brname);
if (!br) {
LOG(error) << "No branch found";
return;
}
mHits->clear();
br->SetAddress(&mHits);
br->GetEntry(entryID);
}

void DigitizerSpec::updateTimeDependentParams(framework::ProcessingContext& ctx)
{
Expand Down Expand Up @@ -165,7 +151,8 @@ void DigitizerSpec::run(framework::ProcessingContext& pc)
// get the hits for this event and this source
int source = part->sourceID;
int entry = part->entryID;
retrieveHits("CPVHit", source, entry);
mHits->clear();
context->retrieveHits(mSimChains, "CPVHit", source, entry, mHits);
part++;
if (part == eventParts[collID].end() && isLastStream) { // last stream, copy digits directly to output vector
mDigitizer.processHits(mHits, mDigitsFinal, mDigitsOut, mLabels, collID, source, dt);
Expand Down
8 changes: 0 additions & 8 deletions Steer/DigitizerWorkflow/src/CPVDigitizerSpec.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,6 @@ class DigitizerSpec final : public o2::base::BaseDPLDigitizer
void run(framework::ProcessingContext& ctx);

private:
/// \brief helper function which will be offered as a service
/// \param brname Name of the hit branch
/// \param sourceID ID of the source
/// \param entryID ID of the entry in the source
void retrieveHits(const char* brname,
int sourceID,
int entryID);

void updateTimeDependentParams(framework::ProcessingContext& ctx);

float mReadoutTime = 0.; ///< PHOS readout time
Expand Down
18 changes: 3 additions & 15 deletions Steer/DigitizerWorkflow/src/PHOSDigitizerSpec.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -60,20 +60,6 @@ void DigitizerSpec::initDigitizerTask(framework::InitContext& ic)
}
mHits = new std::vector<Hit>();
}
// helper function which will be offered as a service
void DigitizerSpec::retrieveHits(const char* brname,
int sourceID,
int entryID)
{
auto br = mSimChains[sourceID]->GetBranch(brname);
if (!br) {
LOG(error) << "No branch found";
return;
}
mHits->clear();
br->SetAddress(&mHits);
br->GetEntry(entryID);
}

void DigitizerSpec::run(framework::ProcessingContext& pc)
{
Expand Down Expand Up @@ -156,7 +142,9 @@ void DigitizerSpec::run(framework::ProcessingContext& pc)
// get the hits for this event and this source
int source = part->sourceID;
int entry = part->entryID;
retrieveHits("PHSHit", source, entry);
mHits->clear();
context->retrieveHits(mSimChains, "PHSHit", source, entry, mHits);

part++;
if (part == eventParts[collID].end() && isLastStream) { // last stream, copy digits directly to output vector
mDigitizer.processHits(mHits, mDigitsFinal, mDigitsOut, mLabels, entry, source, dt);
Expand Down
8 changes: 0 additions & 8 deletions Steer/DigitizerWorkflow/src/PHOSDigitizerSpec.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,6 @@ class DigitizerSpec final : public o2::base::BaseDPLDigitizer
void run(framework::ProcessingContext& ctx);

private:
/// \brief helper function which will be offered as a service
/// \param brname Name of the hit branch
/// \param sourceID ID of the source
/// \param entryID ID of the entry in the source
void retrieveHits(const char* brname,
int sourceID,
int entryID);

float mReadoutTime = 0.; ///< PHOS readout time
float mDeadTime = 0.; ///< PHOS dead time
bool mInitSimParams = true; ///< To initialize SimParams
Expand Down
Loading