我对编码还比较陌生,有一些我通常不太了解的问题。 该代码将显示如下:
double SlowPionClusterCharge;
double cid;
StoreArray<PXDCluster> getPionClusters() {
//float pxdClusterCharge;
//float cid;
float mcPDG;
StoreArray<RecoTrack> m_RecoTracks;
for (RecoTrack& recoTrack : m_RecoTracks) {
for (PXDCluster& pxdcl : recoTrack.getRelationsFrom<PXDCluster>("PXDClusters")) {
if (mcPDG == 211) {
RecoTrack* track = recoTrack.getRelatedFrom<RecoTrack>("Tracks");
} else {
continue;
}
SlowPionClusterCharge = pxdcl.getCharge();
cid = pxdcl.getSensorID().getID();
if (pxdClusterCharge == 0) {
continue;
}
}
}
}
VARIABLE_GROUP("PXD clusters");
REGISTER_VARIABLE("SlowPionClusterCharge(i)", SlowPionClusterCharge, "[EventBased] cluster charge of slow pion in a event");
错误消息是:
error: no matching function for call to 'make_function'
REGISTER_VARIABLE("SlowPionClusterCharge(i)", SlowPionClusterCharge, "[EventBased] cluster charge of slow pion in a event");
/mnt/scratch/basf2/development/include/analysis/VariableManager/Manager.h:295:74: note: expanded from macro 'REGISTER_VARIABLE'
static Proxy VARMANAGER_MAKE_UNIQUE(_variableproxy)(std::string(name), Belle2::Variable::make_function(function), std::string(description));