2 #include "RecoLuminosity/TCPReceiver/interface/LumiStructures.hh"
13 #include <sys/types.h>
38 const unsigned int sectionNumber){
40 SetFileName( runNumber, sectionNumber);
42 m_file =
new TFile( (dirName_ + fileName_).c_str(),
"RECREATE");
55 m_tree =
new TTree(
"LumiTree",
"");
57 Header_ = &(lumiSection_->hdr);
58 Summary_ = &(lumiSection_->lumiSummary);
59 Detail_ = &(lumiSection_->lumiDetail);
61 m_tree->Bronch(
"Header.",
"HCAL_HLX::LUMI_SECTION_HEADER", &Header_, 1);
64 m_tree->Bronch(
"Summary.",
"HCAL_HLX::LUMI_SUMMARY", &Summary_, 1);
65 m_tree->Bronch(
"Detail.",
"HCAL_HLX::LUMI_DETAIL", &Detail_, 1);
68 for(
unsigned int iHLX = 0; iHLX < 36; ++iHLX ){
69 EtSumPtr_[iHLX] = &( lumiSection_->etSum[iHLX] );
70 MakeBranch(lumiSection_->etSum[iHLX], &EtSumPtr_[iHLX], iHLX);
73 OccupancyPtr_[iHLX] = &(lumiSection_->occupancy[iHLX]);
74 MakeBranch(lumiSection_->occupancy[iHLX], &OccupancyPtr_[iHLX], iHLX);
76 LHCPtr_[iHLX] = &(lumiSection_->lhc[iHLX]);
77 MakeBranch(lumiSection_->lhc[iHLX], &LHCPtr_[iHLX], iHLX);
85 const std::string typeName =
typeid(
T).
name();
87 std::string branchName;
88 std::ostringstream numString;
90 if(typeName ==
"N8HCAL_HLX11LHC_SECTIONE"){
91 className =
"HCAL_HLX::LHC_SECTION";
93 }
else if(typeName ==
"N8HCAL_HLX17OCCUPANCY_SECTIONE"){
94 className =
"HCAL_HLX::OCCUPANCY_SECTION";
95 branchName =
"Occupancy";
96 }
else if(typeName ==
"N8HCAL_HLX14ET_SUM_SECTIONE"){
97 className =
"HCAL_HLX::ET_SUM_SECTION";
101 numString << std::setfill(
'0') << std::setw(2) << HLXNum;
102 branchName = branchName + numString.str() +
".";
103 m_tree->Bronch(branchName.c_str(), className.c_str(),
out, 1);
bool OpenFile(const HCAL_HLX::LUMI_SECTION &lumiSection)
void FillTree(const HCAL_HLX::LUMI_SECTION &localSection)
void MakeBranch(const T &in, T **out, int HLXNum)
std::string className(const T &t)