CMS 3D CMS Logo

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

#include <DQM/SiStripMonitorHardware/plugins/BuildTrackerMap.cc>

Inheritance diagram for BuildTrackerMapPlugin:
edm::one::EDAnalyzer<> edm::one::EDAnalyzerBase edm::EDConsumerBase

Public Types

typedef dqm::legacy::DQMStore DQMStore
 
typedef dqm::legacy::MonitorElement MonitorElement
 
- Public Types inherited from edm::one::EDAnalyzerBase
typedef EDAnalyzerBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 

Public Member Functions

 BuildTrackerMapPlugin (const edm::ParameterSet &)
 
 ~BuildTrackerMapPlugin () override
 
- Public Member Functions inherited from edm::one::EDAnalyzer<>
 EDAnalyzer ()=default
 
 EDAnalyzer (const EDAnalyzer &)=delete
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
const EDAnalyzeroperator= (const EDAnalyzer &)=delete
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsInputProcessBlocks () const final
 
bool wantsProcessBlocks () const final
 
- Public Member Functions inherited from edm::one::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDAnalyzerBase () override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ESResolverIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESResolverIndex > const & esGetTokenIndicesVector (edm::Transition iTrans) const
 
std::vector< ESRecordIndex > const & esGetTokenRecordIndicesVector (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::array< std::vector< ModuleDescription const *> *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, ProductRegistry const &preg, std::map< std::string, ModuleDescription const *> const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
void selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProductResolverIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Member Functions

void analyze (const edm::Event &, const edm::EventSetup &) override
 
void beginJob () override
 
void endJob () override
 
void read (bool aMechView, std::string aFile, const TkDetMap *tkDetMap, std::vector< std::unique_ptr< TkHistoMap >> &aTkMapVec, std::vector< bool > &aValidVec)
 
void subtractMap (TkHistoMap *aResult, const TkHistoMap *aSubtr)
 

Private Attributes

bool doDiff_
 
edm::ESGetToken< SiStripFedCabling, SiStripFedCablingRcdfedCablingToken_
 
std::string fileName_
 
std::string fileNameDiff_
 
std::string folderName_
 
std::vector< bool > isValidMap_
 
std::vector< bool > isValidMapDiff_
 
std::vector< double > maxVal_
 
bool mechanicalView_
 
std::vector< double > minVal_
 
unsigned int printDebug_
 
edm::ParameterSet pset_
 
edm::ESGetToken< TkDetMap, TrackerTopologyRcdtkDetMapToken_
 
std::vector< std::string > tkHistoMapNameVec_
 
std::vector< std::unique_ptr< TkHistoMap > > tkHistoMapVec_
 
std::vector< std::unique_ptr< TkHistoMap > > tkHistoMapVecDiff_
 
std::vector< TrackerMap * > tkmap_
 
edm::ESGetToken< TrackerTopology, TrackerTopologyRcdtTopoToken_
 

Additional Inherited Members

- Static Public Member Functions inherited from edm::one::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< Bconsumes (edm::InputTag tag) noexcept
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes ()
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag)
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
void resetItemsToGetFrom (BranchType iType)
 

Detailed Description

Description: DQM source application to monitor common mode for SiStrip data

Definition at line 54 of file BuildTrackerMap.cc.

Member Typedef Documentation

◆ DQMStore

Definition at line 57 of file BuildTrackerMap.cc.

◆ MonitorElement

Definition at line 56 of file BuildTrackerMap.cc.

Constructor & Destructor Documentation

◆ BuildTrackerMapPlugin()

BuildTrackerMapPlugin::BuildTrackerMapPlugin ( const edm::ParameterSet iConfig)
explicit

Definition at line 109 of file BuildTrackerMap.cc.

