#include "services_dune.fcl"
#include "photpropservices_dune.fcl"
#include "opticaldetectormodules_dune.fcl"
#include "anarootparser.fcl"
#include "pandoramodules_dune.fcl"
#include "hitfindermodules_dune.fcl"
#include "disambigcheck.fcl"
#include "tools_dune.fcl"

process_name: Mergeana

services:
{
  # Load the service that manages root files for histograms.
  TFileService: { fileName: "ana_hist.root" }
  MemoryTracker:     {}
  TimeTracker:       {}
  RandomNumberGenerator: {}
  FileCatalogMetadata:  @local::art_file_catalog_mc
  @table::dunedphase3x1x1_reco_services_legacy
}

source:
{
  module_type: RootInput
  maxEvents:  -1        # Number of events to create
}

# Define and configure some modules to do work on each event.
# First modules are defined; they are scheduled later.
# Modules are grouped by type.
physics:
{
 analyzers:
{
 analysistree:      @local::data_3x1x1_anarootparser
}

 #define the output stream, there could be more than one if using filters 
 stream1:  [ out1 ]

 #define the producer and filter modules for this path, order matters, 
 #filters reject all following items.  see lines starting physics.producers below
 ana:  [ analysistree ]

 #end_paths is a keyword and contains the paths that do not modify the art::Event, 
 #ie analyzers and output streams.  these all run simultaneously
 end_paths:     [ana]  
}

#block to define where the output goes.  if you defined a filter in the physics
#block and put it in the trigger_paths then you need to put a SelectEvents: {SelectEvents: [XXX]}
#entry in the output stream you want those to go to, where XXX is the label of the filter module(s)
outputs:
{
 out1:
 {
   module_type: RootOutput
   fileName:    "%ifb_%tc_merged.root"
   dataTier:    "full-reconstructed"
   compressionLevel: 1
 }
}

### Here, we overwrite ALL module Labels with the ones defined above.
physics.analyzers.analysistree.LogLevel:		0
physics.analyzers.analysistree.SaveRawDigitInfo:	true
