CMS 3D CMS Logo

ApvFactoryService.cc
Go to the documentation of this file.
2 
3 
6 
7 
8 using namespace edm;
9 using namespace std;
10 //using namespace sistrip;
11 
12 // -----------------------------------------------------------------------------
13 //
14 
15 // -----------------------------------------------------------------------------
16 //
17 
19  edm::ActivityRegistry& activity ) :
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 }
30 
31 // -----------------------------------------------------------------------------
32 //
34 }
35 
36 // -----------------------------------------------------------------------------
37 
38 
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 }
79 
80 
81 
82 // -----------------------------------------------------------------------------
83 //
84 
85 // -----------------------------------------------------------------------------
86 //
87 
89  return 0;
90 }
91 // -----------------------------------------------------------------------------
92 
93 // -----------------------------------------------------------------------------
94 //
95 
96 
98 
99 return apvFactory_;
100 
101 }
102 
103 
104 
105 
106 
107 
108 
109 
110 
111 
112 
113 
T getParameter(std::string const &) const
void postProcessEvent(const edm::Event &ie, const edm::EventSetup &ies)
ApvAnalysisFactory *const getApvFactory() const
HLT enums.
ApvAnalysisFactory * apvFactory_
ApvFactoryService(const edm::ParameterSet &, edm::ActivityRegistry &)