本文整理汇总了C++中Highlighter::SetLineWidth方法的典型用法代码示例。如果您正苦于以下问题:C++ Highlighter::SetLineWidth方法的具体用法?C++ Highlighter::SetLineWidth怎么用?C++ Highlighter::SetLineWidth使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Highlighter
的用法示例。
在下文中一共展示了Highlighter::SetLineWidth方法的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();
}