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" }
#      vstring debugModules = { 	"ecalrechit" }	
      PSet FrameworkJobReport.xml = {
                                PSet default = { int32 limit = 0 }
                                PSet FwkJob = { int32 limit = 10000000 }
                                    }

   }

 #######################################################################################
 # input
  source = PoolSource {
     untracked vstring fileNames = {'file:tbuncalibhits.root'}
     untracked int32 maxEvents = -1
     untracked uint32 debugVebosity = 1
     untracked bool   debugFlag     = false
  }
 #######################################################################################


  es_source = PoolDBESSource { VPSet toGet = {

                                {string record = "EcalIntercalibConstantsRcd"
                                 string tag = "EcalIntercalibConstants"
                                },
                                {string record = "EcalADCToGeVConstantRcd"
                                 string tag = "EcalADCToGeVConstant"
                                }

                               }
                               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 = "EcalIntercalibConstantsRcd"
                 vstring data  = {"EcalIntercalibConstants"}
                },
                {string record = "EcalADCToGeVConstantRcd"
                 vstring data  = {"EcalADCToGeVConstant"}
                }

       }
	       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.037
#  }
###################################################################



  # rechit producer
  module ecalrechit = EcalRecHitProducer {
    string uncalibRecHitProducer   = "ecaluncalibrechit"
    string EBuncalibRecHitCollection = "EcalUncalibRecHitsEB"
    string EEuncalibRecHitCollection = ""
    string EBrechitCollection        = "EcalRecHitsEB"
    string EErechitCollection        = ""
  }

  module out = PoolOutputModule 
   {	
	untracked vstring outputCommands = 
	  {
	    "drop *",
	    "keep EcalRecHitsSorted_*_*_*",
	    "keep EcalTBHodoscopeRecInfo_*_*_*",
	    "keep EcalTBEventHeader_*_*_*",
	    "keep EcalTBTDCRecInfo_*_*_*"
	  }
     untracked string fileName = 'tbhits.root'
   }

  #Use this to get calibrations from the DB	
  path p = {  get, ecalrechit }

  #Use this to get hardcoded calibrations 
#    path p = {  ecalrechit }

  endpath ep = { out }
}