Example #1
0
 function ExportGroup(REQUEST $req, READER $rdr, LOGGROUP $grp, INTERVAL $ivl, MASK $msk = NULL, $title = false)
 {
     global $ROOT_COMBIHIST_LIMIT;
     if (!$title) {
         $title = $this->GetGroupName($rdr->srvid, $rdr->dbname, $grp->gid, $msk ? $msk->name : "");
     }
     $opts =& $req->GetOptions();
     $subseconds = !$opts->Get('ignore_subsecond');
     if ($this->stream && !$this->handler->multigroup) {
         $stream_args = array_merge($this->stream_args, array("expected_blocks" => $this->expected_groups, "block_title" => $title, "block_number" => 0));
         $stream_args["extension"] = $this->handler->GetExtension();
         if (in_array("ROOT", $this->specials)) {
             if (!isset($ROOT_COMBIHIST_LIMIT) || $ivl->GetWindowSize() < $ROOT_COMBIHIST_LIMIT) {
                 $stream_args['root__combhist'] = 1;
             } else {
                 $stream_args['root__combhist'] = 0;
             }
         }
         $this->stream->BlockStart($stream_args);
     }
     $this->handler->GroupStart($title, $subseconds);
     $rdr->Export($this->handler, $grp, $msk, $ivl, $this->resample, "", $this->dmcb);
     $this->handler->GroupEnd();
     if ($this->stream && !$this->handler->multigroup) {
         $this->stream->BlockEnd();
     }
 }