当前位置: 首页>>代码示例>>C++>>正文


C++ TDirectory::pwd方法代码示例

本文整理汇总了C++中TDirectory::pwd方法的典型用法代码示例。如果您正苦于以下问题:C++ TDirectory::pwd方法的具体用法?C++ TDirectory::pwd怎么用?C++ TDirectory::pwd使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TDirectory的用法示例。


在下文中一共展示了TDirectory::pwd方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: SinglePi

void SinglePi(const TString ref_vers, const TString val_vers, bool fastsim){

    //Warning!!! This rootlogon hacks the root color pallate
   setColors();

   TString ref_file = "pi50scan"+ref_vers+"_fullGeom_ECALHCAL_CaloTowers.root";
   TString val_file = "pi50scan"+val_vers+"_fullGeom_ECALHCAL_CaloTowers.root";
      
   TFile f1(ref_file);
   TFile f2(val_file);
   
   // service variables
   //
   //Profiles
   const int Nprof   = 12;

   TProfile* f1_prof[Nprof];
   TProfile* f2_prof[Nprof];

   char labelp[Nprof][64];

   //1D Histos
   const int Nhist1  = 7;

   TH1* f1_hist1[Nhist1];
   TH1* f2_hist1[Nhist1];

   char label1[Nhist1][64];

   //Labels
   //Profiles
   sprintf(labelp[0], "CaloTowersTask_emean_vs_ieta_E1.gif");
   sprintf(labelp[1], "CaloTowersTask_emean_vs_ieta_H1.gif");
   sprintf(labelp[2], "CaloTowersTask_emean_vs_ieta_EH1.gif");

   sprintf(labelp[3], "RecHitsTask_emean_vs_ieta_E.gif");
   sprintf(labelp[4], "RecHitsTask_emean_vs_ieta_H.gif");
   sprintf(labelp[5], "RecHitsTask_emean_vs_ieta_EH.gif");
   if (!fastsim) {
       sprintf(labelp[6], "SimHitsTask_emean_vs_ieta_E.gif");
       sprintf(labelp[7], "SimHitsTask_emean_vs_ieta_H.gif");
       sprintf(labelp[8], "SimHitsTask_emean_vs_ieta_EH.gif");
   }
   sprintf(labelp[9], "RecHitsTask_timing_vs_energy_profile_HB.gif");
   sprintf(labelp[10], "RecHitsTask_timing_vs_energy_profile_HE.gif");
   sprintf(labelp[11], "RecHitsTask_timing_vs_energy_profile_HF.gif");



   //1D Histos
   sprintf(label1[0], "N_calotowers_HB.gif");
   sprintf(label1[1], "N_calotowers_HE.gif");
   sprintf(label1[2], "N_calotowers_HF.gif");
   
   sprintf(label1[3], "RecHits_energy_HB.gif");
   sprintf(label1[4], "RecHits_energy_HE.gif");
   sprintf(label1[5], "RecHits_energy_HO.gif");
   sprintf(label1[6], "RecHits_energy_HF.gif");

   TDirectory *td = fileDirectory(&f1, "CaloTowersTask");
   //f1.cd("DQMData/CaloTowersV/CaloTowersTask");
   //gDirectory->pwd();
   td->pwd();
   f1_prof[0] = (TProfile*)td->Get("emean_vs_ieta_E1");
   f1_prof[1] = (TProfile*)td->Get("emean_vs_ieta_H1");
   f1_prof[2] = (TProfile*)td->Get("emean_vs_ieta_EH1");

   f1_hist1[0] = (TH1*)td->Get("CaloTowersTask_number_of_fired_towers_HB");
   f1_hist1[1] = (TH1*)td->Get("CaloTowersTask_number_of_fired_towers_HE");
   f1_hist1[2] = (TH1*)td->Get("CaloTowersTask_number_of_fired_towers_HF");

   td = fileDirectory(&f1, "HcalRecHitTask");
   //f1.cd("DQMData/HcalRecHitsV/HcalRecHitTask");
   f1_prof[3] = (TProfile*)td->Get("HcalRecHitTask_En_rechits_cone_profile_vs_ieta_all_depths_E");
   f1_prof[4] = (TProfile*)td->Get("HcalRecHitTask_En_rechits_cone_profile_vs_ieta_all_depths");
   f1_prof[5] = (TProfile*)td->Get("HcalRecHitTask_En_rechits_cone_profile_vs_ieta_all_depths_EH");

   f1_prof[9] = (TProfile*)td->Get("HcalRecHitTask_timing_vs_energy_profile_HB");
   f1_prof[10] = (TProfile*)td->Get("HcalRecHitTask_timing_vs_energy_profile_Low_HE");
   f1_prof[11] = (TProfile*)td->Get("HcalRecHitTask_timing_vs_energy_profile_Low_HF");

   f1_hist1[3] = (TH1*)td->Get("HcalRecHitTask_energy_of_rechits_HB");
   f1_hist1[4] = (TH1*)td->Get("HcalRecHitTask_energy_of_rechits_HE");
   f1_hist1[5] = (TH1*)td->Get("HcalRecHitTask_energy_of_rechits_HO");
   f1_hist1[6] = (TH1*)td->Get("HcalRecHitTask_energy_of_rechits_HF");   

   if (!fastsim) {
       td = fileDirectory(&f1, "HcalSimHitTask");
       //f1.cd("DQMData/HcalSimHitsV/HcalSimHitTask");
       f1_prof[6] = (TProfile*)td->Get("HcalSimHitTask_En_simhits_cone_profile_vs_ieta_all_depths_E");
       f1_prof[7] = (TProfile*)td->Get("HcalSimHitTask_En_simhits_cone_profile_vs_ieta_all_depths");
       f1_prof[8] = (TProfile*)td->Get("HcalSimHitTask_En_simhits_cone_profile_vs_ieta_all_depths_EH");
   }

   td = fileDirectory(&f2, "CaloTowersTask");
   //f2.cd("DQMData/CaloTowersV/CaloTowersTask");
   //gDirectory->pwd();
   td->pwd();
   f2_prof[0] = (TProfile*)td->Get("emean_vs_ieta_E1");
   f2_prof[1] = (TProfile*)td->Get("emean_vs_ieta_H1");
//.........这里部分代码省略.........
开发者ID:Andrej-CMS,项目名称:cmssw,代码行数:101,代码来源:SinglePi.C


注:本文中的TDirectory::pwd方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。