Scaling ROOT PostScript Files
May 25, 2007 on 12:33 pm | In Linux, ROOT | No CommentsI encountered some trouble today printing PostScript files from ROOT at smaller sizes. This is most useful to me because my lab notebook, heretically, is smaller than ‘letter’ size, which I find more convenient for carrying than the huge squared notebooks which seem to be the norm around here. I was looking for a quick way of printing PostScript at 80% scale.
Continue reading Scaling ROOT PostScript Files…
Don’t Define Template Functions In .cpp Files
May 17, 2007 on 11:50 am | In Code | No CommentsThis is another gotcha from my recent C++ work. When I learned C++ I was taught to put the interface (function declarations) in a header file and the implentation (function definitions) in a .cpp module source file. Some small functions could be written inline in the class declarations, usually just get/set member functions for private data. At one point (or possibly just in C) having if/else statements in a header was not allowed, the compiler complained about branching. I recently realized (about 10 years after everyone else, it seems) that there is actually a very good reason to put implementation of templated functions in the header file.
Continue reading Don’t Define Template Functions In .cpp Files…
Mixing Inheritance and Templates in C++
May 5, 2007 on 11:36 am | In Code | Comments OffI came across a gotcha today with some C++ code I’m working on. I have an abstract base class for doing interpolation, and when I tried converting it to a template class it stopped working – specifically the derived class could no longer access certain members of the base class.
Continue reading Mixing Inheritance and Templates in C++…
Powered by WordPress with theme based on
Pool by
Borja Fernandez.
Feeds: Entries and
comments.
Valid XHTML and
CSS.
^Top^
Page required 23 queries and took 0.178 seconds.