本文整理汇总了C++中TDC::SetTriggerWindowWidth方法的典型用法代码示例。如果您正苦于以下问题:C++ TDC::SetTriggerWindowWidth方法的具体用法?C++ TDC::SetTriggerWindowWidth怎么用?C++ TDC::SetTriggerWindowWidth使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TDC
的用法示例。
在下文中一共展示了TDC::SetTriggerWindowWidth方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ReadAndFillTDC
int IniFile::ReadAndFillTDC(){
std::ifstream ini( sFileName.c_str() );
std::stringstream parser;
std::string token, value, line, group;
iError = INI_OK;
// Loading the file into the parser
if( ini ){
parser << ini.rdbuf();
ini.close();
} else {
iError = INI_ERROR_CANNOT_OPEN_READ_FILE;
return iError;
}
group = "";
TdcMap mapTDC;
MapVector mapVector;
while( std::getline( parser, line ) && ( iError == INI_OK ) ){
// Check if the line is comment
if( !CheckIfComment( line ) ){
// Check for group
if( !CheckIfGroup( line, group ) ){
// Check for token
if( CheckIfToken( line, token, value ) ){
// Make the key in format group.key if the group is not empty
//if( group.size() > 1 ) token = group + "." + token;
mData[ token ] = value;
} else {
iError = INI_ERROR_WRONG_FORMAT;
return iError;
}
}
else{
mapVector.push_back(mData);
mData.clear();
}
}
}
mapVector.push_back(mData);
for(int i=3 ; i<mapVector.size() ; i++){
TDC tempTDC;
tempTDC.SetName(mapVector[i]["Name"]);
//std::cout<<"TriggerWindowWidth : "<<mapVector[i]["TriggerWindowWidth"]<<std::endl;
tempTDC.SetTriggerWindowWidth(std::stoi(mapVector[i]["TriggerWindowWidth"], nullptr,10 ));
tempTDC.SetTriggerWindowOffset(std::stoi(mapVector[i]["TriggerWindowOffset"], nullptr,10 ));
tempTDC.SetTriggerExtraSearchMargin(std::stoi(mapVector[i]["TriggerExtraSearchMargin"], nullptr,10 ));
tempTDC.SetTriggerRejectMargin(std::stoi(mapVector[i]["TriggerRejectMargin"], nullptr,10 ));
tempTDC.SetEnableTriggerTimeSubstraction(std::stoi(mapVector[i]["EnableTriggerTimeSubstraction"], nullptr,10 ));
tempTDC.SetIndividualLSB(std::stoi(mapVector[i]["IndividualLSB"], nullptr,10 ));
fTdcVector.push_back(tempTDC);
//std::cout<<"Tdc-NName : "<<mapVector[i]["Name"]<<std::endl;
//std::cout<<"TDC-NAME : "<<mapVector[i]["Name"]<<std::endl;
}
std::cout<<"Num of Groups in INI file : "<<mapVector.size()<<std::endl;
}