4#include "RawDataCnv/EventManagement/RAWEVENT.h"
5#include "GaudiKernel/Algorithm.h"
6#include "GaudiKernel/SmartDataPtr.h"
7#include "RawFile/RawFileReader.h"
8#include "RawDataCnv/EventManagement/EmcBuilder.h"
9#include "RawDataCnv/EventManagement/MdcBuilder.h"
10#include "RawDataCnv/EventManagement/MucBuilder.h"
11#include "RawDataCnv/EventManagement/TofBuilder.h"
12#include "EmcRawEvent/EmcDigi.h"
13#include "MdcRawEvent/MdcDigi.h"
14#include "TofRawEvent/TofDigi.h"
15#include "MucRawEvent/MucDigi.h"
16#include "RawEvent/RawDataUtil.h"
17#include "RealizationSvc/RealizationSvc.h"
18#include "RealizationSvc/IRealizationSvc.h"
19#include "DataInfoSvc/DataInfoSvc.h"
20#include "DataInfoSvc/IDataInfoSvc.h"
21#include "BesTimerSvc/IBesTimerSvc.h"
22#include "BesTimerSvc/BesTimerSvc.h"
23#include "GaudiKernel/NTuple.h"
30#define MAX_LOOP_TIMES 1000000
41template <
class T1,
class T2>
42void combineDigits (SmartDataPtr<T1>& mcDigits, T1& bgDigits,
int verbosity);
48 MixerAlg (
const std::string& name, ISvcLocator* pSvcLocator);
55 bool nextEvent(
int nskip = 0,
int evtbyte = 0,
int eventsToEnd = 0);
57 void mixDigi(SmartDataPtr<MdcDigiCol>& mdcMcDigits,
58 SmartDataPtr<EmcDigiCol>& emcMcDigits,
59 SmartDataPtr<MucDigiCol>& mucMcDigits,
60 SmartDataPtr<TofDigiCol>& tofMcDigits);
72 bool file_sort(std::vector<std::string>& files, std::vector<int>& ranEvtNums);
90 std::vector<std::string> m_runs;
91 std::vector<std::string> m_dates;
102 bool m_dbUserRequest;
112 int m_totEvtNumInCurFile;
115 std::vector<int> m_ranTrgEvents;
116 std::vector<int> m_numSets;
117 std::vector<int> m_vRanEvtNumInSubSet;
118 std::vector<int> m_vStreamNumInSubSet;
119 std::vector<int> m_vStepLength;
120 std::vector<int> m_ranStepLenInCurrentFile;
122 std::map<int,std::vector<int> > map_stepLength;
135 std::string currentBGFile;
138 std::string currentMCFile;
141 std::vector<std::string> m_bgfiles;
142 std::vector<std::string> m_bgfilesIndex;
146 std::string m_pattern;
148 std::string m_newdatadir;
154 NTuple::Tuple* m_tuple1;
155 NTuple::Item<float> m_time1;
156 NTuple::Item<float> m_time2;
157 NTuple::Item<float> m_time3;
158 NTuple::Item<float> m_time4;
159 NTuple::Item<float> m_time5;
161 NTuple::Tuple* m_tuple2;
162 NTuple::Tuple* m_tuple3;
163 NTuple::Item<long> m_tdc;
ObjectVector< EmcDigi > EmcDigiCol
ObjectVector< MdcDigi > MdcDigiCol
ObjectVector< MucDigi > MucDigiCol
ObjectVector< TofDigi > TofDigiCol
void combineMdcDigits(SmartDataPtr< MdcDigiCol > &mcDigits, MdcDigiCol &bgDigits, int verbosity)
void combineTofDigits(SmartDataPtr< TofDigiCol > &mcDigits, TofDigiCol &bgDigits, int verbosity)
void combineDigits(SmartDataPtr< T1 > &mcDigits, T1 &bgDigits, int verbosity)
manage multiple CLHEP random engines as named streams
std::string prepareDbQuery()
bool file_sort(std::vector< std::string > &files, std::vector< int > &ranEvtNums)
void mixDigi(SmartDataPtr< MdcDigiCol > &mdcMcDigits, SmartDataPtr< EmcDigiCol > &emcMcDigits, SmartDataPtr< MucDigiCol > &mucMcDigits, SmartDataPtr< TofDigiCol > &tofMcDigits)
void decodeMuc(MucDigiCol *digiCol)
void decodeEmc(EmcDigiCol *digiCol)
bool nextEvent(int nskip=0, int evtbyte=0, int eventsToEnd=0)
MixerAlg(const std::string &name, ISvcLocator *pSvcLocator)
void decodeMdc(MdcDigiCol *digiCol)
void decodeTof(TofDigiCol *digiCol)