#include <RecoLuminosity/ROOTSchema/interface/ROOTFileReader.h>
Public Member Functions | |
int | GetEntry (int entry) |
int | GetHFRingSet (HCAL_HLX::LUMI_HF_RING_SET &ringSet) |
int | GetHLT (HCAL_HLX::HLT &hlt) |
int | GetL1Trigger (HCAL_HLX::LEVEL1_TRIGGER &l1trigger) |
int | GetLumiSection (HCAL_HLX::LUMI_SECTION §ion) |
int | GetNumEntries () |
unsigned int | GetRunNumber () |
unsigned int | GetSectionNumber () |
int | GetThreshold (HCAL_HLX::LUMI_THRESHOLD &threshold) |
int | GetTriggerDeadtime (HCAL_HLX::TRIGGER_DEADTIME &TD) |
int | ReplaceFile (const std::string &fileName) |
ROOTFileReader () | |
~ROOTFileReader () | |
Private Attributes | |
TBranch * | b_Detail |
TBranch * | b_ETSum [HCAL_HLX_MAX_HLXS] |
TBranch * | b_Header |
TBranch * | b_HLT |
TBranch * | b_L1Trigger |
TBranch * | b_LHC [HCAL_HLX_MAX_HLXS] |
TBranch * | b_Occupancy [HCAL_HLX_MAX_HLXS] |
TBranch * | b_RingSet |
TBranch * | b_Summary |
TBranch * | b_Threshold |
TBranch * | b_TriggerDeadtime |
HCAL_HLX::LUMI_DETAIL * | Detail_ |
HCAL_HLX::ET_SUM_SECTION * | EtSumPtr [HCAL_HLX_MAX_HLXS] |
HCAL_HLX::LUMI_SECTION_HEADER * | Header_ |
HCAL_HLX::HLT * | HLT_ |
HCAL_HLX::LEVEL1_TRIGGER * | L1Trigger_ |
HCAL_HLX::LHC_SECTION * | LHCPtr [HCAL_HLX_MAX_HLXS] |
HCAL_HLX::LUMI_SECTION * | lumiSection_ |
TChain * | mChain_ |
std::string | mFileName_ |
HCAL_HLX::OCCUPANCY_SECTION * | OccupancyPtr [HCAL_HLX_MAX_HLXS] |
HCAL_HLX::LUMI_HF_RING_SET * | RingSet_ |
unsigned int | runNumber_ |
unsigned int | sectionNumber_ |
HCAL_HLX::LUMI_SUMMARY * | Summary_ |
HCAL_HLX::LUMI_THRESHOLD * | Threshold_ |
HCAL_HLX::TRIGGER_DEADTIME * | TriggerDeadtime_ |
Definition at line 19 of file ROOTFileReader.h.
HCAL_HLX::ROOTFileReader::ROOTFileReader | ( | ) |
Definition at line 8 of file ROOTFileReader.cc.
References GenMuonPlsPt100GeV_cfg::cout, lat::endl(), HLT_, L1Trigger_, lumiSection_, mChain_, mFileName_, RingSet_, Threshold_, and TriggerDeadtime_.
00008 { 00009 #ifdef DEBUG 00010 std::cout << "Begin " << __PRETTY_FUNCTION__ << std::endl; 00011 #endif 00012 00013 mFileName_ = ""; 00014 00015 mChain_ = new TChain("LumiTree"); 00016 00017 lumiSection_ = new HCAL_HLX::LUMI_SECTION; 00018 Threshold_ = new HCAL_HLX::LUMI_THRESHOLD; 00019 L1Trigger_ = new HCAL_HLX::LEVEL1_TRIGGER; 00020 HLT_ = new HCAL_HLX::HLT; 00021 TriggerDeadtime_ = new HCAL_HLX::TRIGGER_DEADTIME; 00022 RingSet_ = new HCAL_HLX::LUMI_HF_RING_SET; 00023 00024 00025 #ifdef DEBUG 00026 std::cout << "End " << __PRETTY_FUNCTION__ << std::endl; 00027 #endif 00028 }
HCAL_HLX::ROOTFileReader::~ROOTFileReader | ( | ) |
Definition at line 30 of file ROOTFileReader.cc.
References GenMuonPlsPt100GeV_cfg::cout, lat::endl(), HLT_, L1Trigger_, lumiSection_, mChain_, RingSet_, Threshold_, and TriggerDeadtime_.
00030 { 00031 #ifdef DEBUG 00032 std::cout << "Begin " << __PRETTY_FUNCTION__ << std::endl; 00033 #endif 00034 00035 delete mChain_; 00036 00037 delete Threshold_; 00038 delete L1Trigger_; 00039 delete HLT_; 00040 delete TriggerDeadtime_; 00041 delete RingSet_; 00042 00043 delete lumiSection_; 00044 00045 #ifdef DEBUG 00046 std::cout << "End " << __PRETTY_FUNCTION__ << std::endl; 00047 #endif 00048 }
Definition at line 115 of file ROOTFileReader.cc.
References mChain_.
Referenced by HCAL_HLX::ROOTFileMerger::Merge().
int HCAL_HLX::ROOTFileReader::GetHFRingSet | ( | HCAL_HLX::LUMI_HF_RING_SET & | ringSet | ) |
Definition at line 138 of file ROOTFileReader.cc.
References RingSet_.
00138 { 00139 00140 memcpy(&localRingSet, RingSet_, sizeof(localRingSet)); 00141 return 0; 00142 }
int HCAL_HLX::ROOTFileReader::GetHLT | ( | HCAL_HLX::HLT & | hlt | ) |
Definition at line 151 of file ROOTFileReader.cc.
References HLT_.
00151 { 00152 00153 memcpy(&localHLT, HLT_, sizeof(localHLT)); 00154 return 0; 00155 }
int HCAL_HLX::ROOTFileReader::GetL1Trigger | ( | HCAL_HLX::LEVEL1_TRIGGER & | l1trigger | ) |
Definition at line 145 of file ROOTFileReader.cc.
References L1Trigger_.
00145 { 00146 00147 memcpy(&localL1Trigger, L1Trigger_, sizeof(localL1Trigger)); 00148 return 0; 00149 }
int HCAL_HLX::ROOTFileReader::GetLumiSection | ( | HCAL_HLX::LUMI_SECTION & | section | ) |
Definition at line 125 of file ROOTFileReader.cc.
References lumiSection_.
Referenced by HCAL_HLX::HTMLGenerator::GenerateHLXPlots(), and HCAL_HLX::ROOTFileMerger::Merge().
00125 { 00126 00127 memcpy(&localSection, lumiSection_, sizeof(HCAL_HLX::LUMI_SECTION)); 00128 00129 return 0; 00130 }
int HCAL_HLX::ROOTFileReader::GetNumEntries | ( | ) |
Definition at line 120 of file ROOTFileReader.cc.
References mChain_.
Referenced by HCAL_HLX::ROOTFileMerger::Merge().
00120 { 00121 00122 return mChain_->GetEntries(); 00123 }
unsigned int HCAL_HLX::ROOTFileReader::GetRunNumber | ( | ) | [inline] |
Definition at line 26 of file ROOTFileReader.h.
References runNumber_.
Referenced by HCAL_HLX::HTMLGenerator::GenerateHistoGroupPage(), HCAL_HLX::HTMLGenerator::GenerateHLXPage(), HCAL_HLX::HTMLGenerator::GenerateIndexPage(), HCAL_HLX::HTMLGenerator::GenerateRunPage(), HCAL_HLX::HTMLGenerator::GenerateSectionPage(), and HCAL_HLX::HTMLGenerator::GetRunDir().
00026 { return runNumber_;}
unsigned int HCAL_HLX::ROOTFileReader::GetSectionNumber | ( | ) | [inline] |
Definition at line 27 of file ROOTFileReader.h.
References sectionNumber_.
Referenced by HCAL_HLX::HTMLGenerator::GenerateHistoGroupPage(), HCAL_HLX::HTMLGenerator::GenerateHLXPage(), HCAL_HLX::HTMLGenerator::GenerateRunPage(), HCAL_HLX::HTMLGenerator::GenerateSectionPage(), and HCAL_HLX::HTMLGenerator::GetLSDir().
00027 { return sectionNumber_;}
int HCAL_HLX::ROOTFileReader::GetThreshold | ( | HCAL_HLX::LUMI_THRESHOLD & | threshold | ) |
Definition at line 132 of file ROOTFileReader.cc.
References Threshold_.
00132 { 00133 00134 memcpy(&localThreshold, Threshold_, sizeof(localThreshold)); 00135 return 0; 00136 }
int HCAL_HLX::ROOTFileReader::GetTriggerDeadtime | ( | HCAL_HLX::TRIGGER_DEADTIME & | TD | ) |
Definition at line 157 of file ROOTFileReader.cc.
References TriggerDeadtime_.
00157 { 00158 00159 memcpy(&localTD, TriggerDeadtime_, sizeof(localTD)); 00160 return 0; 00161 }
int HCAL_HLX::ROOTFileReader::ReplaceFile | ( | const std::string & | fileName | ) |
Definition at line 50 of file ROOTFileReader.cc.
References b_Detail, b_ETSum, b_Header, b_HLT, b_L1Trigger, b_LHC, b_Occupancy, b_RingSet, b_Summary, b_Threshold, b_TriggerDeadtime, GenMuonPlsPt100GeV_cfg::cout, Detail_, lat::endl(), EtSumPtr, Header_, HLT_, L1Trigger_, LHCPtr, lumiSection_, mChain_, OccupancyPtr, RingSet_, runNumber_, sectionNumber_, Summary_, Threshold_, and TriggerDeadtime_.
Referenced by HCAL_HLX::ROOTFileMerger::Merge().
00050 { 00051 // replacing a file changes the run number and section number automatically. 00052 00053 #ifdef DEBUG 00054 std::cout << "Begin " << __PRETTY_FUNCTION__ << std::endl; 00055 #endif 00056 00057 std::stringstream branchName; 00058 00059 delete mChain_; 00060 00061 mChain_ = new TChain("LumiTree"); 00062 00063 mChain_->Add(fileName.c_str()); 00064 00065 00066 // HCAL_HLX::LUMI_SECTION 00067 00068 Header_ = &(lumiSection_->hdr); 00069 Summary_ = &(lumiSection_->lumiSummary); 00070 Detail_ = &(lumiSection_->lumiDetail); 00071 00072 mChain_->SetBranchAddress("Header.", &Header_, &b_Header); 00073 mChain_->SetBranchAddress("Summary.", &Summary_, &b_Summary); 00074 mChain_->SetBranchAddress("Detail.", &Detail_, &b_Detail); 00075 00076 for(int HLXnum = 0; HLXnum < HCAL_HLX_MAX_HLXS; HLXnum++){ 00077 EtSumPtr[HLXnum] = &(lumiSection_->etSum[HLXnum]); 00078 branchName.str(std::string()); 00079 branchName << "ETSum" << std::setw(2) << std::setfill('0') << HLXnum << "."; 00080 mChain_->SetBranchAddress(branchName.str().c_str(), &EtSumPtr[HLXnum], &b_ETSum[HLXnum]); 00081 00082 OccupancyPtr[HLXnum] = &(lumiSection_->occupancy[HLXnum]); 00083 branchName.str(std::string()); 00084 branchName << "Occupancy" << std::setw(2) << std::setfill('0') << HLXnum << "."; 00085 mChain_->SetBranchAddress(branchName.str().c_str(), &OccupancyPtr[HLXnum], &b_Occupancy[HLXnum]); 00086 00087 LHCPtr[HLXnum] = &(lumiSection_->lhc[HLXnum]); 00088 branchName.str(std::string()); 00089 branchName << "LHC" << std::setw(2) << std::setfill('0') << HLXnum << "."; 00090 mChain_->SetBranchAddress(branchName.str().c_str(), &LHCPtr[HLXnum], &b_LHC[HLXnum]); 00091 } 00092 00093 // OTHER 00094 mChain_->SetBranchAddress("Threshold.", &Threshold_, &b_Threshold); 00095 mChain_->SetBranchAddress("Level1_Trigger.", &L1Trigger_, &b_L1Trigger); 00096 mChain_->SetBranchAddress("HLT.", &HLT_, &b_HLT); 00097 mChain_->SetBranchAddress("Trigger_Deadtime.", &TriggerDeadtime_, &b_TriggerDeadtime); 00098 mChain_->SetBranchAddress("HF_Ring_Set.", &RingSet_, &b_RingSet); 00099 00100 // Get run and section number. 00101 mChain_->GetEntry(0); 00102 00103 runNumber_ = lumiSection_->hdr.runNumber; 00104 sectionNumber_ = lumiSection_->hdr.sectionNumber; 00105 00106 #ifdef DEBUG 00107 std::cout << "***** Run Number: " << runNumber_ << " *****" << std::endl; 00108 std::cout << "***** Section Number: " << sectionNumber_ << " *****" << std::endl; 00109 std::cout << "End " << __PRETTY_FUNCTION__ << std::endl; 00110 #endif 00111 00112 return 0; 00113 }
TBranch* HCAL_HLX::ROOTFileReader::b_Detail [private] |
TBranch* HCAL_HLX::ROOTFileReader::b_ETSum[HCAL_HLX_MAX_HLXS] [private] |
TBranch* HCAL_HLX::ROOTFileReader::b_Header [private] |
TBranch* HCAL_HLX::ROOTFileReader::b_HLT [private] |
TBranch* HCAL_HLX::ROOTFileReader::b_L1Trigger [private] |
TBranch* HCAL_HLX::ROOTFileReader::b_LHC[HCAL_HLX_MAX_HLXS] [private] |
TBranch* HCAL_HLX::ROOTFileReader::b_Occupancy[HCAL_HLX_MAX_HLXS] [private] |
TBranch* HCAL_HLX::ROOTFileReader::b_RingSet [private] |
TBranch* HCAL_HLX::ROOTFileReader::b_Summary [private] |
TBranch* HCAL_HLX::ROOTFileReader::b_Threshold [private] |
TBranch* HCAL_HLX::ROOTFileReader::b_TriggerDeadtime [private] |
HCAL_HLX::LUMI_DETAIL* HCAL_HLX::ROOTFileReader::Detail_ [private] |
HCAL_HLX::ET_SUM_SECTION* HCAL_HLX::ROOTFileReader::EtSumPtr[HCAL_HLX_MAX_HLXS] [private] |
HCAL_HLX::LUMI_SECTION_HEADER* HCAL_HLX::ROOTFileReader::Header_ [private] |
HCAL_HLX::HLT* HCAL_HLX::ROOTFileReader::HLT_ [private] |
Definition at line 78 of file ROOTFileReader.h.
Referenced by GetHLT(), ReplaceFile(), ROOTFileReader(), and ~ROOTFileReader().
HCAL_HLX::LEVEL1_TRIGGER* HCAL_HLX::ROOTFileReader::L1Trigger_ [private] |
Definition at line 77 of file ROOTFileReader.h.
Referenced by GetL1Trigger(), ReplaceFile(), ROOTFileReader(), and ~ROOTFileReader().
HCAL_HLX::LHC_SECTION* HCAL_HLX::ROOTFileReader::LHCPtr[HCAL_HLX_MAX_HLXS] [private] |
HCAL_HLX::LUMI_SECTION* HCAL_HLX::ROOTFileReader::lumiSection_ [private] |
Definition at line 64 of file ROOTFileReader.h.
Referenced by GetLumiSection(), ReplaceFile(), ROOTFileReader(), and ~ROOTFileReader().
TChain* HCAL_HLX::ROOTFileReader::mChain_ [private] |
Definition at line 46 of file ROOTFileReader.h.
Referenced by GetEntry(), GetNumEntries(), ReplaceFile(), ROOTFileReader(), and ~ROOTFileReader().
std::string HCAL_HLX::ROOTFileReader::mFileName_ [private] |
HCAL_HLX::OCCUPANCY_SECTION* HCAL_HLX::ROOTFileReader::OccupancyPtr[HCAL_HLX_MAX_HLXS] [private] |
HCAL_HLX::LUMI_HF_RING_SET* HCAL_HLX::ROOTFileReader::RingSet_ [private] |
Definition at line 80 of file ROOTFileReader.h.
Referenced by GetHFRingSet(), ReplaceFile(), ROOTFileReader(), and ~ROOTFileReader().
unsigned int HCAL_HLX::ROOTFileReader::runNumber_ [private] |
unsigned int HCAL_HLX::ROOTFileReader::sectionNumber_ [private] |
Definition at line 43 of file ROOTFileReader.h.
Referenced by GetSectionNumber(), and ReplaceFile().
HCAL_HLX::LUMI_SUMMARY* HCAL_HLX::ROOTFileReader::Summary_ [private] |
HCAL_HLX::LUMI_THRESHOLD* HCAL_HLX::ROOTFileReader::Threshold_ [private] |
Definition at line 76 of file ROOTFileReader.h.
Referenced by GetThreshold(), ReplaceFile(), ROOTFileReader(), and ~ROOTFileReader().
HCAL_HLX::TRIGGER_DEADTIME* HCAL_HLX::ROOTFileReader::TriggerDeadtime_ [private] |
Definition at line 79 of file ROOTFileReader.h.
Referenced by GetTriggerDeadtime(), ReplaceFile(), ROOTFileReader(), and ~ROOTFileReader().