+# check, if data is multiplexed and if all nessesary infos are given
+sub _check_multiplexed {
+ my ($self, %params) = @_;
+
+ $self->is_multiplexed(0);
+
+ # If more than one profile is given, it is multiplexed.
+ if ($self->profile) {
+ my @profile = @{ $self->profile };
+ if (scalar @profile > 1) {
+ my $info_ok = 1;
+ # Each profile needs a class and a row_ident
+ foreach my $p (@profile) {
+ if ( !defined $p->{class} || !defined $p->{row_ident} ) {
+ $info_ok = 0;
+ last;
+ }
+ }
+
+ # If header is given, there need to be a header for each profile
+ if ($info_ok && $self->header) {
+ my @header = @{ $self->header };
+ if (scalar @profile != scalar @header) {
+ $info_ok = 0;
+ }
+ }
+ $self->is_multiplexed($info_ok);
+ return $info_ok;
+ }
+ }
+
+ # ok, if not multiplexed
+ return 1;
+}
+