It is well known that if $f:\mathbb{R}\rightarrow \mathbb{R}$ is a measurable function and $f \ge 0$ then there exist a sequence of simple non-negative measurable functions {$ S_n $} such that $S_n\nearrow f$ but these simple functions have arbitrary measurable "components", that is, in it's canonical representation:
$$S_n=\sum_{j=1}^{n}c_j1_{A_j}$$
where $1_A$ denotes the characteristic function of $A$. The sets $A_j$ are measurable. \
The question is: if we restrict our attention to simple functions of the form:
$$S=\sum_{j=1}^{n}c_j1_{\left[ a_j,b_j \right]}$$
What is the class of measurable functions that can be approximated by sequences of simple functions that are sums of characteristic functions over compact intervals?