Project

General

Profile

Support #3439

NOvA services using post/pre BeginRun don't see Run record data product

Added by Robert Hatcher almost 7 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Category:
User Code
Target version:
Start date:
02/06/2013
Due date:
% Done:

100%

Estimated time:
Scope:
Internal
Experiment:
-
SSI Package:
Duration:

Description

Currently MC generation proceeds as a single job generating interactions (GENIE) followed by Geant4 and photon transport/electronics simulation. To study some improvements in Geant4 processing I had Zukai Wang split the job into two parts along the GENIE / Geant4 line. The GENIE stage puts a sumdata::RunData product in the Run record. This product has a DetId value used by Geometry, CMap and ChannelInfo/BadChanList services to identify whether the data is for the Near, Far, or NDOS detector.

Looking in the output of the first stage (GENIE) it looks like the sumdata::RunData product is there, at least as seen by eventdump.fcl (see below) and an inspection of the file with ROOT TBrowser. But when the second stage is run, none of the services see the sumdata::RunData. The geometry service has, as part of Geometry::preBeginRun():

   // check here to see if we need to load a new geometry.
   // get the detector id from the run object
   std::vector< art::Handle<sumdata::RunData> > rdcol;
   run.getManyByType(rdcol);
Failing to find it in this code is protected against, and yields:
  %MSG-w LoadNewGeometry:  PostSourceRun 06-Feb-2013 15:01:07 CST run: 1 
  cannot find sumdata::RunData object to grab detid
  or user has determined to only use the value from the fcl file
  using currently configured geometry:
  %MSG

I added code following the getManyByType() (in all three cases) to print out the size of the vector (always zero). I also tried:

   art::Handle<sumdata::RunData> myrd;
   run.getByLabel("generator",myrd);
   mf::LogInfo("Geometry") << "my RunData " << myrd->DetId();
with no success either.

But looking at the input file:

  nova -c job/eventdump.fcl zukai_genieonly_gen.root 

  […info about the 10 event records…]

  06-Feb-2013 15:05:04 CST  Closed file zukai_genieonly_gen.root
  PROCESS NAME | MODULE LABEL | PRODUCT INSTANCE NAME | DATA PRODUCT TYPE | SIZE
  Genie....... | generator... | ..................... | sumdata::POTSum.. | ...-

  Total products (present, not present): 1 (1, 0).

  PROCESS NAME | MODULE LABEL | PRODUCT INSTANCE NAME | DATA PRODUCT TYPE | SIZE
  Genie....... | generator... | ..................... | sumdata::RunData. | ...-

  Total products (present, not present): 1 (1, 0).

The FileDumperOutput module doesn't really make clear what these two products are associated with (the event info is clearly associated with an event). I think the first is the SubRun record and the second is the Run record -- that's what I think they should be. So the question is why does the second job not see the sumdata::RunData at [pre|post]BeginRun for the services?

Here's the procedure I'm using:

  setup_nova
  cd /nova/app/users/rhatcher/art/devel_genie
  srt_setup -a

  nova -n 10 -c zukai_genieonly_ndos.fcl
  nova  -c zukai_geant4plus_ndos.fcl zukai_genieonly_gen.root 

zukai_genieonly_ndos.fcl (2.16 KB) zukai_genieonly_ndos.fcl Robert Hatcher, 02/06/2013 10:39 PM
zukai_geant4plus_ndos.fcl (2.56 KB) zukai_geant4plus_ndos.fcl Robert Hatcher, 02/06/2013 10:39 PM

Associated revisions

Revision 6581ccc0 (diff)
Added by Christopher Green almost 7 years ago

Prevent issue #3439 from occurring in future.

History

#1 Updated by Christopher Green almost 7 years ago

  • Category changed from Event Loop to User Code
  • Status changed from New to Resolved
  • Assignee set to Christopher Green
  • % Done changed from 0 to 100

No file is being read. The second configuration file you specify has:

source:
{
  module_type: EmptyEvent
  firstRun:    1           # Run number to use for this file
  firstSubRun: 1           # Subrun number to use for this file
  firstEvent:  1           # number of first event in the file
}

Specifying a source file on the command line will create a new source block if none exists, but it will not change the module type of an existing source block. Therefore since EmptyEvent does not honor fileNames, no file is read.

The problem may be resolved by deleting the source block from the .fcl file, and by changing the process_name to avoid clashes with products in the file.

#2 Updated by Christopher Green over 6 years ago

  • Status changed from Resolved to Closed


Also available in: Atom PDF