Skip to content

Commit

Permalink
Merge pull request #742 from macndev/art311
Browse files Browse the repository at this point in the history
Art v3_11 Upgrade
  • Loading branch information
kutschke authored Mar 24, 2022
2 parents 1e83155 + 7128256 commit cb03ed5
Show file tree
Hide file tree
Showing 23 changed files with 79 additions and 388 deletions.
2 changes: 1 addition & 1 deletion .muse
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# prefer to build with this environment
ENVSET p021
ENVSET p022
# add these to python path
PYTHONPATH Trigger/python
# add Offline/bin to path
Expand Down
87 changes: 0 additions & 87 deletions Analyses/src/TestKalRepProvenanceHelpers_module.cc

This file was deleted.

2 changes: 1 addition & 1 deletion EventGenerator/src/CORSIKAEventGenerator_module.cc
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ namespace mu2e {
{
std::unique_ptr<CosmicLivetime> livetime(new CosmicLivetime(_primaries, _area, _lowE, _highE, _fluxConstant));
std::cout << *livetime << std::endl;
subrun.put(std::move(livetime));
subrun.put(std::move(livetime), art::fullSubRun());
}

void CorsikaEventGenerator::produce(art::Event &evt)
Expand Down
2 changes: 1 addition & 1 deletion EventGenerator/src/CRYEventGenerator_module.cc
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ namespace mu2e {
1.8e4, // http://pdg.lbl.gov/2018/reviews/rpp2018-rev-cosmic-rays.pdf eq. 29.2
cryGen->getLiveTime() ));
std::cout << *livetime << std::endl;
subrun.put(std::move(livetime));
subrun.put(std::move(livetime), art::fullSubRun());
}

}
Expand Down
2 changes: 1 addition & 1 deletion EventGenerator/src/GenEventCounter_module.cc
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ namespace mu2e {
mf::LogInfo("Summary")<<"Creating GenEventCount record: "<<seenEvents_
<<" events for "<<sr.id()<<"\n";

sr.put(std::unique_ptr<GenEventCount>(new GenEventCount(seenEvents_)));
sr.put(std::unique_ptr<GenEventCount>(new GenEventCount(seenEvents_)), art::fullSubRun());

seenEvents_ = 0; // in case the job has more than one subrun
}
Expand Down
4 changes: 2 additions & 2 deletions EventMixing/src/Mu2eProductMixer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -186,14 +186,14 @@ namespace mu2e {
(*col)[stage].insert(subrunVolumes_[stage].begin(), subrunVolumes_[stage].end());
}

sr.put(std::move(col), subrunVolInstanceName_);
sr.put(std::move(col), subrunVolInstanceName_, art::fullSubRun());
}
if (mixCosmicLivetimes_) {
if(generatedEvents_ == 0)throw cet::exception("BADINPUT")<<"Mu2eProductMixer: generated event count =0; was the mixin file opened correctly?" << std::endl;
float scaling = resampledEvents_ / generatedEvents_;
auto livetime = std::make_unique<CosmicLivetime>(totalPrimaries_ * scaling,
area_, lowE_, highE_, fluxConstant_, livetime_ * scaling);
sr.put(std::move(livetime), subrunLivetimeInstanceName_);
sr.put(std::move(livetime), subrunLivetimeInstanceName_, art::fullSubRun());
}
}

Expand Down
2 changes: 1 addition & 1 deletion EventMixing/src/ProtonBunchIntensityFlat_module.cc
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ namespace mu2e {
}

void ProtonBunchIntensityFlat::beginSubRun(art::SubRun & subrun ) {
subrun.put(std::make_unique<ProtonBunchIntensity>(static_cast<unsigned long long>(llrint(mean_))),"MeanIntensity");
subrun.put(std::make_unique<ProtonBunchIntensity>(static_cast<unsigned long long>(llrint(mean_))),"MeanIntensity", art::fullSubRun());
}

}
Expand Down
2 changes: 1 addition & 1 deletion EventMixing/src/ProtonBunchIntensityLogNormal_module.cc
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ namespace mu2e {

//================================================================
void ProtonBunchIntensityLogNormal::beginSubRun(art::SubRun & subrun ) {
subrun.put(std::make_unique<ProtonBunchIntensity>(static_cast<unsigned long long>(llrint(mean_))),"MeanIntensity");
subrun.put(std::make_unique<ProtonBunchIntensity>(static_cast<unsigned long long>(llrint(mean_))),"MeanIntensity", art::fullSubRun());
}

//================================================================
Expand Down
2 changes: 1 addition & 1 deletion Filters/src/CompressPhysicalVolumes_module.cc
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ namespace mu2e {
}
}

sr.put(std::move(out));
sr.put(std::move(out), art::fullSubRun());

mf::LogInfo("Summary")
<< "CompressPhysicalVolumes stats: passed "
Expand Down
81 changes: 0 additions & 81 deletions GeometryService/src/GeometryRecorder_module.cc

This file was deleted.

2 changes: 2 additions & 0 deletions GlobalConstantsService/src/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ helper.make_plugins( [ mainlib,
'art_Utilities',
'canvas',
'boost_filesystem',
'cetlib',
'cetlib_except',
] )

# This tells emacs to view this file in python mode.
Expand Down
33 changes: 29 additions & 4 deletions Mu2eG4/inc/Mu2eG4Inputs.hh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include <vector>
#include <optional>

#include "cetlib/maybe_ref.h"
#include "canvas/Utilities/InputTag.h"
#include "Offline/Mu2eG4/inc/Mu2eG4Config.hh"
#include "Offline/Mu2eG4/inc/Mu2eG4PrimaryType.hh"
Expand All @@ -25,6 +26,33 @@ namespace mu2e {

class Mu2eG4Inputs {
public:

// The two elements of the return value of the function inputSimParticles.
// The maybe_ref is not valid if there are no input sim particles, either for
// initial stage jobs, or for non-filtered multistage input when the
// input event has no primaries for the current stage.
struct InputSimsInfo{
cet::maybe_ref<cet::map_vector<mu2e::SimParticle> const > sims;
art::ProductID id;

InputSimsInfo ():
sims(), id(){
}

InputSimsInfo ( cet::map_vector<mu2e::SimParticle> const& asims
, art::ProductID const& aid):
sims(asims), id(aid){
}

void reseat( cet::map_vector<mu2e::SimParticle> const& asims
, art::ProductID const& aid){
sims.reseat(asims);
id = aid;
}

bool isValid() const { return sims.isValid(); };
};

explicit Mu2eG4Inputs(const Mu2eG4Config::Inputs_& conf);

bool multiStage() const { return multiStage_; }
Expand All @@ -41,10 +69,7 @@ namespace mu2e {

const std::optional<EventLevelVolInfos>& updateEventLevelVolumeInfos() const { return elvi_; }

// The handle is not valid if there are no input sim particles, either for
// initial stage jobs, or for non-filtered multistage input when the
// input event has no primaries for the current stage.
art::Handle<SimParticleCollection> inputSimParticles(const art::Event& evt) const;
InputSimsInfo inputSimParticles(const art::Event& evt) const;

private:
Mu2eG4PrimaryType primaryType_;
Expand Down
2 changes: 1 addition & 1 deletion Mu2eG4/src/IonProducer_module.cc
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ namespace mu2e {
// content for the ion test use, but we still need a stage count.
mvi->resize(1);

sr.put(std::move(mvi));
sr.put(std::move(mvi), art::fullSubRun());
}

//================================================================
Expand Down
Loading

0 comments on commit cb03ed5

Please sign in to comment.