Example #1
0
void WirechamberCalibrator::tweakPosition(Side s, AxisDirection d, wireHit& h, double E) const {
	if(h.rawCenter == kUndefinedPosition) return;
	unsigned int n;
	float c;
	toLocal(s,d,h.rawCenter,n,c);
	h.center = fromLocal(s,d,n,cathsegs[s][d][n]->adjustPos(c,E));
}
Example #2
0
//FIXME: Pass std::wstring to std::ifstream constructor
void RPKGAdapter::load(const wstring& fileName)
{
    rpkgArchive.open(toLocal(fileName).c_str(), ios::binary | ios::in);
    if (!rpkgArchive.is_open())
    {
        Log::error() << "Cannot load RPKG archive " << fileName << ": " << fromLocal(strerror(errno));
        return;
    }
    std::list<RPKGEntry> l = loadRPKG(rpkgArchive);

    for (std::list<RPKGEntry>::const_iterator i = l.begin(); i != l.end(); i++)
        files[i->name] = *i;

    Log::info() << "Loaded " << files.size() << " files from RPKG archive " << fileName;
    m_fileName = fileName;
}