1225
1225
void DBBChainCppDataProcessor::fill_daq_data() {
1226
1226
_daq_data->GetEMRDaqPtr()->SetDBBArray(_spill);
1230
////////////////////////////////////////////////////////////////////////////////
1232
int TriggerEngineCppDataProcessor::Process(MDdataContainer* aFragPtr) {
1234
* Cast the argument to structure it points to.
1235
* This process should be called only with MDfragmentV1495 argument.
1237
// cerr << "This is TriggerEngineCppDataProcessor::Process " << endl;
1239
if ( typeid(*aFragPtr) != typeid(MDfragmentV1495) ) return CastError;
1240
MDfragmentV1495* xV1495Fragment = static_cast<MDfragmentV1495*>(aFragPtr);
1242
if ( !xV1495Fragment->IsValid() )
1243
return GenericError;
1245
_tr_spill.SetLdcId(this->GetLdcId());
1246
_tr_spill.SetTimeStamp(this->GetTimeStamp());
1247
_tr_spill.SetPhysEventNumber(this->GetPhysEventNumber());
1249
ParticleTrigger xPT;
1250
int nTr = xV1495Fragment->GetNumTriggers();
1251
for (int i = 0; i < nTr; ++i) {
1252
xPT.SetTimeStamp(xV1495Fragment->GetTriggerTime(i));
1253
xPT.SetTof0Pattern(xV1495Fragment->GetPatternTOF0(i));
1254
xPT.SetTof1Pattern(xV1495Fragment->GetPatternTOF1(i));
1255
xPT.SetTof2Pattern(xV1495Fragment->GetPatternTOF2(i));
1256
_tr_spill.GetParticleTriggerArrayPtr()->push_back(xPT);
1262
void TriggerEngineCppDataProcessor::fill_daq_data() {
1263
_daq_data->SetTriggerEngine(_tr_spill);
1266
void TriggerEngineCppDataProcessor::reset() {
1267
_tr_spill.GetParticleTriggerArrayPtr()->clear();
1270
////////////////////////////////////////////////////////////////////////////////
1272
int EpicsInterfaceCppDataProcessor::Process(MDdataContainer* aFragPtr) {
1274
* Cast the argument to structure it points to.
1275
* This process should be called only with MDfragmentEpicsInterface argument.
1277
// cerr << "This is EpicsInterfaceCppDataProcessor::Process " << endl;
1279
if ( typeid(*aFragPtr) != typeid(MDfragmentEI) ) return CastError;
1280
MDfragmentEI* xEIFragment = static_cast<MDfragmentEI*>(aFragPtr);
1282
if ( !xEIFragment->IsValid() )
1283
return GenericError;
1285
_ei_spill.SetLdcId(this->GetLdcId());
1286
_ei_spill.SetGeo(xEIFragment->GetGeo());
1287
_ei_spill.SetPhysEventNumber(this->GetPhysEventNumber());
1289
int nPVs = xEIFragment->GetNPVs();
1290
for (int i = 0; i < nPVs; ++i) {
1291
_ei_spill.AddHallProbe(xEIFragment->GetPvId(i),
1292
xEIFragment->GetPvValue(i));
1298
void EpicsInterfaceCppDataProcessor::fill_daq_data() {
1299
_daq_data->SetEpicsInterface(_ei_spill);
1302
void EpicsInterfaceCppDataProcessor::reset() {
1303
_ei_spill.GetPvIdArrayPtr()->clear();
1304
_ei_spill.GetPvValueArrayPtr()->clear();
1229
1307
//////////////////////////////////////////////////////////////////////////////////////////////