An interface class to set the parameter in ApvAnalysisFactory. More...
#include <ApvFactoryService.h>
Public Member Functions | |
ApvFactoryService (const edm::ParameterSet &, edm::ActivityRegistry &) | |
ApvAnalysisFactory *const | getApvFactory () const |
int | getEventInitNumber () |
void | postProcessEvent (const edm::Event &ie, const edm::EventSetup &ies) |
~ApvFactoryService () | |
Private Attributes | |
ApvAnalysisFactory * | apvFactory_ |
bool | gotPed |
An interface class to set the parameter in ApvAnalysisFactory.
Definition at line 34 of file ApvFactoryService.h.
ApvFactoryService::ApvFactoryService | ( | const edm::ParameterSet & | pset, |
edm::ActivityRegistry & | activity | ||
) |
Constructor when using the "service" mode, which takes as an argument a ParameterSet (containing the database connection parameters).
Definition at line 18 of file ApvFactoryService.cc.
References apvFactory_, gather_cfg::cout, and edm::ParameterSet::getParameter().
: apvFactory_() { apvFactory_= new ApvAnalysisFactory(pset); std::cout << " Print pedalgo inside ApvFactoryService constructor " << pset.getParameter<string>("CalculatorAlgorithm") << std::endl; // activity.watchPostProcessEvent(this, &ApvFactoryService::postProcessEvent); }
ApvFactoryService::~ApvFactoryService | ( | ) |
ApvAnalysisFactory *const ApvFactoryService::getApvFactory | ( | ) | const |
int ApvFactoryService::getEventInitNumber | ( | ) |
Definition at line 88 of file ApvFactoryService.cc.
{
return 0;
}
void ApvFactoryService::postProcessEvent | ( | const edm::Event & | ie, |
const edm::EventSetup & | ies | ||
) |
Definition at line 39 of file ApvFactoryService.cc.
References gotPed.
{ if (gotPed) return; /* std::cout << "ApvFactoryService::post" << std::endl; edm::ESHandle<SiStripPedestals> ped; ies.get<SiStripPedestalsRcd>().get(ped); //apvFactory_->SetPed(ped); gotPed=true; std::vector<uint32_t> pdetid; ped->getDetIds(pdetid); edm::LogInfo("SiStripO2O") << " Peds Found " << pdetid.size() << " DetIds"; // pedDB_=ped; for (size_t id=0;id<pdetid.size();id++){ SiStripPedestals::Range range=ped->getRange(pdetid[id]); // SiStripPedestals::Range range=pedDB_.getRange(pdetid[id]); int strip=0; edm::LogInfo("SiStripO2O") << "PED detid " << pdetid[id] << " \t" << " strip " << strip << " \t" << ped->getPed (strip,range) << " \t" << ped->getLowTh (strip,range) << " \t" << ped->getHighTh(strip,range) << " \t" << std::endl; } */ }
ApvAnalysisFactory* ApvFactoryService::apvFactory_ [private] |
Class that holds addresses that uniquely identify a hardware component within the control system. Instance of struct that holds all DB connection parameters.
Definition at line 66 of file ApvFactoryService.h.
Referenced by ApvFactoryService(), and getApvFactory().
bool ApvFactoryService::gotPed [private] |
Definition at line 68 of file ApvFactoryService.h.
Referenced by postProcessEvent().