Changeset 11116


Ignore:
Timestamp:
06/22/11 19:56:33 (13 years ago)
Author:
tbretz
Message:
Send commands only to connected boards; disable initial sending of any commands; fixed order of boards and chips in arrays
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/src/fadctrl.cc

    r11112 r11116  
    6767            Out() << "ROI|" << fEventHeader.Crate() << ":" << fEventHeader.Board() << ":" << c << ":";
    6868            for (unsigned int ch=0; ch<FAD::kNumChannelsPerChip; ch++)
    69                 Out() << " " << setw(4) << fChannelHeader[c*FAD::kNumChannelsPerChip+ch].fRegionOfInterest;
     69                Out() << " " << setw(4) << fChannelHeader[c+ch*FAD::kNumChips].fRegionOfInterest;
    7070            Out() << endl;
    7171        }
    7272
    73         Out() << "CEL|" << fEventHeader.Crate() << ":" << fEventHeader.Board() << ":";
     73        Out() << "CEL|" << fEventHeader.Crate() << ":" <<fEventHeader.Board() << ": ";
    7474        for (unsigned int c=0; c<FAD::kNumChips; c++)
    7575        {
     
    7777            {
    7878                for (unsigned int ch=0; ch<FAD::kNumChannelsPerChip; ch++)
    79                     Out() << " " << setw(4) << fChannelHeader[c*FAD::kNumChannelsPerChip+ch].fStartCell;
     79                    Out() << " " << setw(4) << fChannelHeader[c+ch*FAD::kNumChips].fStartCell;
    8080                Out() << endl;
    8181            }
     
    8585                const uint16_t cel = fChannelHeader[c*FAD::kNumChannelsPerChip].fStartCell;
    8686                for (unsigned int ch=1; ch<FAD::kNumChannelsPerChip; ch++)
    87                     if (cel!=fChannelHeader[c*FAD::kNumChannelsPerChip+ch].fStartCell)
     87                    if (cel!=fChannelHeader[c+ch*FAD::kNumChips].fStartCell)
    8888                    {
    8989                        Out() << "!";
     
    185185            fBuffer.resize(fEventHeader.fPackageLength-sizeof(FAD::EventHeader)/2);
    186186            AsyncRead(ba::buffer(fBuffer), kReadData);
    187             AsyncWait(fInTimeout, 500, &Connection::HandleReadTimeout);
     187            AsyncWait(fInTimeout, 2000, &Connection::HandleReadTimeout);
    188188
    189189            return;
     
    312312//            CmdSetRoi(i, 100);
    313313
    314         Cmd(FAD::kCmdTriggerLine, true);
    315         Cmd(FAD::kCmdSingleTrigger);
     314//        Cmd(FAD::kCmdTriggerLine, true);
     315//        Cmd(FAD::kCmdSingleTrigger);
    316316    }
    317317
     
    319319    void PostCmd(std::vector<uint16_t> cmd)
    320320    {
    321         if (fBlockTransmission)
     321        if (fBlockTransmission || !IsConnected())
    322322            return;
    323323
     
    336336    void PostCmd(uint16_t cmd)
    337337    {
    338         if (fBlockTransmission)
     338        if (fBlockTransmission || !IsConnected())
    339339            return;
    340340
     
    351351    void PostCmd(uint16_t cmd, uint16_t data)
    352352    {
    353         if (fBlockTransmission)
     353        if (fBlockTransmission || !IsConnected())
    354354            return;
    355355
Note: See TracChangeset for help on using the changeset viewer.