CMS 3D CMS Logo

AlignmentProducerAsAnalyzer.cc
Go to the documentation of this file.
1 
9 /*** Header file ***/
11 
14 
15 //------------------------------------------------------------------------------
17  : AlignmentProducerBase{config}, token_(produces<AlignmentToken, edm::Transition::EndProcessBlock>()) {
18  usesResource(TFileService::kSharedResource);
19 
20  tjTkAssociationMapToken_ = consumes<TrajTrackAssociationCollection>(tjTkAssociationMapTag_);
21  beamSpotToken_ = consumes<reco::BeamSpot>(beamSpotTag_);
22  tkLasBeamToken_ = consumes<TkFittedLasBeamCollection>(tkLasBeamTag_);
23  tsosVectorToken_ = consumes<TsosVectorCollection>(tkLasBeamTag_);
24  clusterValueMapToken_ = consumes<AliClusterValueMap>(clusterValueMapTag_);
25 }
26 
27 //------------------------------------------------------------------------------
29 
30 //------------------------------------------------------------------------------
32 
33 //------------------------------------------------------------------------------
36 }
37 
38 //------------------------------------------------------------------------------
40 
41 //------------------------------------------------------------------------------
43  const edm::EventSetup& setup) {
44  beginLuminosityBlockImpl(lumiBlock, setup);
45 }
46 
47 //------------------------------------------------------------------------------
49  const edm::EventSetup& setup) {
50  endLuminosityBlockImpl(lumiBlock, setup);
51 }
52 
54  const AlignmentToken valueToPut{};
55  processBlock.emplace(token_, valueToPut);
56 
58  if (!finish()) {
59  edm::LogError("Alignment") << "@SUB=AlignmentProducerAsAnalyzer::endJob"
60  << "Did not process any events, do not dare to store to DB.";
61  }
62 
63  // message is used by the MillePede log parser to check the end of the job
64  edm::LogInfo("Alignment") << "@SUB=AlignmentProducerAsAnalyzer::endJob"
65  << "Finished alignment producer job.";
66 }
67 
68 //------------------------------------------------------------------------------
71 }
72 
AlignmentProducerBase::beginLuminosityBlockImpl
void beginLuminosityBlockImpl(const edm::LuminosityBlock &, const edm::EventSetup &)
begin lumi block
Definition: AlignmentProducerBase.cc:247
AlignmentProducerBase::endRunImpl
void endRunImpl(const edm::Run &, const edm::EventSetup &)
end run
Definition: AlignmentProducerBase.cc:231
AlignmentProducerBase::endLuminosityBlockImpl
void endLuminosityBlockImpl(const edm::LuminosityBlock &, const edm::EventSetup &)
end lumi block
Definition: AlignmentProducerBase.cc:253
edm::LuminosityBlock
Definition: LuminosityBlock.h:50
edm::Run
Definition: Run.h:45
AlignmentProducerAsAnalyzer::beginRun
void beginRun(const edm::Run &, const edm::EventSetup &) override
Definition: AlignmentProducerAsAnalyzer.cc:34
AlignmentProducerAsAnalyzer.h
AlignmentProducer useable for Prompt Calibration Loop (PCL)
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
AlignmentProducerAsAnalyzer::endProcessBlockProduce
void endProcessBlockProduce(edm::ProcessBlock &processBlock) override
Definition: AlignmentProducerAsAnalyzer.cc:53
singleTopDQM_cfi.setup
setup
Definition: singleTopDQM_cfi.py:37
config
Definition: config.py:1
MakerMacros.h
AlignmentProducerAsAnalyzer::token_
edm::EDPutTokenT< AlignmentToken > token_
Definition: AlignmentProducerAsAnalyzer.h:58
AlignmentProducerAsAnalyzer::beginJob
void beginJob() override
Definition: AlignmentProducerAsAnalyzer.cc:28
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
edm::ProcessBlock::emplace
void emplace(EDPutTokenT< PROD > token, Args &&... args)
Definition: ProcessBlock.h:169
AlignmentProducerAsAnalyzer
Definition: AlignmentProducerAsAnalyzer.h:28
AlignmentProducerAsAnalyzer::endLuminosityBlock
void endLuminosityBlock(const edm::LuminosityBlock &, const edm::EventSetup &) override
Definition: AlignmentProducerAsAnalyzer.cc:48
AlignmentProducerBase
Definition: AlignmentProducerBase.h:70
AlignmentProducerAsAnalyzer::beginLuminosityBlock
void beginLuminosityBlock(const edm::LuminosityBlock &, const edm::EventSetup &) override
Definition: AlignmentProducerAsAnalyzer.cc:42
AlignmentProducerBase::finish
bool finish()
Definition: AlignmentProducerBase.cc:751
TFileService.h
AlignmentProducerBase::processEvent
bool processEvent(const edm::Event &, const edm::EventSetup &)
Process event.
Definition: AlignmentProducerBase.cc:133
edm::ParameterSet
Definition: ParameterSet.h:47
AlignmentProducerBase::terminateProcessing
void terminateProcessing(const edm::EventSetup *=nullptr)
Terminate processing of events.
Definition: AlignmentProducerBase.cc:111
edm::EventSetup
Definition: EventSetup.h:58
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
AlignmentToken
Definition: AlignmentToken.h:18
AlignmentProducerAsAnalyzer::endRun
void endRun(const edm::Run &, const edm::EventSetup &) override
Definition: AlignmentProducerAsAnalyzer.cc:39
writedatasetfile.run
run
Definition: writedatasetfile.py:27
TFileService::kSharedResource
static const std::string kSharedResource
Definition: TFileService.h:76
AlignmentProducerAsAnalyzer::endJob
void endJob() override
Definition: AlignmentProducerAsAnalyzer.cc:31
AlignmentProducerAsAnalyzer::AlignmentProducerAsAnalyzer
AlignmentProducerAsAnalyzer(const edm::ParameterSet &)
Constructor.
Definition: AlignmentProducerAsAnalyzer.cc:16
event
Definition: event.py:1
edm::Event
Definition: Event.h:73
AlignmentProducerBase::beginRunImpl
void beginRunImpl(const edm::Run &, const edm::EventSetup &)
begin run
Definition: AlignmentProducerBase.cc:204
edm::ProcessBlock
Definition: ProcessBlock.h:36
AlignmentProducerAsAnalyzer::accumulate
void accumulate(const edm::Event &, const edm::EventSetup &) override
Definition: AlignmentProducerAsAnalyzer.cc:69