test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
ApvFactoryService Class Reference

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

ApvAnalysisFactoryapvFactory_
 
bool gotPed
 

Detailed Description

An interface class to set the parameter in ApvAnalysisFactory.

Definition at line 34 of file ApvFactoryService.h.

Constructor & Destructor Documentation

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().

19  :
20  apvFactory_()
21 {
22 
24  std::cout << " Print pedalgo inside ApvFactoryService constructor " << pset.getParameter<string>("CalculatorAlgorithm") << std::endl;
25 // activity.watchPostProcessEvent(this, &ApvFactoryService::postProcessEvent);
26 
27 
28 
29 }
T getParameter(std::string const &) const
tuple cout
Definition: gather_cfg.py:121
ApvAnalysisFactory * apvFactory_
ApvFactoryService::~ApvFactoryService ( )

Default destructor.

Definition at line 33 of file ApvFactoryService.cc.

33  {
34 }

Member Function Documentation

ApvAnalysisFactory *const ApvFactoryService::getApvFactory ( ) const

Definition at line 97 of file ApvFactoryService.cc.

References apvFactory_.

97  {
98 
99 return apvFactory_;
100 
101 }
ApvAnalysisFactory * apvFactory_
int ApvFactoryService::getEventInitNumber ( )

Definition at line 88 of file ApvFactoryService.cc.

88  {
89  return 0;
90 }
void ApvFactoryService::postProcessEvent ( const edm::Event ie,
const edm::EventSetup ies 
)

Definition at line 39 of file ApvFactoryService.cc.

References gotPed.

39  {
40 
41  if (gotPed)
42  return;
43 
44 /*
45  std::cout << "ApvFactoryService::post" << std::endl;
46 
47  edm::ESHandle<SiStripPedestals> ped;
48  ies.get<SiStripPedestalsRcd>().get(ped);
49 
50  //apvFactory_->SetPed(ped);
51 
52  gotPed=true;
53 
54 
55  std::vector<uint32_t> pdetid;
56  ped->getDetIds(pdetid);
57  edm::LogInfo("SiStripO2O") << " Peds Found " << pdetid.size() << " DetIds";
58 
59  // pedDB_=ped;
60 
61  for (size_t id=0;id<pdetid.size();id++){
62  SiStripPedestals::Range range=ped->getRange(pdetid[id]);
63  // SiStripPedestals::Range range=pedDB_.getRange(pdetid[id]);
64  int strip=0;
65 
66  edm::LogInfo("SiStripO2O") << "PED detid " << pdetid[id] << " \t"
67  << " strip " << strip << " \t"
68  << ped->getPed (strip,range) << " \t"
69  << ped->getLowTh (strip,range) << " \t"
70  << ped->getHighTh(strip,range) << " \t"
71  << std::endl;
72 
73  }
74 
75 */
76 
77 
78 }

Member Data Documentation

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().