CalibTracker
SiStripAPVAnalysis
src
ApvFactoryService.cc
Go to the documentation of this file.
1
#include "
CalibTracker/SiStripAPVAnalysis/interface/ApvFactoryService.h
"
2
3
#include "
CondFormats/DataRecord/interface/SiStripPedestalsRcd.h
"
4
#include "
CondFormats/SiStripObjects/interface/SiStripPedestals.h
"
5
6
using namespace
edm
;
7
using namespace
std
;
8
//using namespace sistrip;
9
10
// -----------------------------------------------------------------------------
11
//
12
13
// -----------------------------------------------------------------------------
14
//
15
16
ApvFactoryService::ApvFactoryService
(
const
edm::ParameterSet
&
pset
,
edm::ActivityRegistry
& activity) : apvFactory_() {
17
apvFactory_
=
new
ApvAnalysisFactory
(
pset
);
18
std::cout
<<
" Print pedalgo inside ApvFactoryService constructor "
19
<<
pset
.getParameter<
string
>(
"CalculatorAlgorithm"
) << std::endl;
20
// activity.watchPostProcessEvent(this, &ApvFactoryService::postProcessEvent);
21
}
22
23
// -----------------------------------------------------------------------------
24
//
25
ApvFactoryService::~ApvFactoryService
() {}
26
27
// -----------------------------------------------------------------------------
28
29
void
ApvFactoryService::postProcessEvent
(
const
edm::Event
& ie,
const
edm::EventSetup
& ies) {
30
if
(
gotPed
)
31
return
;
32
33
/*
34
std::cout << "ApvFactoryService::post" << std::endl;
35
36
edm::ESHandle<SiStripPedestals> ped;
37
ies.get<SiStripPedestalsRcd>().get(ped);
38
39
//apvFactory_->SetPed(ped);
40
41
gotPed=true;
42
43
44
std::vector<uint32_t> pdetid;
45
ped->getDetIds(pdetid);
46
edm::LogInfo("SiStripO2O") << " Peds Found " << pdetid.size() << " DetIds";
47
48
// pedDB_=ped;
49
50
for (size_t id=0;id<pdetid.size();id++){
51
SiStripPedestals::Range range=ped->getRange(pdetid[id]);
52
// SiStripPedestals::Range range=pedDB_.getRange(pdetid[id]);
53
int strip=0;
54
55
edm::LogInfo("SiStripO2O") << "PED detid " << pdetid[id] << " \t"
56
<< " strip " << strip << " \t"
57
<< ped->getPed (strip,range) << " \t"
58
<< ped->getLowTh (strip,range) << " \t"
59
<< ped->getHighTh(strip,range) << " \t"
60
<< std::endl;
61
62
}
63
64
*/
65
}
66
67
// -----------------------------------------------------------------------------
68
//
69
70
// -----------------------------------------------------------------------------
71
//
72
73
int
ApvFactoryService::getEventInitNumber
() {
return
0; }
74
// -----------------------------------------------------------------------------
75
76
// -----------------------------------------------------------------------------
77
//
78
79
ApvAnalysisFactory
*
const
ApvFactoryService::getApvFactory
()
const
{
return
apvFactory_
; }
ApvFactoryService::apvFactory_
ApvAnalysisFactory * apvFactory_
Definition:
ApvFactoryService.h:59
ApvFactoryService::getEventInitNumber
int getEventInitNumber()
Definition:
ApvFactoryService.cc:73
ApvFactoryService::gotPed
bool gotPed
Definition:
ApvFactoryService.h:61
edm
HLT enums.
Definition:
AlignableModifier.h:19
gather_cfg.cout
cout
Definition:
gather_cfg.py:144
ApvFactoryService::getApvFactory
ApvAnalysisFactory *const getApvFactory() const
Definition:
ApvFactoryService.cc:79
ApvFactoryService::~ApvFactoryService
~ApvFactoryService()
Definition:
ApvFactoryService.cc:25
ApvAnalysisFactory
Definition:
ApvAnalysisFactory.h:22
edm::ActivityRegistry
Definition:
ActivityRegistry.h:132
SiStripPedestalsRcd.h
edm::ParameterSet
Definition:
ParameterSet.h:36
ApvFactoryService::postProcessEvent
void postProcessEvent(const edm::Event &ie, const edm::EventSetup &ies)
Definition:
ApvFactoryService.cc:29
edm::EventSetup
Definition:
EventSetup.h:57
std
Definition:
JetResolutionObject.h:76
ApvFactoryService.h
SiStripPedestals.h
edm::Event
Definition:
Event.h:73
muonDTDigis_cfi.pset
pset
Definition:
muonDTDigis_cfi.py:27
ApvFactoryService::ApvFactoryService
ApvFactoryService(const edm::ParameterSet &, edm::ActivityRegistry &)
Definition:
ApvFactoryService.cc:16
Generated for CMSSW Reference Manual by
1.8.16