- Timestamp:
- 10/17/13 15:20:41 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/EventBuilder.cc
r16854 r17236 11 11 #include <boost/algorithm/string/join.hpp> 12 12 13 #include " queue.h"13 #include "../externals/Queue.h" 14 14 15 15 #include "MessageImp.h" … … 802 802 // ========================================================================== 803 803 804 voidproc1(const shared_ptr<EVT_CTRL2> &);804 bool proc1(const shared_ptr<EVT_CTRL2> &); 805 805 806 806 Queue<shared_ptr<EVT_CTRL2>> processingQueue1(bind(&proc1, placeholders::_1)); 807 807 808 voidproc1(const shared_ptr<EVT_CTRL2> &evt)808 bool proc1(const shared_ptr<EVT_CTRL2> &evt) 809 809 { 810 810 applyCalib(*evt, processingQueue1.size()); 811 return true; 811 812 } 812 813 … … 814 815 // a command queue, to which command+data is posted, 815 816 // (e.g. runOpen+runInfo, runClose+runInfo, evtWrite+evtInfo) 816 voidwriteEvt(const shared_ptr<EVT_CTRL2> &evt)817 bool writeEvt(const shared_ptr<EVT_CTRL2> &evt) 817 818 { 818 819 //const shared_ptr<RUN_CTRL2> &run = evt->runCtrl; … … 832 833 factPrintf(MessageImp::kError, "Could not open new file for run %d (evt=%d, runOpen failed)", evt->runNum, evt->evNum); 833 834 run.fileStat = kFileClosed; 834 return ;835 return true; 835 836 } 836 837 … … 846 847 // File already closed 847 848 if (run.fileStat==kFileClosed) 848 return ;849 return true; 849 850 850 851 bool rc1 = true; … … 859 860 // ... this is the case if CloseRunFile was called before any file was opened. 860 861 if (run.fileStat!=kFileOpen) 861 return ;862 return true; 862 863 863 864 // File is not yet to be closed. 864 865 if (rc1 && evt->closeRequest==kRequestNone) 865 return ;866 return true; 866 867 867 868 runClose(run); … … 886 887 const string str = boost::algorithm::join(reason, ", "); 887 888 factPrintf(MessageImp::kInfo, "File closed because %s", str.c_str()); 889 890 return true; 888 891 } 889 892 890 893 Queue<shared_ptr<EVT_CTRL2>> secondaryQueue(bind(&writeEvt, placeholders::_1)); 891 894 892 voidprocEvt(const shared_ptr<EVT_CTRL2> &evt)895 bool procEvt(const shared_ptr<EVT_CTRL2> &evt) 893 896 { 894 897 if (evt->valid()) … … 914 917 { 915 918 secondaryQueue.emplace(new EVT_CTRL2(kRequestEventCheckFailed, evt->runCtrl)); 916 return ;919 return true; 917 920 } 918 921 } … … 920 923 // If file is open post the event for being written 921 924 secondaryQueue.post(evt); 925 926 return true; 922 927 } 923 928
Note:
See TracChangeset
for help on using the changeset viewer.