gtree->GetBranch("flux")->GetClassName() (const char* 0x31f41c0)"genie::flux::GNuMIFluxPassThroughInfo"
gtree->GetBranch("simple")->GetClassName() (const char* 0x2a2a8e0)"genie::flux::GSimpleNtpEntry" gtree->GetBranch("numi")->GetClassName() (const char* 0x2a33d40)"genie::flux::GSimpleNtpNuMI
gtree->GetBranch("aux")->GetClassName()
(const char* 0x2a35320)"genie::flux::GSimpleNtpAux"
gtree->GetBranch("dk2nu")->GetClassName() (const char* 0x3457d59)"bsim::Dk2Nu" gtree->GetBranch("nuchoice")->GetClassName() (const char* 0x3479329)"bsim::NuChoice"
298 fMyModuleType = fParams.get_PSet().get<
std::string>(
"module_type");
299 fMyModuleLabel = fParams.get_PSet().get<
std::string>(
"module_label");
302 <<
" ctor start " << fMyModuleLabel
305 fFileList = fParams().fileList();
308 ParseVtxOffsetConfig();
310 fGlobalTimeOffset = fParams().globalTimeOffset();
311 fAddMCFlux = fParams().addMCFlux();
312 fRandomEntries = fParams().randomEntries();
316 produces< std::vector<simb::MCTruth> >();
317 produces< std::vector<simb::GTruth> >();
318 produces< art::Assns<simb::MCTruth, simb::GTruth> >();
320 produces< std::vector<simb::MCFlux> >();
322 produces< art::Assns<simb::MCTruth, simb::MCFlux> >();
330 for (
size_t i=0; i < fFileList.size(); ++i) {
332 outFileList += fFileList[i];
333 fGTreeChain->Add(fFileList[0].c_str());
337 fNumMCRec = fGTreeChain->GetEntries();
338 fLastUsedMCRec = fNumMCRec;
357 TObjArray* blist = fGTreeChain->GetListOfBranches();
360 while ( ( obj = next() ) ) {
364 const TBranchElement* belement =
dynamic_cast<const TBranchElement*
>(obj);
365 const TBranchObject* bobject =
dynamic_cast<const TBranchObject*
>(obj);
366 if ( ! belement && ! bobject ) {
369 <<
"### supposed branch element '" << bname
370 <<
"' wasn't a TBranchElement/TBranchObject but instead a " 372 if ( bname ==
"gmcrec" ) {
374 <<
"### since this is '" << bname
375 <<
"' this is likely to end very badly badly" <<
std::endl;
379 std::string bclass = (belement) ? belement->GetClassName()
380 : bobject->GetClassName();
381 if ( bclass ==
"genie::NtpMCEventRecord" ) {
382 fGTreeChain->SetBranchAddress(bname.c_str(),&fMCRec);
383 }
else if ( bclass ==
"genie::flux::GNuMIFluxPassThroughInfo" ) {
385 fGTreeChain->SetBranchAddress(bname.c_str(),&fGNuMIFluxPassThroughInfo);
386 }
else if ( bclass ==
"genie::flux::GSimpleNtpEntry" ) {
388 fGTreeChain->SetBranchAddress(bname.c_str(),&fGSimpleNtpEntry);
389 }
else if ( bclass ==
"genie::flux::GSimpleNtpNuMI" ) {
391 fGTreeChain->SetBranchAddress(bname.c_str(),&fGSimpleNtpNuMI);
392 }
else if ( bclass ==
"genie::flux::GSimpleNtpAux" ) {
394 fGTreeChain->SetBranchAddress(bname.c_str(),&fGSimpleNtpAux);
395 }
else if ( bclass ==
"bsim::Dk2Nu" ) {
396 fDk2Nu =
new bsim::Dk2Nu;
397 fGTreeChain->SetBranchAddress(bname.c_str(),&fDk2Nu);
398 }
else if ( bclass ==
"bsim::NuChoice" ) {
399 fNuChoice =
new bsim::NuChoice;
400 fGTreeChain->SetBranchAddress(bname.c_str(),&fNuChoice);
403 <<
"### branch element '" << bname
404 <<
"' was unhandled '" << bclass <<
"' class" <<
std::endl;
409 <<
"chain has " << fNumMCRec <<
" entries" 413 if ( fOutputPrintLevel > 0 ) {
414 if ( fOutputDumpFileName ==
"" ||
415 fOutputDumpFileName ==
"--" ||
416 fOutputDumpFileName ==
"cout" ||
417 fOutputDumpFileName ==
"std::cout" ) {
419 fOutputDumpFileName =
"std::cout";
420 fOutputStream = &(std::cout);
422 size_t posl = fOutputDumpFileName.find(
"%l");
423 if ( posl != std::string::npos ) {
424 fOutputDumpFileName.replace(posl,2,fMyModuleLabel);
427 <<
"#### AddGenieEventsToArt::ctor open " 428 << fOutputDumpFileName
431 new std::ofstream(fOutputDumpFileName.c_str(),
432 std::ios_base::trunc|std::ios_base::out);
MaybeLogger_< ELseverityLevel::ELsev_info, false > LogInfo
MINOS-style ntuple record. Each such ntuple record holds a generated EventRecord object. Ntuples of this type are intended for feeding GENIE events into other applications (for example the GEANT4 based MC generation framework of an experiment) if no direct interface exists.
EDProducer(fhicl::ParameterSet const &pset)
genie::flux::GSimpleNtpEntry * fGSimpleNtpEntry
unsigned int GetRandomNumberSeed()
MaybeLogger_< ELseverityLevel::ELsev_error, false > LogError
evgb::EvtTimeShiftI * fTimeShifter
CLHEP::HepRandomEngine & fEngine
genie::flux::GSimpleNtpAux * fGSimpleNtpAux
bsim::NuChoice * fNuChoice
QTextStream & flush(QTextStream &s)
std::ostream * fOutputStream
static PDGLibrary * Instance(void)
genie::NtpMCEventRecord * fMCRec
genie::flux::GSimpleNtpNuMI * fGSimpleNtpNuMI
genie::flux::GNuMIFluxPassThroughInfo * fGNuMIFluxPassThroughInfo
QTextStream & endl(QTextStream &s)