process PROD  = {
   service = MessageLogger
   {
      untracked vstring destinations = {"cerr", "cout"}
      PSet cerr                      = { string threshold = "WARNING" }
      PSet cout                      = { string threshold = "INFO"    }

      untracked vstring fwkJobReports = {"FrameworkJobReport.xml"}
      vstring categories = { "FwkJob" }

      PSet FrameworkJobReport.xml = {
                                PSet default = { int32 limit = 0 }
                                PSet FwkJob = { int32 limit = 10000000 }
                                    }

   }
 #######################################################################################
 # input
	source = Ecal2004TBSource { 
		untracked vstring fileNames = { 'file:/data/meridian/data/h42004/ecs73276' }
		untracked int32 maxEvents = 10000
	}
 #######################################################################################

  es_source = PoolDBESSource { VPSet toGet = {
                                {string record = "EcalPedestalsRcd"
                                 string tag = "EcalPedestals"},
                                {string record = "EcalTBWeightsRcd"
                                 string tag = "EcalTBWeights"},
                                {string record = "EcalGainRatiosRcd"
                                 string tag = "EcalGainRatios"
                                },
#                               {string record = "EcalIntercalibConstantsRcd"
#                                 string tag = "EcalIntercalibConstants"
#                                },
#                                {string record = "EcalADCToGeVConstantRcd"
#                                 string tag = "EcalADCToGeVConstant"
#                                },
                                {string record = "EcalWeightXtalGroupsRcd"
                                 string tag = "EcalWeightXtalGroups"}
                               }
                               bool loadAll = true
                               string connect = "sqlite_file:/afs/cern.ch/cms/ECAL/testbeam/pedestal/2004/ecal2004condDB.db"
		               untracked string catalog = "file:/afs/cern.ch/cms/ECAL/testbeam/pedestal/2004/PoolFileCatalog.xml"	
                               string timetype = "runnumber"
                              untracked uint32 authenticationMethod = 0
                             untracked uint32 messagelevel = 1
	  }
	
 module get = EventSetupRecordDataGetter { VPSet toGet = 
	{
	       {string record = "EcalPedestalsRcd"
	        vstring data = {"EcalPedestals"} }, 
	      	{string record = "EcalTBWeightsRcd"
	        vstring data = {"EcalTBWeights"} },
                {string record = "EcalGainRatiosRcd"
                 vstring data  = {"EcalGainRatios"}
                },
#                {string record = "EcalIntercalibConstantsRcd"
#                 vstring data  = {"EcalIntercalibConstants"}
#                },
#                {string record = "EcalADCToGeVConstantRcd"
#                 vstring data  = {"EcalADCToGeVConstant"}
#                }, 
	      	{string record = "EcalWeightXtalGroupsRcd"
	        vstring data = {"EcalWeightXtalGroups"} }
       }
	       untracked bool verbose = true 
	}

# module prod = EcalObjectAnalyzer{}

 ###################################################################
 # Get hardcoded conditions the same used for standard digitization
#  es_source = EcalTrivialConditionRetriever {
#       untracked double adcToGeVEBConstant = 0.0286
#      untracked double adcToGeVEBConstant = 0.0636
#  }
 ###################################################################

 #######################################################################################
 # Hodoscope Reconstruction
 include "RecoTBCalo/EcalTBHodoscopeReconstructor/data/EcalTBHodoscopeReconstructor.cfi"
 #######################################################################################		

 #######################################################################################
 # TDC Reconstruction
 include "RecoTBCalo/EcalTBTDCReconstructor/data/EcalTBTDCReconstructor.cfi"
 #######################################################################################		

  # uncalibrated rechit producer
  module ecaluncalibrechit = EcalTBWeightUncalibRecHitProducer {
   string digiProducer   = "Ecal2004TBSource"
   string EBdigiCollection = ""
   string tdcRecInfoProducer   = "tdcReco"
   string tdcRecInfoCollection = "EcalTBTDCRecInfo"
   string EBhitCollection  = "EcalUncalibRecHitsEB"
   int32  nbTimeBin=25		
  }


  module out = PoolOutputModule 
   {	
     untracked string fileName = 'tbuncalibhits.root'
   }

  path p = {  get, hodoscopeReco, tdcReco, ecaluncalibrechit }

  endpath ep = { out }
}