本文整理汇总了C++中TH1I::SetBit方法的典型用法代码示例。如果您正苦于以下问题:C++ TH1I::SetBit方法的具体用法?C++ TH1I::SetBit怎么用?C++ TH1I::SetBit使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TH1I
的用法示例。
在下文中一共展示了TH1I::SetBit方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: MPulseLengths_init
/** This method initializes histograms.
*/
INT MPulseLengths_init()
{
// This histogram has the pulse lengths on the X-axis and the number of pulses on the Y-axis
// One histogram is created for each detector
std::map<std::string, std::string> bank_to_detector_map = gSetup->fBankToDetectorMap;
for(std::map<std::string, std::string>::iterator mapIter = bank_to_detector_map.begin();
mapIter != bank_to_detector_map.end(); mapIter++) {
std::string bankname = mapIter->first;
std::string detname = gSetup->GetDetectorName(bankname);
std::string histname = "h" + detname + "_Lengths";
std::string histtitle = "Plot of the pulse lengths for the " + detname + " detector";
TH1I* hDetLengths = new TH1I(histname.c_str(), histtitle.c_str(), 100,0,100);
hDetLengths->GetXaxis()->SetTitle("Pulse Lengths [N Samples]");
hDetLengths->GetYaxis()->SetTitle("Arbitrary Unit");
hDetLengths->SetBit(TH1::kCanRebin);
length_histograms_map[bankname] = hDetLengths;
}
std::string histname = "hAvgPulseLengthsPerChannel";
std::string histtitle = "Plot of the average pulse lengths per event for the each channel";
average_length_histogram = new TH2I(histname.c_str(), histtitle.c_str(), 1,0,1, 5000,0,5000);
average_length_histogram->GetXaxis()->SetTitle("Bank Name");
average_length_histogram->GetYaxis()->SetTitle("MIDAS Event Number");
average_length_histogram->SetBit(TH1::kCanRebin);
return SUCCESS;
}