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


C++ Highlighter::SetLineColor方法代码示例

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


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

示例1: GetNumberOfObjectsWithAuthor

void Timepix3VolcanoEdge::Execute(){

	// Ask the store gate if the previous algorithm (BlobsFinder --> reponsible for clustering)
	//  sent any objects to the StoreGate.
	Int_t lastObject = GetNumberOfObjectsWithAuthor("BlobsFinder");
	if(lastObject == 0)
		return;

	// If so, get the pointer to the last object.  BlobsFinder, as it comes out of the box, sends
	//  a single object containing all clusters.
	m_aB = (AllBlobsContainer *) GetObjectFromAuthor("BlobsFinder", lastObject-1);

	// AllBlobsContainer is a box full of Blobs(Clusters). Now we can iterate over all clusters inside.
	vector<blob> blobsVector = m_aB->GetBlobsVector();
	Log << MSG::INFO << "Number of blobs from clustering = " << (Int_t) blobsVector.size() << endreq;
	vector<blob>::iterator blobsItr = blobsVector.begin(); //allBlobs.begin();

	cluster cl;
	for( ; blobsItr != blobsVector.end() ; blobsItr++) {

		cl = *blobsItr;

		// Limit all this to clusters with a minimum size.
		// Note that m_minNPixels can be configured through the Viewer
		//  so you can reprocess and check results online.
		if(cl.bP.nPixels < m_minNPixels)
			continue;

		if(cl.bP.nInnerPixels < m_minInner)
			continue;

		// Finish selection.  Signal the cluster
		Highlighter * highLight = new Highlighter(cl.bP.geoCenter_x,
				cl.bP.geoCenter_y,
				"arrow", this);
		highLight->SetLineColor(kBlack);
		highLight->SetLineWidth(1);
		FillValuesForDisplay(highLight, cl);
		PullToStoreGateAccess(highLight, MPXDefs::DO_NOT_SERIALIZE_ME);

		// If the cluster passes the minimum requirements loop over the
		// the constituents of the cluster --> ClusterDescription
		list< pair < pair<int, int>, int > > cl_des = cl.GetClusterDescription();
		list< pair < pair<int, int>, int > >::iterator i = cl_des.begin();

		// Store the cluster TOT for output
		m_clusterTOT.push_back( cl.bP.clusterTOT );

		double calib_edep = 0.0, clusterEdep = 0.;
		int tot = 0;
		pair<int, int> pix;

		for ( ; i != cl_des.end() ; i++) {

			// pixel coordinates and tot
			pix = (*i).first;
			tot = (*i).second;

			// Use calibration to obtain E = Surrogate(TOT) for this pixel
			calib_edep = CalculateAndGetCalibEnergy(pix, tot);

			// Fill the TOT Vs. Energy map
			m_TOTEnergyMap[tot].push_back( calib_edep );

			// Calculate the energy of the cluster
			clusterEdep += calib_edep;

		}

		// Store the cluster Energy calculated in the previous loop
		m_clusterEnergy.push_back( clusterEdep );

	}

	// Fill the output tree of this algorithm
	getMyTree()->Fill();

	// WARNING ! don't forget to clean up your variables for the next TTree::Fill call
	m_clusterEnergy.clear();
	m_clusterTOT.clear();

}
开发者ID:ozel,项目名称:mafalda,代码行数:82,代码来源:Timepix3VolcanoEdge.cpp


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