CMS 3D CMS Logo

AlignmentProducerAsAnalyzer.cc
Go to the documentation of this file.
1 
9 /*** Header file ***/
11 
14 
15 //------------------------------------------------------------------------------
17  : AlignmentProducerBase(config, consumesCollector()),
18  token_(produces<AlignmentToken, edm::Transition::EndProcessBlock>()) {
19  usesResource(TFileService::kSharedResource);
20 
21  tjTkAssociationMapToken_ = consumes<TrajTrackAssociationCollection>(tjTkAssociationMapTag_);
22  beamSpotToken_ = consumes<reco::BeamSpot>(beamSpotTag_);
23  tkLasBeamToken_ = consumes<TkFittedLasBeamCollection>(tkLasBeamTag_);
24  tsosVectorToken_ = consumes<TsosVectorCollection>(tkLasBeamTag_);
25  clusterValueMapToken_ = consumes<AliClusterValueMap>(clusterValueMapTag_);
26 }
27 
28 //------------------------------------------------------------------------------
30 
31 //------------------------------------------------------------------------------
33 
34 //------------------------------------------------------------------------------
37 }
38 
39 //------------------------------------------------------------------------------
41 
42 //------------------------------------------------------------------------------
44  const edm::EventSetup& setup) {
45  beginLuminosityBlockImpl(lumiBlock, setup);
46 }
47 
48 //------------------------------------------------------------------------------
50  const edm::EventSetup& setup) {
51  endLuminosityBlockImpl(lumiBlock, setup);
52 }
53 
55  const AlignmentToken valueToPut{};
56  processBlock.emplace(token_, valueToPut);
57 
59  if (!finish()) {
60  edm::LogError("Alignment") << "@SUB=AlignmentProducerAsAnalyzer::endJob"
61  << "Did not process any events, do not dare to store to DB.";
62  }
63 
64  // message is used by the MillePede log parser to check the end of the job
65  edm::LogInfo("Alignment") << "@SUB=AlignmentProducerAsAnalyzer::endJob"
66  << "Finished alignment producer job.";
67 }
68 
69 //------------------------------------------------------------------------------
72 }
73 
AlignmentProducerBase::beginLuminosityBlockImpl
void beginLuminosityBlockImpl(const edm::LuminosityBlock &, const edm::EventSetup &)
begin lumi block
Definition: AlignmentProducerBase.cc:267
AlignmentProducerBase::endRunImpl
void endRunImpl(const edm::Run &, const edm::EventSetup &)
end run
Definition: AlignmentProducerBase.cc:251
AlignmentProducerBase::endLuminosityBlockImpl
void endLuminosityBlockImpl(const edm::LuminosityBlock &, const edm::EventSetup &)
end lumi block
Definition: AlignmentProducerBase.cc:273
edm::LuminosityBlock
Definition: LuminosityBlock.h:50
edm::Run
Definition: Run.h:45
AlignmentProducerAsAnalyzer::tjTkAssociationMapToken_
edm::EDGetTokenT< TrajTrackAssociationCollection > tjTkAssociationMapToken_
Definition: AlignmentProducerAsAnalyzer.h:65
edm
HLT enums.
Definition: AlignableModifier.h:19
AlignmentProducerAsAnalyzer::beginRun
void beginRun(const edm::Run &, const edm::EventSetup &) override
Definition: AlignmentProducerAsAnalyzer.cc:35
AlignmentProducerAsAnalyzer::tkLasBeamToken_
edm::EDGetTokenT< TkFittedLasBeamCollection > tkLasBeamToken_
Definition: AlignmentProducerAsAnalyzer.h:67
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:54
AlignmentProducerAsAnalyzer::tsosVectorToken_
edm::EDGetTokenT< TsosVectorCollection > tsosVectorToken_
Definition: AlignmentProducerAsAnalyzer.h:68
singleTopDQM_cfi.setup
setup
Definition: singleTopDQM_cfi.py:37
AlignmentProducerBase::beamSpotTag_
const edm::InputTag beamSpotTag_
BeamSpot.
Definition: AlignmentProducerBase.h:130
config
Definition: config.py:1
MakerMacros.h
AlignmentProducerAsAnalyzer::token_
edm::EDPutTokenT< AlignmentToken > token_
Definition: AlignmentProducerAsAnalyzer.h:58
AlignmentProducerBase::tjTkAssociationMapTag_
const edm::InputTag tjTkAssociationMapTag_
Map with tracks/trajectories.
Definition: AlignmentProducerBase.h:127
AlignmentProducerAsAnalyzer::beginJob
void beginJob() override
Definition: AlignmentProducerAsAnalyzer.cc:29
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:171
AlignmentProducerAsAnalyzer
Definition: AlignmentProducerAsAnalyzer.h:28
AlignmentProducerAsAnalyzer::beamSpotToken_
edm::EDGetTokenT< reco::BeamSpot > beamSpotToken_
Definition: AlignmentProducerAsAnalyzer.h:66
AlignmentProducerAsAnalyzer::endLuminosityBlock
void endLuminosityBlock(const edm::LuminosityBlock &, const edm::EventSetup &) override
Definition: AlignmentProducerAsAnalyzer.cc:49
AlignmentProducerBase
Definition: AlignmentProducerBase.h:75
AlignmentProducerAsAnalyzer::beginLuminosityBlock
void beginLuminosityBlock(const edm::LuminosityBlock &, const edm::EventSetup &) override
Definition: AlignmentProducerAsAnalyzer.cc:43
AlignmentProducerBase::finish
bool finish()
Definition: AlignmentProducerBase.cc:772
TFileService.h
AlignmentProducerBase::processEvent
bool processEvent(const edm::Event &, const edm::EventSetup &)
Process event.
Definition: AlignmentProducerBase.cc:153
edm::ParameterSet
Definition: ParameterSet.h:47
edm::Transition
Transition
Definition: Transition.h:12
AlignmentProducerBase::terminateProcessing
void terminateProcessing(const edm::EventSetup *=nullptr)
Terminate processing of events.
Definition: AlignmentProducerBase.cc:131
edm::EventSetup
Definition: EventSetup.h:58
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
AlignmentProducerBase::tkLasBeamTag_
const edm::InputTag tkLasBeamTag_
LAS beams in edm::Run (ignore if empty)
Definition: AlignmentProducerBase.h:133
AlignmentToken
Definition: AlignmentToken.h:18
AlignmentProducerAsAnalyzer::endRun
void endRun(const edm::Run &, const edm::EventSetup &) override
Definition: AlignmentProducerAsAnalyzer.cc:40
writedatasetfile.run
run
Definition: writedatasetfile.py:27
TFileService::kSharedResource
static const std::string kSharedResource
Definition: TFileService.h:76
AlignmentProducerBase::clusterValueMapTag_
const edm::InputTag clusterValueMapTag_
ValueMap containing associtaion cluster-flag.
Definition: AlignmentProducerBase.h:136
AlignmentProducerAsAnalyzer::clusterValueMapToken_
edm::EDGetTokenT< AliClusterValueMap > clusterValueMapToken_
Definition: AlignmentProducerAsAnalyzer.h:69
AlignmentProducerAsAnalyzer::endJob
void endJob() override
Definition: AlignmentProducerAsAnalyzer.cc:32
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:224
edm::ProcessBlock
Definition: ProcessBlock.h:36
AlignmentProducerAsAnalyzer::accumulate
void accumulate(const edm::Event &, const edm::EventSetup &) override
Definition: AlignmentProducerAsAnalyzer.cc:70