CMS 3D CMS Logo

Functions

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_5_3_13_patch3/src/L1Trigger/CSCTrackFinder/src/core_2012_03_13/vpp_lib.h File Reference

Go to the source code of this file.

Functions

void readmemh (std::string fname, ULLONG *mem, ULLONG astart, ULLONG afinish)

Function Documentation

void readmemh ( std::string  fname,
ULLONG mem,
ULLONG  astart,
ULLONG  afinish 
)

Definition at line 2 of file vpp_lib.h.

References dtNoiseDBValidation_cfg::cerr, i, and recoMuon::in.

{
        std::ifstream ifs (fname.c_str() , std::ifstream::in);
        ULLONG val;
        for (ULLONG i = astart; i <= afinish; i++)
        {
                if (ifs >> std::hex >> val)
                {
                        mem[i] = val;   
                }
                else
                {
                        std::cerr << "Cannot read file: " << fname << ", addr: " << i << std::endl;
                        ifs.close();
                        return;
                }
        }
        ifs.close();
        //std::cout << "LUT file: " << fname << " read out successfully." << std::endl;
}