![]() |
|
|||
File indexing completed on 2024-04-06 11:59:39
0001 #include "CalibTracker/SiStripAPVAnalysis/interface/ApvFactoryService.h" 0002 0003 #include "CondFormats/DataRecord/interface/SiStripPedestalsRcd.h" 0004 #include "CondFormats/SiStripObjects/interface/SiStripPedestals.h" 0005 0006 using namespace edm; 0007 using namespace std; 0008 //using namespace sistrip; 0009 0010 // ----------------------------------------------------------------------------- 0011 // 0012 0013 // ----------------------------------------------------------------------------- 0014 // 0015 0016 ApvFactoryService::ApvFactoryService(const edm::ParameterSet& pset, edm::ActivityRegistry& activity) : apvFactory_() { 0017 apvFactory_ = new ApvAnalysisFactory(pset); 0018 std::cout << " Print pedalgo inside ApvFactoryService constructor " 0019 << pset.getParameter<string>("CalculatorAlgorithm") << std::endl; 0020 // activity.watchPostProcessEvent(this, &ApvFactoryService::postProcessEvent); 0021 } 0022 0023 // ----------------------------------------------------------------------------- 0024 // 0025 ApvFactoryService::~ApvFactoryService() {} 0026 0027 // ----------------------------------------------------------------------------- 0028 0029 void ApvFactoryService::postProcessEvent(const edm::Event& ie, const edm::EventSetup& ies) { 0030 if (gotPed) 0031 return; 0032 0033 /* 0034 std::cout << "ApvFactoryService::post" << std::endl; 0035 0036 edm::ESHandle<SiStripPedestals> ped; 0037 ies.get<SiStripPedestalsRcd>().get(ped); 0038 0039 //apvFactory_->SetPed(ped); 0040 0041 gotPed=true; 0042 0043 0044 std::vector<uint32_t> pdetid; 0045 ped->getDetIds(pdetid); 0046 edm::LogInfo("SiStripO2O") << " Peds Found " << pdetid.size() << " DetIds"; 0047 0048 // pedDB_=ped; 0049 0050 for (size_t id=0;id<pdetid.size();id++){ 0051 SiStripPedestals::Range range=ped->getRange(pdetid[id]); 0052 // SiStripPedestals::Range range=pedDB_.getRange(pdetid[id]); 0053 int strip=0; 0054 0055 edm::LogInfo("SiStripO2O") << "PED detid " << pdetid[id] << " \t" 0056 << " strip " << strip << " \t" 0057 << ped->getPed (strip,range) << " \t" 0058 << ped->getLowTh (strip,range) << " \t" 0059 << ped->getHighTh(strip,range) << " \t" 0060 << std::endl; 0061 0062 } 0063 0064 */ 0065 } 0066 0067 // ----------------------------------------------------------------------------- 0068 // 0069 0070 // ----------------------------------------------------------------------------- 0071 // 0072 0073 int ApvFactoryService::getEventInitNumber() { return 0; } 0074 // ----------------------------------------------------------------------------- 0075 0076 // ----------------------------------------------------------------------------- 0077 // 0078 0079 ApvAnalysisFactory* const ApvFactoryService::getApvFactory() const { return apvFactory_; }
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.2.1 LXR engine. The LXR team |
![]() ![]() |