Skip to content

Commit

Permalink
Merge pull request #125 from goodenou/art3_MT
Browse files Browse the repository at this point in the history
fixing of bugs which wouldn't allow stage 2 types of jobs to run
  • Loading branch information
kutschke authored Jan 28, 2020
2 parents 651cf94 + 2b94faa commit f6bdbae
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 16 deletions.
2 changes: 1 addition & 1 deletion JobConfig/cosmic/dsstops_resampler_lo.fcl
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ physics.filters.filterS1.cutEDepMax: 14
//Drop truncated stream
physics.outputs: [DSVacuumOut]
//Events that deposited lower than 14 MeV in CRV
//physics.filters.dsResample.fileNames: ["/pnfs/mu2e/persistent/users/oksuzian/workflow/cry_rs1_1019_g4_10_5/outstage/25394938.fcllist_191106224859/00/00053/sim.oksuzian.minedep-filter.cry-minedep_filter-10-5.002701_00007722.art"]
physics.filters.dsResample.fileNames: ["/pnfs/mu2e/persistent/users/oksuzian/workflow/cry_rs1_1019_g4_10_5/outstage/25394938.fcllist_191106224859/00/00053/sim.oksuzian.minedep-filter.cry-minedep_filter-10-5.002701_00007722.art"]
4 changes: 2 additions & 2 deletions Mu2eG4/inc/Mu2eG4PerThreadStorage.hh
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,10 @@ struct Mu2eG4PerThreadStorage
artEvent->getByLabel(generatorModuleLabel, gensHandle);
}

if ( !gensHandle.isValid() )
if ( !gensHandle.isValid() && genInputHits == nullptr )
{
throw cet::exception("CONFIG")
<< "Error in PerThreadStorage::initializeEventInfo. You are trying to run in MT mode and there is no GenParticleCollection!\n";
<< "Error in PerThreadStorage::initializeEventInfo. You are trying to run a G4job without an input for G4.\n";
}

}
Expand Down
10 changes: 0 additions & 10 deletions Mu2eG4/src/Mu2eG4MT_module.cc
Original file line number Diff line number Diff line change
Expand Up @@ -328,16 +328,6 @@ void Mu2eG4MT::beginSubRun(art::SubRun& sr, art::ProcessingFrame const& procFram
// Create one G4 event and copy its output to the art::event.
void Mu2eG4MT::produce(art::Event& event, art::ProcessingFrame const& procFrame) {


if (num_schedules>1) {
if ( multiStagePars_.inputSimParticles() != art::InputTag()
|| multiStagePars_.inputMCTrajectories() != art::InputTag()
|| !(multiStagePars_.genInputHits().empty()) ) {
throw cet::exception("CONFIG")
<< "Error: You are trying to run in MT mode with input from previous stages. This is an invalid configuration!\n";
}
}

art::Handle<GenParticleCollection> gensHandle;
if(!(_generatorModuleLabel == art::InputTag())) {
event.getByLabel(_generatorModuleLabel, gensHandle);
Expand Down
9 changes: 6 additions & 3 deletions Mu2eG4/src/Mu2eG4WorkerRunManager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,14 @@ namespace mu2e {
stackingCuts_(createMu2eG4Cuts(pset_.get<fhicl::ParameterSet>("Mu2eG4StackingOnlyCut", fhicl::ParameterSet()), mu2elimits_)),
steppingCuts_(createMu2eG4Cuts(pset_.get<fhicl::ParameterSet>("Mu2eG4SteppingOnlyCut",fhicl::ParameterSet()), mu2elimits_)),
commonCuts_(createMu2eG4Cuts(pset_.get<fhicl::ParameterSet>("Mu2eG4CommonCut", fhicl::ParameterSet()), mu2elimits_))
{}
{
std::cout << "WorkerRM on thread " << workerID_ << " is being created\n!";

}

// Destructor of base is called automatically. No need to do anything.
Mu2eG4WorkerRunManager::~Mu2eG4WorkerRunManager(){
std::cout << "This WorkerRM is being destroyed!\n";
std::cout << "WorkerRM on thread " << workerID_ << " is being destroyed\n!";
}


Expand Down Expand Up @@ -285,7 +288,7 @@ void Mu2eG4WorkerRunManager::processEvent(art::Event* event){
numberOfEventProcessed = 0;
ConstructScoringWorlds();

std::cout << "WorkerRM::ProcessEvent:" << event->id().event() << " on thread " << workerID_ << std::endl;
// std::cout << "WorkerRM::ProcessEvent:" << event->id().event() << " on thread " << workerID_ << std::endl;

eventLoopOnGoing = true;
while(seedsQueue.size()>0)
Expand Down

0 comments on commit f6bdbae

Please sign in to comment.