110  : fileName_(iConfig.getUntrackedParameter<std::string>("InputFileName", "DQMStore.root")),
111  mechanicalView_(iConfig.getUntrackedParameter<bool>("MechanicalView", true)),
112  folderName_(iConfig.getUntrackedParameter<std::string>("HistogramFolderName", "DQMData/")),
113  printDebug_(iConfig.getUntrackedParameter<unsigned int>("PrintDebugMessages", 1)),
114  doDiff_(iConfig.getUntrackedParameter<bool>("DoDifference", false)),
115  fileNameDiff_(iConfig.getUntrackedParameter<std::string>("InputFileNameForDiff", "DQMStore.root")),
116  tkHistoMapNameVec_(iConfig.getUntrackedParameter<std::vector<std::string>>("TkHistoMapNameVec")),
117  minVal_(iConfig.getUntrackedParameter<std::vector<double>>("MinValueVec")),
118  maxVal_(iConfig.getUntrackedParameter<std::vector<double>>("MaxValueVec")),
119  pset_(iConfig.getParameter<edm::ParameterSet>("TkmapParameters")),
120  fedCablingToken_(esConsumes<>()),
121  tTopoToken_(esConsumes<>()),
122  tkDetMapToken_(esConsumes<>()) {
123  // for (unsigned int i(0); i<34; i++){
124  // if (i<4) histName_[i] << "TIB/layer_" << i+1 << "/" << tkDetMapName_ << "_TIB_L" << i+1;
125  // else if (i<7) histName_[i] << "TID/side_1/wheel_" << i-3 << "/" << tkDetMapName_ << "_TIDM_D" << i-3;
126  // else if (i<10) histName_[i] << "TID/side_2/wheel_" << i-6 << "/" << tkDetMapName_ << "_TIDP_D" << i-6;
127  // else if (i<16) histName_[i] << "TOB/layer_" << i-9 << "/" << tkDetMapName_ << "_TOB_L" << i-9;
128  // else if (i<25) histName_[i] << "TEC/side_1/wheel_" << i-15 << "/" << tkDetMapName_ << "_TECM_W" << i-15;
129  // else if (i<34) histName_[i] << "TEC/side_2/wheel_" << i-24 << "/" << tkDetMapName_ << "_TECP_W" << i-24;
130 
131  // std::cout << "histName[" << i << "] =" << histName_[i] << std::endl;
132 
133  // }
134 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
std::vector< std::string > tkHistoMapNameVec_
std::vector< double > minVal_
edm::ParameterSet pset_
edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > tTopoToken_
std::vector< double > maxVal_
T getUntrackedParameter(std::string const &, T const &) const
edm::ESGetToken< TkDetMap, TrackerTopologyRcd > tkDetMapToken_
edm::ESGetToken< SiStripFedCabling, SiStripFedCablingRcd > fedCablingToken_

◆ ~BuildTrackerMapPlugin()

BuildTrackerMapPlugin::~BuildTrackerMapPlugin ( )
inlineoverride

Definition at line 60 of file BuildTrackerMap.cc.

60 {}

Member Function Documentation

◆ analyze()

void BuildTrackerMapPlugin::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprivatevirtual

Implements edm::one::EDAnalyzerBase.

Definition at line 292 of file BuildTrackerMap.cc.

References gather_cfg::cout, doDiff_, fedCablingToken_, fileName_, fileNameDiff_, amptDefault_cfi::firstEvent, edm::EventSetup::getData(), mps_fire::i, isValidMap_, isValidMapDiff_, mechanicalView_, pset_, read(), tkDetMapToken_, tkHistoMapNameVec_, tkHistoMapVec_, tkHistoMapVecDiff_, tkmap_, and tTopoToken_.

292  {
293  static bool firstEvent = true;
294 
295  if (tkHistoMapVec_.empty() && (!tkHistoMapNameVec_.empty())) {
296  const auto tkDetMap = &iSetup.getData(tkDetMapToken_);
298  if (doDiff_)
300  }
301 
302  if (firstEvent) {
303  const auto fedcabling = &iSetup.getData(fedCablingToken_);
304  const auto tTopo = &iSetup.getData(tTopoToken_);
305  for (unsigned int i(0); i < tkHistoMapNameVec_.size(); i++) {
306  tkmap_.push_back(new TrackerMap(pset_, fedcabling, tTopo));
307  }
308  }
309 
310  firstEvent = false;
311 
312  std::cout << "End of analyze method: tkmap_ size = " << tkmap_.size() << std::endl;
313 
314 } //analyze method
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
Definition: EventSetup.h:119
std::vector< std::string > tkHistoMapNameVec_
edm::ParameterSet pset_
void read(bool aMechView, std::string aFile, const TkDetMap *tkDetMap, std::vector< std::unique_ptr< TkHistoMap >> &aTkMapVec, std::vector< bool > &aValidVec)
edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > tTopoToken_
std::vector< std::unique_ptr< TkHistoMap > > tkHistoMapVecDiff_
edm::ESGetToken< TkDetMap, TrackerTopologyRcd > tkDetMapToken_
edm::ESGetToken< SiStripFedCabling, SiStripFedCablingRcd > fedCablingToken_
std::vector< TrackerMap * > tkmap_
std::vector< std::unique_ptr< TkHistoMap > > tkHistoMapVec_
std::vector< bool > isValidMapDiff_
std::vector< bool > isValidMap_

◆ beginJob()

void BuildTrackerMapPlugin::beginJob ( void  )
overrideprivatevirtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 317 of file BuildTrackerMap.cc.

317 {}

◆ endJob()

void BuildTrackerMapPlugin::endJob ( void  )
overrideprivatevirtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 320 of file BuildTrackerMap.cc.

References cms::cuda::assert(), gather_cfg::cout, mps_fire::i, isValidMap_, maxVal_, minVal_, TrackerMap::save(), TrackerMap::save_as_fedtrackermap(), TrackerMap::setPalette(), TrackerMap::showPalette(), AlCaHLTBitMon_QueryRunRegistry::string, subtractMap(), tkHistoMapNameVec_, tkHistoMapVec_, tkHistoMapVecDiff_, and tkmap_.

320  {
321  //edm::ESHandle<SiStripFedCabling> pDD1;
322  //iSetup.get<SiStripFedCablingRcd>().get(pDD1);
323  std::cout << "Processing endjob with " << tkHistoMapNameVec_.size() << " elements." << std::endl;
324 
325  assert(minVal_.size() == tkHistoMapNameVec_.size());
326  assert(maxVal_.size() == tkHistoMapNameVec_.size());
327 
328  for (unsigned int i(0); i < tkHistoMapNameVec_.size(); i++) {
329  std::cout << "Processing element " << i << ": " << tkHistoMapNameVec_.at(i) << std::endl;
330  std::cout << "Min, max = " << minVal_.at(i) << " " << maxVal_.at(i) << std::endl;
331 
332  TrackerMap* lTkMap = tkmap_.at(i);
333 
334  if (!lTkMap) {
335  std::cout << "tkmap_ is NULL for element " << i << "... continuing ..." << std::endl;
336  continue;
337  }
338 
339  subtractMap(tkHistoMapVec_.at(i).get(), tkHistoMapVecDiff_.at(i).get());
340 
341  //(pset_,pDD1);
342  lTkMap->setPalette(1);
343  lTkMap->showPalette(true);
344  if (!tkHistoMapVec_.at(i) || !isValidMap_.at(i)) {
345  std::cout << "Warning, tkHistoMap is invalid for element " << i << "... continuing ..." << std::endl;
346  continue;
347  }
348  tkHistoMapVec_.at(i)->dumpInTkMap(lTkMap);
349 
350  //to print all figures to create fancy view
351  //lTkMap->printall(true,0,255,tkHistoMapNameVec_.at(i));
352  lTkMap->save(true, minVal_.at(i), maxVal_.at(i), tkHistoMapNameVec_.at(i) + std::string(".png"));
353  lTkMap->save_as_fedtrackermap(
354  true, minVal_.at(i), maxVal_.at(i), tkHistoMapNameVec_.at(i) + std::string("_FED.png"));
355  }
356 }
std::vector< std::string > tkHistoMapNameVec_
std::vector< double > minVal_
assert(be >=bs)
std::vector< double > maxVal_
std::vector< std::unique_ptr< TkHistoMap > > tkHistoMapVecDiff_
void showPalette(bool printflag1)
Definition: TrackerMap.h:156
void save_as_fedtrackermap(bool print_total=true, float minval=0., float maxval=0., std::string s="fed_svgmap.svg", int width=100+(90+100) *31+300, int height=150+(2940+150) *1+300)
Definition: TrackerMap.cc:2755
void setPalette(int numpalette)
Definition: TrackerMap.h:154
void save(bool print_total=true, float minval=0., float maxval=0., std::string s="svgmap.svg", int width=1500, int height=800)
Definition: TrackerMap.cc:844
void subtractMap(TkHistoMap *aResult, const TkHistoMap *aSubtr)
std::vector< TrackerMap * > tkmap_
std::vector< std::unique_ptr< TkHistoMap > > tkHistoMapVec_
std::vector< bool > isValidMap_

◆ read()

void BuildTrackerMapPlugin::read ( bool  aMechView,
std::string  aFile,
const TkDetMap tkDetMap,
std::vector< std::unique_ptr< TkHistoMap >> &  aTkMapVec,
std::vector< bool > &  aValidVec 
)
private

Definition at line 141 of file BuildTrackerMap.cc.

References gather_cfg::cout, TrackerOfflineValidation_Dqm_cff::dirName, beamvalidation::exit(), folderName_, mps_fire::i, TkHistoMap::loadTkHistoMap(), eostools::move(), dqm::implementation::DQMStore::open(), Utilities::operator, AlCaHLTBitMon_QueryRunRegistry::string, and tkHistoMapNameVec_.

Referenced by analyze(), and edmIntegrityCheck.PublishToFileSystem::get().

145  {
146  DQMStore* lDqmStore = edm::Service<DQMStore>().operator->();
147  lDqmStore->open(aFile);
148 
149  unsigned int nHists = tkHistoMapNameVec_.size();
150  aTkMapVec.reserve(nHists);
151  aValidVec.reserve(nHists);
152 
154  if (dirName.empty()) {
155  dirName += "Run ";
156  dirName += aFile.substr(aFile.find_last_of('_') + 5, 6);
157  dirName += "/SiStrip/Run summary";
158  std::cout << " -- DirName = " << dirName << std::endl;
159  }
160 
161  //lDqmStore->setCurrentFolder(dirName);
162 
163  unsigned int nFailTot = 0;
164  unsigned int nTotTot = 0;
165  for (unsigned int i(0); i < nHists; i++) {
166  std::unique_ptr<TkHistoMap> tkHistoMap{new TkHistoMap(tkDetMap)};
167 
168  tkHistoMap->loadTkHistoMap(dirName, tkHistoMapNameVec_.at(i), aMechView);
169 
170  std::vector<MonitorElement*>& lMaps = tkHistoMap->getAllMaps();
171 
172  std::cout << " -- map " << i << ", nHistos = " << lMaps.size() << std::endl;
173  unsigned int nFail = 0;
174  unsigned int nTot = 0;
175 
176  for (unsigned int im(0); im < lMaps.size(); im++) {
177  if (!lMaps[im]) {
178  std::cout << " -- Failed to get element " << im << " for map " << i << std::endl;
179  nFail++;
180  nFailTot++;
181  }
182  nTot++;
183  nTotTot++;
184  }
185 
186  if (nFail == nTot)
187  aValidVec[i] = false;
188  aTkMapVec.emplace_back(std::move(tkHistoMap));
189  }
190 
191  if (nFailTot < nTotTot)
192  std::cout << " - " << nTotTot - nFailTot << "/" << nTotTot << " histomaps read with success for file ." << aFile
193  << std::endl;
194  else {
195  std::cout << " - Failed to read any map for file " << aFile << ". Exiting line ... " << __LINE__ << std::endl;
196  exit(1);
197  }
198 
199  // //get list of detid for which |deltaRMS(APV0-APV1)|>1
200  // unsigned int lHistoNumber = 35;
201  // TkDetMap lTkDetMap;
202  // std::ofstream list,listRms0,listRms1;
203  // list.open("./cmBadModuleList.dat",std::ios::out);
204  // listRms0.open("./cmBadModuleList_rms0.dat",std::ios::out);
205  // listRms1.open("./cmBadModuleList_rms1.dat",std::ios::out);
206  // if (!list || !listRms0 || !listRms1) {
207  // std::cout << "Warning, can't open output file to write bad module list !" << std::endl;
208  // exit(1);
209  // }
210 
211  // TCanvas *lCan = new TCanvas("lCan","",1);
212  // TH1F *p_deltaMean = new TH1F("p_deltaMean",";CM_{mean}(APV0)-CM_{mean}(APV1)",500,-2,2);
213  // TH1F *p_deltaRMS = new TH1F("p_deltaRMS",";CM_{RMS}(APV0)-CM_{RMS}(APV1)",500,0,3);
214  // TH1F *p_MeanAPV0 = new TH1F("p_MeanAPV0",";CM_{mean}(APV0)",500,100,140);
215  // //TH1F *p_MeanAPV1 = new TH1F("p_MeanAPV1",";CM_{mean}(APV1)",500,100,140);
216  // TH1F *p_RMSAPV0 = new TH1F("p_RMSAPV0",";CM_{RMS}(APV0)",500,0,10);
217  // //TH1F *p_RMSAPV1 = new TH1F("p_RMSAPV1",";CM_{RMS}(APV1)",500,0,10);
218 
219  // gStyle->SetOptStat(1111111);
220 
221  // for(unsigned int layer=1;layer<lHistoNumber;++layer){
222  // std::vector<uint32_t> dets;
223  // lTkDetMap.getDetsForLayer(layer,dets);
224  // for(size_t i=0;i<dets.size();++i){
225  // if(dets[i]>0){
226  // //if(tkHistoMap[5]->getEntries(dets[i])>0 && tkHistoMap[5]->getValue(dets[i])) {
227  // if(nHists > 3){
228  // if (tkHistoMap[3]->getValue(dets[i]) > 1) {
229  // list << dets[i] << " " << tkHistoMap[3]->getValue(dets[i]) << std::endl;
230  // }
231  // p_deltaRMS->Fill(tkHistoMap[3]->getValue(dets[i]));
232  // }
233  // p_MeanAPV0->Fill(tkHistoMap[0]->getValue(dets[i]));
234  // //p_MeanAPV1->Fill(tkHistoMap[1]->getValue(dets[i]));
235  // p_RMSAPV0->Fill(tkHistoMap[1]->getValue(dets[i]));
236  // if (tkHistoMap[1]->getValue(dets[i]) > 2)
237  // listRms0 << dets[i] << " " << tkHistoMap[1]->getValue(dets[i]) << std::endl;
238  // //p_RMSAPV1->Fill(tkHistoMap[3]->getValue(dets[i]));
239  // //if (tkHistoMap[3]->getValue(dets[i]) > 2)
240  // //listRms1 << dets[i] << " " << tkHistoMap[3]->getValue(dets[i]) << std::endl;
241 
242  // if(nHists > 2) p_deltaMean->Fill(tkHistoMap[2]->getValue(dets[i]));
243  // }
244  // }
245  // }
246  // list.close();
247  // listRms0.close();
248  // listRms1.close();
249 
250  // lCan->cd();
251  // p_deltaRMS->Draw();
252  // //lCan->Print("./deltaRMStotal.png");
253  // lCan->Print("./deltaRMStotal.C");
254 
255  // p_deltaMean->Draw();
256  // lCan->Update();
257  // lCan->Print("./deltaMeantotal.C");
258 
259  // TPaveStats *statBox[2] = {0,0};
260  // statBox[0] = (TPaveStats*)p_MeanAPV0->FindObject("stats");
261  // //statBox[1] = (TPaveStats*)p_MeanAPV1->FindObject("stats");
262 
263  // p_MeanAPV0->Draw();
264  // //p_MeanAPV1->SetLineColor(2);
265  // //p_MeanAPV1->Draw("same");
266  // if (statBox[0]) statBox[0]->Draw("same");
267  // if (statBox[1]) {
268  // statBox[1]->SetLineColor(2);
269  // statBox[1]->SetTextColor(2);
270  // statBox[1]->Draw("same");
271  // }
272  // lCan->Update();
273  // lCan->Print("./meanAPVstotal.C");
274 
275  // statBox[0] = (TPaveStats*)p_RMSAPV0->FindObject("stats");
276  // //statBox[1] = (TPaveStats*)p_RMSAPV1->FindObject("stats");
277 
278  // p_RMSAPV0->Draw();
279  // //p_RMSAPV1->SetLineColor(2);
280  // //p_RMSAPV1->Draw("same");
281  // if (statBox[0]) statBox[0]->Draw("same");
282  // if (statBox[1]) {
283  // statBox[1]->SetLineColor(2);
284  // statBox[1]->SetTextColor(2);
285  // statBox[1]->Draw("same");
286  // }
287  // lCan->Update();
288  // lCan->Print("./rmsAPVstotal.C");
289 }
std::vector< std::string > tkHistoMapNameVec_
void loadTkHistoMap(const std::string &path, const std::string &MapName, bool mechanicalView=false)
Definition: TkHistoMap.cc:82
def move(src, dest)
Definition: eostools.py:511
def exit(msg="")

◆ subtractMap()

void BuildTrackerMapPlugin::subtractMap ( TkHistoMap aResult,
const TkHistoMap aSubtr 
)
private

Definition at line 358 of file BuildTrackerMap.cc.

References SiStripClientConfig_Tier0_cff::Add, cms::cuda::assert(), gather_cfg::cout, and TkHistoMap::getAllMaps().

Referenced by endJob().

358  {
359  std::vector<MonitorElement*>& lMaps = aResult->getAllMaps();
360  const std::vector<MonitorElement*>& lMapsDiff = aSubtr->getAllMaps();
361 
362  assert(lMaps.size() == lMapsDiff.size());
363 
364  for (unsigned int im(0); im < lMaps.size(); im++) {
365  if (!lMaps[im] || !lMapsDiff[im]) {
366  std::cout << " -- Failed to get element " << im << " for maps." << std::endl;
367  } else {
368  (lMaps[im]->getTProfile2D())->Add(lMapsDiff[im]->getTProfile2D(), -1);
369  }
370  }
371 }
const std::vector< MonitorElement * > & getAllMaps() const
Definition: TkHistoMap.h:45
assert(be >=bs)

Member Data Documentation

◆ doDiff_

bool BuildTrackerMapPlugin::doDiff_
private

Definition at line 83 of file BuildTrackerMap.cc.

Referenced by analyze().

◆ fedCablingToken_

edm::ESGetToken<SiStripFedCabling, SiStripFedCablingRcd> BuildTrackerMapPlugin::fedCablingToken_
private

Definition at line 100 of file BuildTrackerMap.cc.

Referenced by analyze().

◆ fileName_

std::string BuildTrackerMapPlugin::fileName_
private

Definition at line 75 of file BuildTrackerMap.cc.

Referenced by analyze().

◆ fileNameDiff_

std::string BuildTrackerMapPlugin::fileNameDiff_
private

Definition at line 84 of file BuildTrackerMap.cc.

Referenced by analyze().

◆ folderName_

std::string BuildTrackerMapPlugin::folderName_
private

Definition at line 79 of file BuildTrackerMap.cc.

Referenced by read().

◆ isValidMap_

std::vector<bool> BuildTrackerMapPlugin::isValidMap_
private

Definition at line 94 of file BuildTrackerMap.cc.

Referenced by analyze(), and endJob().

◆ isValidMapDiff_

std::vector<bool> BuildTrackerMapPlugin::isValidMapDiff_
private

Definition at line 95 of file BuildTrackerMap.cc.

Referenced by analyze().

◆ maxVal_

std::vector<double> BuildTrackerMapPlugin::maxVal_
private

Definition at line 92 of file BuildTrackerMap.cc.

Referenced by endJob().

◆ mechanicalView_

bool BuildTrackerMapPlugin::mechanicalView_
private

Definition at line 77 of file BuildTrackerMap.cc.

Referenced by analyze().

◆ minVal_

std::vector<double> BuildTrackerMapPlugin::minVal_
private

Definition at line 91 of file BuildTrackerMap.cc.

Referenced by endJob().

◆ printDebug_

unsigned int BuildTrackerMapPlugin::printDebug_
private

Definition at line 81 of file BuildTrackerMap.cc.

◆ pset_

edm::ParameterSet BuildTrackerMapPlugin::pset_
private

Definition at line 97 of file BuildTrackerMap.cc.

Referenced by analyze().

◆ tkDetMapToken_

edm::ESGetToken<TkDetMap, TrackerTopologyRcd> BuildTrackerMapPlugin::tkDetMapToken_
private

Definition at line 102 of file BuildTrackerMap.cc.

Referenced by analyze().

◆ tkHistoMapNameVec_

std::vector<std::string> BuildTrackerMapPlugin::tkHistoMapNameVec_
private

Definition at line 90 of file BuildTrackerMap.cc.

Referenced by analyze(), endJob(), and read().

◆ tkHistoMapVec_

std::vector<std::unique_ptr<TkHistoMap> > BuildTrackerMapPlugin::tkHistoMapVec_
private

Definition at line 86 of file BuildTrackerMap.cc.

Referenced by analyze(), and endJob().

◆ tkHistoMapVecDiff_

std::vector<std::unique_ptr<TkHistoMap> > BuildTrackerMapPlugin::tkHistoMapVecDiff_
private

Definition at line 87 of file BuildTrackerMap.cc.

Referenced by analyze(), and endJob().

◆ tkmap_

std::vector<TrackerMap*> BuildTrackerMapPlugin::tkmap_
private

Definition at line 98 of file BuildTrackerMap.cc.

Referenced by analyze(), and endJob().

◆ tTopoToken_

edm::ESGetToken<TrackerTopology, TrackerTopologyRcd> BuildTrackerMapPlugin::tTopoToken_
private

Definition at line 101 of file BuildTrackerMap.cc.

Referenced by analyze().