Splitting of $f_*\mathcal O_X$

Consider a finite and flat morphism $f\colon X \rightarrow Y$ of schemes of degree $d$. If $Y$ is locally noetherian, then the sheaf $f_*\mathcal O_X$ is a finite locally free $\mathcal O_Y$-module of rank $d$.

Under which hypotheses is the sheaf $f_*\mathcal O_X$ the sum of $d$ invertible sheaves?

The specific situation I have in mind is a finite morphism of curves $f\colon C \rightarrow E$, where $C$ is a curve of genus $5$ and $E$ is a curve of genus $1$ which is the quotient of $C$ by an automorphism $\sigma$ of order $4$. The ramification indexes are all $\leq 2$, so $f$ is branched over $4$ points on $E$.

• What is $B$? It is rare for the sheaf you describe to be a direct sum of line bundles, so difficult to answer the question as it stands. If you have a more specific situation in mind, one can try. – Mohan Feb 6 '18 at 14:34
• $B$ was a typo. I added the specific situation that I have. – Davide Cesare Veniani Feb 6 '18 at 15:08

Cyclic covers pose no problem, at least if characteristic and order of the group are relatively prime. If $G$ is a cyclic group acting on $X$ and $f:X\to Y$ is the quotient, so that the map is flat (for example, $X,Y$ are smooth curves), then $G$ acts on $f_*\mathcal{O}_X$ and the eigenspaces are line bundles over $Y$ and it gives a splitting of $f_*\mathcal{O}_X$.
• The word "cyclic cover" is used - as far as I know - in a context where $f_*\mathcal O_X = \mathcal O_Y \otimes L^{-1} \otimes \ldots \otimes L^{-(n-1)}$, where $L$ is a line bundle such that $L^n = \mathcal O_Y(B)$, where $B$ is the branch divisor, but in this situation this is not the case. Could you compute the degrees of the line bundles in which $f_* \mathcal O_X$ splits? – Davide Cesare Veniani Feb 7 '18 at 11:13
• (I meant of course $\mathcal O_Y \oplus L^{-1} \oplus \ldots \oplus L^{-(n-1)}$.) – Davide Cesare Veniani Feb 7 '18 at 12:31